:root {
  --fondo: #f4f6f9; --panel: #fff; --texto: #1c2430; --suave: #5d6878; --borde: #dde2ea;
  --primario: #1f5fbf; --primario-osc: #174a96; --ok: #1d7a46; --aviso: #a86200; --peligro: #b3261e;
  --alta: #c2410c; --media: #a16207; --ute: #6d28d9; --menor: #0f766e;
  --sombra: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --radio: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fondo: #0f141b; --panel: #171e27; --texto: #e6eaf0; --suave: #9aa5b4; --borde: #2a3441;
    --primario: #5b9bff; --primario-osc: #3f82ef; --ok: #4ade80; --aviso: #f5a524; --peligro: #f87171;
    --alta: #fb923c; --media: #facc15; --ute: #a78bfa; --menor: #2dd4bf;
    --sombra: none; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
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); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.6rem; margin: 0 0 .25rem; line-height: 1.25; }
h2 { font-size: 1.1rem; margin: 1.2rem 0 .6rem; }
h2 small { font-weight: 400; color: var(--suave); font-size: .85rem; }
h3 { font-size: 1rem; margin: 1rem 0 .4rem; }
small, .nota { color: var(--suave); font-size: .85rem; }
.sub { color: var(--suave); margin: 0 0 .5rem; }
code { background: var(--fondo); border: 1px solid var(--borde); border-radius: 4px; padding: 0 4px; font-size: .85em; }

/* Barra superior */
.barra { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 1rem; padding: .55rem 1.25rem;
  background: var(--panel); border-bottom: 1px solid var(--borde); box-shadow: var(--sombra); }
.ico { width: 18px; height: 18px; flex: 0 0 18px; vertical-align: -3px; }
nav#nav > a, .usuario summary { display: inline-flex; align-items: center; gap: .45rem; }
.marca { display: flex; align-items: center; gap: .5rem; font-weight: 700; color: var(--texto); font-size: 1.05rem; }
.marca img { width: 26px; height: 26px; }
nav#nav { display: flex; align-items: center; gap: .25rem; flex: 1; }
nav#nav > a { padding: .4rem .75rem; border-radius: 8px; color: var(--suave); font-weight: 500; }
nav#nav > a:hover { background: var(--fondo); text-decoration: none; color: var(--texto); }
nav#nav > a.activo { background: color-mix(in srgb, var(--primario) 12%, transparent); color: var(--primario); }
.sep { flex: 1; }
.usuario { position: relative; }
.usuario summary { cursor: pointer; list-style: none; padding: .4rem .75rem; border: 1px solid var(--borde); border-radius: 8px; }
.usuario summary::-webkit-details-marker { display: none; }
.desplegable { position: absolute; right: 0; top: calc(100% + 6px); background: var(--panel); border: 1px solid var(--borde);
  border-radius: var(--radio); box-shadow: 0 8px 24px rgba(0,0,0,.15); min-width: 220px; padding: .4rem; display: grid; }
.desplegable a, .desplegable .enlace { padding: .45rem .6rem; border-radius: 6px; text-align: left; color: var(--texto); }
.desplegable a:hover, .desplegable .enlace:hover { background: var(--fondo); text-decoration: none; }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--borde); border-radius: 8px; color: var(--texto);
  font-size: 1.2rem; padding: .2rem .6rem; cursor: pointer; }

main { max-width: 1280px; margin: 0 auto; padding: 1.25rem; }
main.centro { min-height: 80vh; display: grid; place-items: center; }
.pie { max-width: 1280px; margin: 2rem auto 1rem; padding: 0 1.25rem; color: var(--suave); font-size: .8rem; }

/* Cajas y bloques */
.caja { background: var(--panel); border: 1px solid var(--borde); border-radius: var(--radio); padding: 1rem 1.25rem; box-shadow: var(--sombra); margin-bottom: 1rem; }
.caja > h2:first-child { margin-top: 0; }
.estrecha { max-width: 460px; margin: 1rem auto; }
.login { width: min(380px, 100%); }
.login h1 { display: flex; gap: .5rem; align-items: center; }
.login h1 img { width: 32px; }
.login h1 { margin: .25rem 0 .1rem; }
.barra.publica .derecha { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.enlace-volver { color: var(--suave); font-size: .9rem; margin-right: .25rem; }
.enlace-volver:hover { color: var(--primario); }
.selector-acceso { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 1rem;
  background: var(--fondo); border: 1px solid var(--borde); border-radius: var(--radio); }

.selector-acceso button { font: inherit; border: 0; background: none; cursor: pointer; }
.selector-acceso a, .selector-acceso button { text-align: center; padding: .45rem .5rem; border-radius: calc(var(--radio) - 2px); color: var(--suave); font-weight: 600; font-size: .92rem; }
.selector-acceso a:hover, .selector-acceso button:hover { color: var(--texto); text-decoration: none; }
.selector-acceso a.activo, .selector-acceso button.activo { background: var(--panel); color: var(--primario); box-shadow: 0 1px 3px rgb(0 0 0 / .12); }
.ayuda-login { margin: .75rem 0 0; font-size: .88rem; }
.ayuda-login summary { cursor: pointer; color: var(--primario); }
.ayuda-login p { color: var(--suave); margin: .4rem 0 0; }
.separador { display: flex; align-items: center; gap: .6rem; margin: 1.1rem 0 .7rem; color: var(--suave); font-size: .85rem; }
.separador::before, .separador::after { content: ""; flex: 1; border-top: 1px solid var(--borde); }
.centrado { text-align: center; }
@media (max-width: 560px) { .enlace-volver { display: none; } }
.cabecera { margin-bottom: 1rem; }
.con-acciones { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.acciones { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-top: .5rem; }
.dos-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: start; }
.vacio { color: var(--suave); padding: 1rem; border: 1px dashed var(--borde); border-radius: var(--radio); text-align: center; }
.flash { padding: .7rem 1rem; border-radius: 8px; margin-bottom: 1rem; border: 1px solid; }
.flash.ok { background: color-mix(in srgb, var(--ok) 10%, var(--panel)); border-color: var(--ok); }
.flash.error { background: color-mix(in srgb, var(--peligro) 10%, var(--panel)); border-color: var(--peligro); }
.flash.aviso, .aviso-caja { background: color-mix(in srgb, var(--aviso) 10%, var(--panel)); border: 1px solid var(--aviso); padding: .7rem 1rem; border-radius: 8px; margin-bottom: 1rem; }
.atajo { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }

/* Formularios */
label { display: grid; gap: .25rem; font-weight: 500; font-size: .9rem; margin-bottom: .75rem; }
label.check { display: flex; align-items: center; gap: .45rem; font-weight: 400; }
input, select, textarea { font: inherit; color: var(--texto); background: var(--panel); border: 1px solid var(--borde); border-radius: 8px; padding: .5rem .6rem; width: 100%; }
input[type=checkbox] { width: auto; accent-color: var(--primario); }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--primario) 40%, transparent); border-color: var(--primario); }
textarea { resize: vertical; }
.fila-campos { display: flex; gap: .75rem; flex-wrap: wrap; align-items: flex-end; }
.fila-campos > label { flex: 1 1 160px; }
.fila-campos > label.check { flex: 0 0 auto; }
.ancho-total { flex-basis: 100% !important; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; font: inherit; font-weight: 500; cursor: pointer;
  padding: .5rem .9rem; border-radius: 8px; border: 1px solid var(--borde); background: var(--panel); color: var(--texto); white-space: nowrap; }
.btn:hover { border-color: var(--primario); text-decoration: none; }
.btn.primario { background: var(--primario); border-color: var(--primario); color: #fff; }
.btn.primario:hover { background: var(--primario-osc); }
.btn.mini { padding: .2rem .55rem; font-size: .82rem; }
.btn.grande { padding: .75rem 1.5rem; font-size: 1.05rem; }
.btn.ancho { width: 100%; margin-bottom: .5rem; }
.enlace { background: none; border: 0; color: var(--primario); cursor: pointer; font: inherit; padding: 0; }
.peligro, .enlace.peligro { color: var(--peligro); }
form.enlinea, details.enlinea { display: inline-flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.solo-movil { display: none; }

/* Chips y estados */
.chip { display: inline-block; font-size: .78rem; font-weight: 600; padding: .12rem .55rem; border-radius: 999px; border: 1px solid var(--borde); background: var(--fondo); white-space: nowrap; }
.chip.n-ALTA { color: var(--alta); border-color: var(--alta); background: color-mix(in srgb, var(--alta) 10%, var(--panel)); }
.chip.n-MEDIA { color: var(--media); border-color: var(--media); background: color-mix(in srgb, var(--media) 10%, var(--panel)); }
.chip.n-UTE { color: var(--ute); border-color: var(--ute); background: color-mix(in srgb, var(--ute) 10%, var(--panel)); }
.chip.menor { color: var(--menor); border-color: var(--menor); background: color-mix(in srgb, var(--menor) 10%, var(--panel)); }
.chip.e-PUB { color: var(--ok); }
.chip.e-ANUL { color: var(--peligro); }
.chip.seg-interesa, .chip.seg-estudio, .chip.seg-presentada { color: var(--primario); border-color: var(--primario); }
.chip.seg-ganada { color: var(--ok); border-color: var(--ok); }
.chip.seg-perdida, .chip.seg-descartada { color: var(--suave); }
.chip.urgente { color: var(--peligro); border-color: var(--peligro); }
.chip.empresa { font-weight: 500; margin: 0 .25rem .35rem 0; }
.chips { display: flex; flex-wrap: wrap; }
.plazo.urgente { color: var(--peligro); font-weight: 600; }
.plazo.pronto { color: var(--aviso); font-weight: 600; }
.plazo.pasada { color: var(--suave); text-decoration: line-through; }

/* Tarjetas de licitación */
.tarjeta { background: var(--panel); border: 1px solid var(--borde); border-radius: var(--radio); padding: .8rem 1rem; margin-bottom: .65rem; box-shadow: var(--sombra); }
.tarjeta:hover { border-color: color-mix(in srgb, var(--primario) 45%, var(--borde)); }
.tarjeta, .caja, .ficha-cab h1 { min-width: 0; overflow-wrap: break-word; }
.tarjeta h3 { margin: .35rem 0; font-size: 1rem; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.t-cab { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.t-cab .tipo { color: var(--suave); font-size: .82rem; }
.derecha { margin-left: auto; display: inline-flex; gap: .4rem; align-items: center; }
.t-datos { display: flex; gap: .4rem 1.1rem; flex-wrap: wrap; font-size: .88rem; color: var(--suave); }
.t-datos .importe { color: var(--texto); font-weight: 700; }
.t-adj { font-size: .85rem; margin-top: .3rem; }
.t-motivos { font-size: .8rem; color: var(--suave); margin-top: .35rem; border-top: 1px dashed var(--borde); padding-top: .35rem; }
.vista-descartada { opacity: .55; }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: .75rem; margin-bottom: 1.25rem; }
.kpi { background: var(--panel); border: 1px solid var(--borde); border-radius: var(--radio); padding: .9rem 1rem; color: var(--texto); box-shadow: var(--sombra); }
.kpi:hover { text-decoration: none; border-color: var(--primario); }
.kpi b { display: block; font-size: 1.8rem; line-height: 1.1; }
.kpi span { color: var(--suave); font-size: .85rem; }
.kpi.alta b { color: var(--alta); }
.kpi.menor b { color: var(--menor); }
.kpi.urgente b { color: var(--peligro); }

/* Buscador */
.caja-busqueda { display: flex; gap: .5rem; margin-bottom: .35rem; }
.caja-busqueda input[type=search] { font-size: 1.05rem; padding: .7rem .9rem; }
.caja-busqueda select { width: auto; }
.buscar-layout { display: grid; grid-template-columns: 280px 1fr; gap: 1.25rem; margin-top: 1rem; align-items: start; }
.filtros { background: var(--panel); border: 1px solid var(--borde); border-radius: var(--radio); padding: 1rem; position: sticky; top: 70px; max-height: calc(100vh - 90px); overflow: auto; }
.filtros label { margin-bottom: .6rem; }
.guardada { display: flex; justify-content: space-between; gap: .5rem; padding: .25rem 0; border-bottom: 1px solid var(--borde); }
.res-cab { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; margin-bottom: .75rem; }
.flotante { position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 20; width: min(340px, calc(100% - 2rem)); box-shadow: 0 10px 30px rgba(0,0,0,.2); }
.paginas { display: flex; justify-content: center; gap: 1rem; align-items: center; margin: 1rem 0; }
.saltos, .pestanas { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.saltos a, .pestanas a { padding: .35rem .8rem; border: 1px solid var(--borde); border-radius: 999px; background: var(--panel); color: var(--texto); font-size: .88rem; }
.pestanas a.activo { background: var(--primario); border-color: var(--primario); color: #fff; }

.buscador-simple { max-width: 900px; margin: 0 auto 1rem; }
.caja-busqueda.grande input[type=search] { font-size: 1.15rem; padding: .85rem 1rem; }
.caja-busqueda.grande .btn { padding: 0 1.5rem; font-size: 1.05rem; }
.ambito { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin: .6rem 0; }
.panel-filtros { display: none; background: var(--panel); border: 1px solid var(--borde); border-radius: var(--radio); padding: 1rem; margin-top: .5rem; }
.panel-filtros.abierto { display: block; }
.filtros-rapidos { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin: .6rem 0; }
.filtros-rapidos select { width: auto; flex: 0 1 auto; }
.interruptor { margin: 0; padding: .45rem .7rem; border: 1px solid var(--borde); border-radius: 8px; background: var(--panel); }
.mas-filtros summary { cursor: pointer; color: var(--primario); font-weight: 500; margin: .3rem 0; }
.rejilla-filtros { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 .75rem; margin-top: .6rem; }
.guardadas { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; margin-bottom: .75rem; color: var(--suave); font-size: .9rem; }
.guardadas .chip { display: inline-flex; gap: .4rem; align-items: center; font-weight: 500; }

/* Cuestionario */
.paso { background: var(--panel); border: 1px solid var(--borde); border-radius: var(--radio); padding: 1rem 1.25rem; margin-bottom: 1rem; }
.paso h2 { margin-top: 0; display: flex; align-items: center; gap: .6rem; }
.num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--primario); color: #fff; font-size: .9rem; }
.rejilla-trabajos { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.trabajo { display: flex; gap: .6rem; align-items: flex-start; padding: .7rem .8rem; border: 1px solid var(--borde); border-radius: 8px; cursor: pointer; font-weight: 400; margin: 0; }
.trabajo:has(input:checked) { border-color: var(--primario); background: color-mix(in srgb, var(--primario) 8%, var(--panel)); }
.trabajo input { margin-top: .25rem; }
.trabajo span { display: grid; }
.trabajo small { line-height: 1.35; }
.rejilla-prov { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .1rem .75rem; }
.rejilla-prov label { display: flex; gap: .4rem; align-items: center; font-weight: 400; margin: 0; }
.clasif-fila { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: .5rem; margin-bottom: .5rem; max-width: 640px; }
.bloque { margin-top: .5rem; }
.filtro-trabajos { margin-bottom: .5rem; max-width: 520px; }
.grupo-trabajo { color: var(--suave); text-transform: uppercase; font-size: .8rem; letter-spacing: .05em; margin: 1rem 0 .5rem; }
.trabajo.oculto, .grupo-trabajo.oculto { display: none; }

/* Ficha */
.ficha-cab { margin-bottom: 1rem; }
.ficha-cab h1 { margin: .5rem 0; }
.ficha-layout { display: grid; grid-template-columns: 1fr 340px; gap: 1.25rem; align-items: start; }
.ficha-lateral { position: sticky; top: 70px; }
.datos { display: grid; grid-template-columns: 190px 1fr; gap: .35rem 1rem; margin: 0; }
.datos dt { color: var(--suave); }
.datos dd { margin: 0; overflow-wrap: anywhere; }
.encaje.n-ALTA { border-left: 4px solid var(--alta); }
.encaje.n-MEDIA { border-left: 4px solid var(--media); }
.encaje.n-UTE { border-left: 4px solid var(--ute); }
.encaje ul { margin: .25rem 0; padding-left: 1.2rem; }
.lista { list-style: none; padding: 0; margin: 0; }
.lista li { padding: .45rem 0; border-bottom: 1px solid var(--borde); }
.nota-item { border-top: 1px solid var(--borde); padding: .55rem 0; }
.nota-cab { display: flex; justify-content: space-between; font-size: .85rem; color: var(--suave); }
.nota-texto { white-space: pre-wrap; overflow-wrap: anywhere; }
.anadir summary { cursor: pointer; color: var(--primario); margin: .75rem 0; }

/* Tablas */
.tabla-scroll { overflow-x: auto; }
.tabla { width: 100%; border-collapse: collapse; background: var(--panel); font-size: .9rem; }
.tabla th, .tabla td { text-align: left; padding: .55rem .65rem; border-bottom: 1px solid var(--borde); vertical-align: top; }
.tabla th { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--suave); background: var(--fondo); }
.tabla tr.prio-1 td:first-child { border-left: 3px solid var(--peligro); }
.acciones-tabla { display: flex; flex-wrap: wrap; gap: .3rem; }
.acciones-tabla details form { display: flex; gap: .3rem; margin-top: .3rem; }

/* Espera (descargas, lectura de la PLACSP) */
body.esperando::after { content: attr(data-espera); position: fixed; inset: auto 1rem 1rem auto; background: var(--texto); color: var(--panel);
  padding: .7rem 1rem; border-radius: 8px; z-index: 50; }

@media (max-width: 1000px) {
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .ficha-layout, .dos-col, .buscar-layout { grid-template-columns: 1fr; }
  .ficha-lateral, .filtros { position: static; max-height: none; }
}
@media (max-width: 720px) {
  main { padding: 1rem; }
  .barra { flex-wrap: wrap; padding: .55rem 1rem; }
  .menu-btn { display: block; }
  nav#nav { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; }
  nav#nav.abierto { display: flex; }
  .desplegable { position: static; box-shadow: none; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .solo-movil { display: inline-flex; }
  #panel-filtros { display: none; }
  #panel-filtros.abierto { display: block; }
  .datos { grid-template-columns: 1fr; }
  .datos dt { margin-top: .4rem; }
  .clasif-fila { grid-template-columns: 1fr; }
  .caja-busqueda { flex-wrap: wrap; }
  h1 { font-size: 1.3rem; }
}

/* Portada pública, alta y legal */
main.portada { max-width: 1100px; }
.portada-barra { display: flex; align-items: center; gap: 1rem; padding: .5rem 0 1rem; }
.portada-barra .marca { color: var(--texto); }
.hero { text-align: center; padding: 3.5rem 1rem 2.5rem; }
.hero h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); max-width: 820px; margin: 0 auto 1rem; letter-spacing: -.02em; }
.hero-sub { color: var(--suave); font-size: 1.1rem; max-width: 720px; margin: 0 auto 1.5rem; }
.hero-dato { color: var(--suave); margin-top: 1.25rem; }
.centro-h { justify-content: center; }
.ventajas { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; margin: 1rem 0 2rem; }
.ventaja { background: var(--panel); border: 1px solid var(--borde); border-radius: var(--radio); padding: 1.25rem; box-shadow: var(--sombra); }
.ventaja h3 { margin: .6rem 0 .3rem; }
.ventaja p { color: var(--suave); margin: 0; }
.ico-grande { width: 34px; height: 34px; color: var(--primario); }
.pasos-portada { background: var(--panel); border: 1px solid var(--borde); border-radius: var(--radio); padding: 1rem 1.5rem; }
.pasos-portada li { margin: .5rem 0; }
.portada-pie { text-align: center; color: var(--suave); font-size: .85rem; margin: 2rem 0 1rem; }
.estrecha.ancha { max-width: 760px; }
.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.legal { max-width: 820px; margin: 1rem auto; }
.empresa-actual { padding: .3rem .6rem; border-bottom: 1px solid var(--borde); }
.fila-pendiente td { background: color-mix(in srgb, var(--aviso) 8%, var(--panel)); }
.chip.estado-activa { color: var(--ok); border-color: var(--ok); }
.chip.estado-pendiente { color: var(--aviso); border-color: var(--aviso); }
.chip.estado-suspendida { color: var(--peligro); border-color: var(--peligro); }

/* Lo esencial del pliego */
.esencial-top { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.dato-grande { background: var(--fondo); border: 1px solid var(--borde); border-radius: 8px; padding: .6rem .8rem; }
.dato-grande span { display: block; color: var(--suave); font-size: .8rem; }
.dato-grande b { font-size: 1.15rem; }
.datos.esencial details summary { cursor: pointer; color: var(--primario); font-size: .82rem; }
.datos.esencial q { display: block; font-size: .85rem; color: var(--suave); border-left: 3px solid var(--borde); padding-left: .6rem; margin: .3rem 0; }

.resumen-ia { background: color-mix(in srgb, var(--primario) 6%, var(--panel)); border: 1px solid color-mix(in srgb, var(--primario) 25%, var(--borde));
  border-radius: 10px; padding: .8rem 1rem; margin-bottom: 1rem; }
.resumen-ia h3 { font-size: .92rem; margin: .7rem 0 .2rem; }
.resumen-ia ul { margin: 0; padding-left: 1.2rem; }
.etiqueta-ia { color: var(--primario); font-weight: 600; font-size: .82rem; margin: 0 0 .3rem; }

/* Mi empresa y preparar oferta */
.progreso-caja { background: var(--panel); border: 1px solid var(--borde); border-radius: var(--radio); padding: .8rem 1rem; margin-bottom: 1rem; }
.barra-progreso { height: 10px; background: var(--fondo); border-radius: 999px; overflow: hidden; margin-top: .4rem; }
.barra-progreso span { display: block; height: 100%; background: linear-gradient(90deg, var(--primario), var(--ok)); border-radius: 999px; }
.barra-progreso .p0 { width: 3%; }
.barra-progreso .p10 { width: 10%; }
.barra-progreso .p20 { width: 20%; }
.barra-progreso .p30 { width: 30%; }
.barra-progreso .p40 { width: 40%; }
.barra-progreso .p50 { width: 50%; }
.barra-progreso .p60 { width: 60%; }
.barra-progreso .p70 { width: 70%; }
.barra-progreso .p80 { width: 80%; }
.barra-progreso .p90 { width: 90%; }
.barra-progreso .p100 { width: 100%; }
.pestana { font: inherit; cursor: pointer; padding: .4rem .9rem; border: 1px solid var(--borde); border-radius: 999px; background: var(--panel); color: var(--texto); }
.pestana.activo { background: var(--primario); border-color: var(--primario); color: #fff; }
.rejilla-campos { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0 1rem; }
.rejilla-campos label small { font-weight: 400; }
.oblig { color: var(--aviso); font-size: .7rem; vertical-align: super; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.obra-fila { display: grid; grid-template-columns: 3fr 2fr 1fr .7fr; gap: .4rem; margin-bottom: .4rem; }
.barra-guardar { position: sticky; bottom: 0; background: color-mix(in srgb, var(--fondo) 90%, transparent); padding: .6rem 0; }
.btn.destacado { box-shadow: 0 0 0 3px color-mix(in srgb, var(--primario) 25%, transparent); }
.pasos-oferta { display: flex; gap: .5rem; flex-wrap: wrap; list-style: none; padding: 0; counter-reset: paso; margin: 0 0 1rem; }
.pasos-oferta li { counter-increment: paso; }
.pasos-oferta a { display: inline-block; padding: .4rem .9rem; border: 1px solid var(--borde); border-radius: 999px; background: var(--panel); color: var(--texto); }
.pasos-oferta a::before { content: counter(paso) ". "; font-weight: 700; color: var(--primario); }
.semaforo { list-style: none; padding: 0; margin: 0; }
.semaforo li { display: flex; gap: .7rem; align-items: flex-start; padding: .6rem 0; border-bottom: 1px solid var(--borde); }
.luz { flex: 0 0 14px; height: 14px; border-radius: 50%; margin-top: .25rem; background: var(--suave); }
.sem-ok .luz { background: var(--ok); } .sem-no .luz { background: var(--peligro); } .sem-revisar .luz { background: var(--aviso); }
.resultado-calc { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; margin-top: .6rem; }
.aviso-calc { margin: .6rem 0 0; font-weight: 500; }
.aviso-calc.mal { color: var(--peligro); } .aviso-calc.ojo { color: var(--aviso); }
.lista-check { list-style: none; padding: 0; margin: 0 0 .6rem; }
.lista-check li { padding: .3rem 0; }
.lista-check input:checked + * , .lista-check label:has(input:checked) { text-decoration: line-through; color: var(--suave); }
.docs-oferta { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .6rem; margin-bottom: .8rem; }
.doc { display: grid; gap: .2rem; padding: .9rem 1rem; border: 1px solid var(--borde); border-radius: 10px; background: var(--fondo); color: var(--texto); }
.doc:hover { border-color: var(--primario); text-decoration: none; }
.doc small { color: var(--suave); }
@media (max-width: 720px) { .obra-fila { grid-template-columns: 1fr 1fr; } }

.barra-ia { background: color-mix(in srgb, var(--primario) 7%, var(--panel)); border: 1px solid color-mix(in srgb, var(--primario) 25%, var(--borde));
  border-radius: 10px; padding: .6rem .9rem; margin-bottom: 1rem; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.t-ia { font-size: .82rem; margin-top: .35rem; font-weight: 500; }
.t-ia.ia-si { color: var(--ok); } .t-ia.ia-dudosa { color: var(--aviso); } .t-ia.ia-no { color: var(--peligro); }

.segmentado { display: inline-flex; border: 1px solid var(--borde); border-radius: 10px; overflow: hidden; background: var(--panel); }
.segmentado .seg { padding: .5rem 1rem; color: var(--texto); font-weight: 500; }
.segmentado .seg + .seg { border-left: 1px solid var(--borde); }
.segmentado .seg:hover { background: var(--fondo); text-decoration: none; }
.segmentado .seg.activo { background: var(--primario); color: #fff; }
.btn-filtros.con-filtros { border-color: var(--primario); color: var(--primario); }
.contador { display: inline-grid; place-items: center; min-width: 1.3rem; height: 1.3rem; border-radius: 999px; background: var(--primario); color: #fff; font-size: .75rem; }

.marca { letter-spacing: .04em; }

.t-resumen { font-size: .88rem; margin-top: .4rem; padding: .45rem .6rem; background: color-mix(in srgb, var(--primario) 5%, var(--panel));
  border-left: 3px solid var(--primario); border-radius: 0 6px 6px 0; }

.qr { background: #fff; display: inline-block; padding: .5rem; border-radius: 8px; border: 1px solid var(--borde); }
.qr svg { display: block; }
.clave-2fa { word-break: break-all; letter-spacing: .08em; }
.codigo-2fa { font-size: 1.9rem; letter-spacing: .45em; text-align: center; font-variant-numeric: tabular-nums; padding: .5rem .3rem .5rem .75rem; margin: .4rem 0 .8rem; }
.codigo-2fa::placeholder { color: color-mix(in srgb, var(--suave) 40%, transparent); }
.punto-aviso { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--aviso); vertical-align: middle; margin-left: .25rem; }
.form-cuenta { max-width: 420px; }
.activar-2fa > * { min-width: 0; }
.activar-2fa { display: grid; grid-template-columns: auto 1fr; gap: 1.5rem; align-items: start; margin-top: 1rem; }
.qr-col { display: flex; flex-direction: column; align-items: center; max-width: 220px; }
.qr-col .qr svg { width: 190px; height: 190px; }
.pasos { list-style: none; counter-reset: paso; padding: 0; margin: 0; }
.pasos > li { counter-increment: paso; position: relative; padding: 0 0 1rem 2.4rem; }
.pasos > li::before { content: counter(paso); position: absolute; left: 0; top: -.1rem; width: 1.7rem; height: 1.7rem; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: .85rem; background: var(--primario); color: #fff; }
.pasos > li:not(:last-child)::after { content: ""; position: absolute; left: .82rem; top: 1.75rem; bottom: .2rem; border-left: 2px solid var(--borde); }
.pasos > li > span { display: block; color: var(--suave); font-size: .9rem; margin-top: .15rem; }
.ok-2fa { display: flex; gap: .8rem; align-items: center; padding: .9rem 1rem; border-radius: var(--radio);
  background: color-mix(in srgb, var(--ok) 9%, transparent); border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent); }
.icono-ok { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: #fff; font-weight: 700; }
.login-codigo { text-align: center; }
.login-codigo .ayuda-login { text-align: left; }
.icono-circulo { width: 56px; height: 56px; margin: 0 auto .5rem; border-radius: 50%; display: grid; place-items: center; font-size: 1.6rem;
  background: color-mix(in srgb, var(--primario) 12%, transparent); }
.pasos-2fa { padding-left: 1.2rem; }

/* Acceso (login, código, solicitar): pantalla completa partida, panel de marca animado */
main.auth { max-width: none; padding: 0; }
.auth-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.auth-marca { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 2rem; padding: 2.5rem clamp(1.5rem, 4vw, 4rem);
  color: #e8eefb; background: linear-gradient(135deg, #0b1f44 0%, #123a7a 55%, #1f5fbf 100%); isolation: isolate; }
.auth-fondo { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.orbe { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; animation: flotar 18s ease-in-out infinite alternate; }
.o1 { width: 420px; height: 420px; background: #3b82f6; top: -120px; right: -100px; }
.o2 { width: 360px; height: 360px; background: #06b6d4; bottom: -140px; left: -80px; animation-duration: 22s; opacity: .35; }
.o3 { width: 260px; height: 260px; background: #818cf8; top: 45%; left: 55%; animation-duration: 26s; opacity: .3; }
.rejilla { position: absolute; inset: 0; opacity: .12;
  background-image: linear-gradient(rgb(255 255 255 / .5) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / .5) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%); }
@keyframes flotar { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(40px, 30px) scale(1.08); } 100% { transform: translate(-30px, 50px) scale(.95); } }
.auth-logo { display: inline-flex; align-items: center; gap: .6rem; color: #fff; font-weight: 800; font-size: 1.15rem; letter-spacing: .02em; }
.auth-logo:hover { text-decoration: none; }
.auth-logo img { width: 34px; height: 34px; border-radius: 8px; box-shadow: 0 0 0 1px rgb(255 255 255 / .25); }
.auth-texto { margin-top: auto; max-width: 540px; }
.auth-texto h2 { font-size: clamp(1.6rem, 2.6vw, 2.35rem); line-height: 1.15; margin: 0 0 .9rem; color: #fff; letter-spacing: -.01em; }
.auth-texto > p { color: #b9c8e6; font-size: 1.02rem; line-height: 1.55; margin: 0 0 1.6rem; }
.auth-ventajas { list-style: none; padding: 0; margin: 0; display: grid; gap: .9rem; }
.auth-ventajas li { display: flex; gap: .85rem; align-items: flex-start; opacity: 0; animation: entrar .6s ease-out forwards; }
.auth-ventajas li:nth-child(2) { animation-delay: .12s; } .auth-ventajas li:nth-child(3) { animation-delay: .24s; }
.auth-ventajas svg { flex: none; width: 38px; height: 38px; padding: 8px; border-radius: 10px; fill: none; stroke: #fff; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; background: rgb(255 255 255 / .1); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .15); }
.auth-ventajas span { color: #b9c8e6; font-size: .93rem; line-height: 1.45; }
.auth-ventajas b { display: block; color: #fff; font-size: .98rem; }
.auth-cifras { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1rem; margin: 0; padding: 1.2rem 0 0;
  border-top: 1px solid rgb(255 255 255 / .15); }
.auth-cifras dt { font-size: 1.7rem; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
.auth-cifras dd { margin: 0; color: #9fb3d9; font-size: .82rem; }
.auth-pie { margin: 0; font-size: .8rem; color: #8ea3cc; display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.auth-pie a { color: #c9d6f0; }
.punto-vivo { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 0 rgb(52 211 153 / .6); animation: latido 2s infinite; }
@keyframes latido { 70% { box-shadow: 0 0 0 9px rgb(52 211 153 / 0); } 100% { box-shadow: 0 0 0 0 rgb(52 211 153 / 0); } }
.auth-form { display: grid; place-items: center; padding: 2.5rem clamp(1.25rem, 4vw, 3.5rem); background: var(--panel); overflow-y: auto; }
.auth-caja { width: min(400px, 100%); animation: entrar .5s ease-out both; }
.auth-caja.ancha { width: min(640px, 100%); }
.auth-caja h1 { font-size: 1.75rem; margin: .4rem 0 .2rem; letter-spacing: -.01em; }
.auth-caja .sub { margin-bottom: 1.3rem; }
.auth-caja .btn.primario { transition: transform .15s, box-shadow .15s; }
.auth-caja .btn.primario:hover { transform: translateY(-1px); box-shadow: 0 6px 16px color-mix(in srgb, var(--primario) 35%, transparent); }
@keyframes entrar { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (max-width: 900px) {
  .auth-grid { grid-template-columns: 1fr; }
  .auth-marca { padding: 1.25rem 1.25rem 1.5rem; gap: 1rem; }
  .auth-texto { margin-top: 0; } .auth-texto > p, .auth-ventajas, .auth-pie { display: none; }
  .auth-texto h2 { font-size: 1.3rem; margin: 0; }
  .auth-cifras { padding-top: .8rem; } .auth-cifras dt { font-size: 1.25rem; }
  .auth-form { padding: 1.75rem 1.25rem 2.5rem; place-items: start center; }
}
@media (prefers-reduced-motion: reduce) { .orbe, .punto-vivo, .auth-ventajas li, .auth-caja, .cuenta-panel { animation: none !important; opacity: 1; } }

/* Mi cuenta: un solo bloque a todo el ancho, cabecera de marca y pestañas */
.perfil { background: var(--panel); border: 1px solid var(--borde); border-radius: 14px; box-shadow: var(--sombra); overflow: hidden; margin: .25rem 0 1rem; }
.perfil-cab { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap;
  padding: 2rem clamp(1.25rem, 3vw, 2.5rem); color: #fff; background: linear-gradient(120deg, #0b1f44 0%, #123a7a 55%, #1f5fbf 100%); }
.perfil-cab .orbe { filter: blur(50px); }
.perfil-cab .o1 { width: 320px; height: 320px; top: -160px; right: 10%; }
.perfil-cab .o2 { width: 260px; height: 260px; bottom: -180px; left: 20%; }
.perfil-avatar { width: 64px; height: 64px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 1.6rem; font-weight: 800;
  background: rgb(255 255 255 / .14); box-shadow: inset 0 0 0 2px rgb(255 255 255 / .35); backdrop-filter: blur(6px); }
.perfil-quien h1 { margin: 0; font-size: 1.5rem; color: #fff; letter-spacing: -.01em; }
.perfil-quien p { margin: .15rem 0 0; color: #b9c8e6; font-size: .92rem; }
.perfil-estado { margin-left: auto; display: inline-flex; align-items: center; gap: .5rem; padding: .45rem .9rem; border-radius: 999px; font-size: .85rem; font-weight: 600;
  background: rgb(255 255 255 / .1); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .2); backdrop-filter: blur(6px); }
.perfil-estado .punto { width: 8px; height: 8px; border-radius: 50%; }
.perfil-estado.on .punto { background: #34d399; animation: latido 2s infinite; }
.perfil-estado.off .punto { background: #fbbf24; box-shadow: 0 0 0 0 rgb(251 191 36 / .6); animation: latido-aviso 2s infinite; }
@keyframes latido-aviso { 70% { box-shadow: 0 0 0 9px rgb(251 191 36 / 0); } 100% { box-shadow: 0 0 0 0 rgb(251 191 36 / 0); } }
.perfil-tabs { display: flex; gap: .25rem; padding: 0 clamp(1rem, 3vw, 2.25rem); border-bottom: 1px solid var(--borde); }
.perfil-tabs button { position: relative; display: inline-flex; align-items: center; gap: .5rem; font: inherit; font-weight: 600; cursor: pointer;
  padding: 1rem .9rem; border: 0; background: none; color: var(--suave); transition: color .15s; }
.perfil-tabs button:hover { color: var(--texto); }
.perfil-tabs button::after { content: ""; position: absolute; left: .5rem; right: .5rem; bottom: -1px; height: 2px; border-radius: 2px;
  background: var(--primario); transform: scaleX(0); transition: transform .25s ease; }
.perfil-tabs button.activo { color: var(--primario); }
.perfil-tabs button.activo::after { transform: scaleX(1); }
.perfil-tabs svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.perfil-tabs .punto-aviso { margin-left: .1rem; }
.perfil-cuerpo { padding: clamp(1.25rem, 3vw, 2.5rem); }
.cuenta-panel { animation: entrar .35s ease-out both; }
.cuenta-panel h2 { margin: 0 0 .3rem; font-size: 1.35rem; letter-spacing: -.01em; }
.col-consejos { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 3rem; align-items: start; }
.form-cuenta { max-width: 460px; margin-top: 1.2rem; }
.consejos { background: var(--fondo); border: 1px solid var(--borde); border-radius: 12px; padding: 1.25rem 1.4rem; }
.consejos h3 { margin: 0 0 .7rem; font-size: 1rem; }
.requisitos { list-style: none; padding: 0; margin: 0 0 .8rem; display: grid; gap: .45rem; }
.requisitos li { display: flex; align-items: center; gap: .55rem; color: var(--suave); font-size: .92rem; transition: color .2s; }
.requisitos li::before { content: ""; width: 18px; height: 18px; flex: none; border-radius: 50%; border: 2px solid var(--borde); transition: all .2s;
  background: center / 11px no-repeat; }
.requisitos li.ok { color: var(--texto); }
.requisitos li.ok::before { border-color: var(--ok); background-color: var(--ok);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E"); }
.activar-2fa { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.activar-2fa > * { min-width: 0; }
.movil { display: flex; flex-direction: column; align-items: center; gap: .9rem; }
.movil-pantalla { position: relative; padding: 18px; border-radius: 28px; background: linear-gradient(160deg, #1b2a44, #0b1220);
  box-shadow: 0 18px 40px rgb(11 31 68 / .35), inset 0 0 0 1px rgb(255 255 255 / .08); }
.movil-pantalla .qr { border: 0; border-radius: 14px; padding: 12px; display: block; }
.movil-pantalla .qr svg { width: 220px; height: 220px; }
.escaner { position: absolute; left: 30px; right: 30px; top: 30px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, transparent, #3b82f6, transparent); box-shadow: 0 0 14px 2px rgb(59 130 246 / .55); animation: escanear 2.6s ease-in-out infinite; }
@keyframes escanear { 0%, 100% { transform: translateY(0); opacity: .2; } 10%, 90% { opacity: 1; } 50% { transform: translateY(240px); } }
.pasos { margin-top: 1.4rem; }
.form-codigo { display: flex; gap: .75rem; align-items: stretch; flex-wrap: wrap; margin-top: .7rem; }
.form-codigo .codigo-2fa { flex: 1 1 220px; max-width: 280px; margin: 0; }
.form-codigo .btn { flex: 0 0 auto; padding-inline: 1.4rem; }
.protegida { text-align: center; max-width: 520px; margin: 1rem auto; }
.escudo { width: 84px; height: 84px; margin: 0 auto 1rem; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in srgb, var(--ok) 12%, transparent); animation: entrar .5s ease-out both; }
.escudo svg { width: 42px; height: 42px; fill: none; stroke: var(--ok); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.protegida .ayuda-login { text-align: left; }
@media (max-width: 900px) { .col-consejos, .activar-2fa { grid-template-columns: 1fr; } .perfil-estado { margin-left: 0; } }
@media (prefers-reduced-motion: reduce) { .escaner, .perfil-estado .punto { animation: none !important; } }
[hidden] { display: none !important; }
.movil-pantalla .qr { display: grid; place-items: center; width: 244px; height: 244px; box-sizing: border-box; }
.movil-pantalla .qr svg { margin: 0 auto; }
.activar-2fa { align-items: center; }
.movil { justify-self: center; }

/* Medidor de seguridad de contraseña */
.medidor { margin: -.3rem 0 .9rem; max-width: 460px; }
.medidor-barras { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.medidor-barras i { height: 5px; border-radius: 3px; background: var(--borde); transition: background .3s ease; }
.medidor-texto { display: flex; gap: .5rem; align-items: baseline; flex-wrap: wrap; min-height: 1.3em; margin-top: .35rem; font-size: .85rem; }
.medidor-texto b { transition: color .3s; }
.medidor-texto span { color: var(--suave); }
.requisitos.en-linea { display: flex; flex-wrap: wrap; gap: .3rem .9rem; margin: .45rem 0 0; }
.requisitos.en-linea li { font-size: .82rem; }
.requisitos.en-linea li::before { width: 14px; height: 14px; background-size: 9px; }
.coincide { margin: -.3rem 0 .9rem; font-size: .85rem; min-height: 1.2em; font-weight: 600; }
.coincide.si { color: var(--ok); } .coincide.no { color: var(--peligro); }
input.campo-bien { border-color: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 15%, transparent); }
input.campo-mal { border-color: var(--peligro); box-shadow: 0 0 0 3px color-mix(in srgb, var(--peligro) 12%, transparent); }
button:disabled, .btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* Inicio: cabecera de marca, indicadores con icono y entrada escalonada */
.bienvenida { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
  padding: 2rem clamp(1.25rem, 3vw, 2.5rem); margin-bottom: 1.25rem; border-radius: 14px; color: #fff;
  background: linear-gradient(120deg, #0b1f44 0%, #123a7a 55%, #1f5fbf 100%); box-shadow: 0 10px 30px rgb(11 31 68 / .18); animation: entrar .25s ease-out both; }
.bienvenida .orbe { filter: blur(55px); }
.bienvenida .o1 { width: 340px; height: 340px; top: -170px; right: 8%; }
.bienvenida .o2 { width: 280px; height: 280px; bottom: -200px; left: 25%; }
.bienvenida h1 { margin: .1rem 0 .4rem; font-size: clamp(1.5rem, 2.6vw, 2.1rem); color: #fff; letter-spacing: -.015em; }
.bienvenida-fecha { margin: 0; color: #9fb3d9; font-size: .85rem; letter-spacing: .02em; }
.bienvenida-sub { margin: 0; color: #c9d6f0; font-size: 1rem; max-width: 640px; }
.bienvenida-sub b { color: #fff; }
.bienvenida-estado { display: flex; align-items: center; gap: .65rem; padding: .6rem .95rem; border-radius: 12px; font-size: .85rem; line-height: 1.35;
  background: rgb(255 255 255 / .08); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .16); backdrop-filter: blur(6px); }
.bienvenida-estado small { color: #9fb3d9; }
.kpis { gap: 1rem; }
.kpi { position: relative; display: flex; flex-direction: column; gap: .15rem; padding: 1rem 1.1rem; border-radius: 12px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s; }
.kpi:hover { transform: translateY(-3px); box-shadow: 0 12px 24px rgb(16 24 40 / .1); }
.kpi b { font-variant-numeric: tabular-nums; }
.kpi-ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; margin-bottom: .45rem; font-style: normal; }
.kpi-ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.kpi-ico.azul { color: #1f5fbf; background: color-mix(in srgb, #1f5fbf 12%, transparent); }
.kpi-ico.rojo { color: #d9480f; background: color-mix(in srgb, #d9480f 12%, transparent); }
.kpi-ico.violeta { color: #7048e8; background: color-mix(in srgb, #7048e8 12%, transparent); }
.kpi-ico.ambar { color: #d97706; background: color-mix(in srgb, #d97706 13%, transparent); }
.kpi-ico.verde { color: #2f9e44; background: color-mix(in srgb, #2f9e44 12%, transparent); }
.kpi.urgente { border-color: color-mix(in srgb, var(--peligro) 45%, var(--borde)); }
.kpi.urgente .kpi-ico { animation: latido-rojo 2s infinite; }
@keyframes latido-rojo { 0% { box-shadow: 0 0 0 0 rgb(217 72 15 / .45); } 70% { box-shadow: 0 0 0 10px rgb(217 72 15 / 0); } 100% { box-shadow: 0 0 0 0 rgb(217 72 15 / 0); } }
.inicio-cols { gap: 1.5rem; }
.panel-inicio { min-width: 0; }
.panel-cab { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: .4rem 0 .75rem; }
.panel-cab h2 { display: flex; align-items: center; gap: .5rem; margin: 0; font-size: 1.08rem; }
.panel-cab h2 svg { width: 20px; height: 20px; fill: none; stroke: var(--primario); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.panel-cab h2 small { margin-left: .2rem; }
.enlace-suave { font-size: .87rem; font-weight: 600; white-space: nowrap; }
.lista-tarjetas .tarjeta { transition: transform .2s ease, box-shadow .2s ease, border-color .2s; }
.lista-tarjetas .tarjeta:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgb(16 24 40 / .09); }
.vacio-bonito { display: flex; flex-direction: column; align-items: center; gap: .35rem; text-align: center; padding: 2rem 1.25rem;
  border: 1px dashed var(--borde); border-radius: 12px; color: var(--suave); background: var(--panel); }
.vacio-bonito svg { width: 34px; height: 34px; fill: none; stroke: var(--primario); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
  padding: 8px; box-sizing: content-box; border-radius: 50%; background: color-mix(in srgb, var(--primario) 10%, transparent); margin-bottom: .3rem; }
.vacio-bonito b { color: var(--texto); }
.vacio-bonito span { font-size: .9rem; max-width: 380px; }
/* Entrada escalonada: indicadores, paneles y tarjetas */
.aparece, .lista-tarjetas > .tarjeta { animation: entrar .25s ease-out both; }
.kpis > .kpi:nth-child(1) { animation-delay: .05s; } .kpis > .kpi:nth-child(2) { animation-delay: .1s; }
.kpis > .kpi:nth-child(3) { animation-delay: .15s; } .kpis > .kpi:nth-child(4) { animation-delay: .2s; }
.kpis > .kpi:nth-child(5) { animation-delay: .25s; }
.inicio-cols > .panel-inicio:nth-child(2) { animation-delay: .12s; }
.lista-tarjetas > .tarjeta:nth-child(1) { animation-delay: .25s; } .lista-tarjetas > .tarjeta:nth-child(2) { animation-delay: .3s; }
.lista-tarjetas > .tarjeta:nth-child(3) { animation-delay: .35s; } .lista-tarjetas > .tarjeta:nth-child(4) { animation-delay: .4s; }
.lista-tarjetas > .tarjeta:nth-child(5) { animation-delay: .45s; } .lista-tarjetas > .tarjeta:nth-child(n+6) { animation-delay: .5s; }
@media (max-width: 1000px) { .kpis { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .kpis { grid-template-columns: repeat(2, 1fr); } .bienvenida { align-items: flex-start; } }
@media (prefers-reduced-motion: reduce) { .bienvenida, .aparece, .lista-tarjetas > .tarjeta, .kpi.urgente .kpi-ico { animation: none !important; } }
.panel-cab .contador { margin-left: .35rem; padding: .05rem .5rem; border-radius: 999px; font-size: .78rem; font-weight: 700;
  background: color-mix(in srgb, var(--primario) 12%, transparent); color: var(--primario); }
.ver-mas { margin-top: .25rem; font-weight: 600; transition: background .15s, border-color .15s; }
.ver-mas:hover { background: color-mix(in srgb, var(--primario) 7%, var(--panel)); }
.filtro-activo { display: inline-block; margin: .2rem 0 0; padding: .3rem .7rem; border-radius: 8px; font-size: .88rem;
  background: color-mix(in srgb, var(--primario) 9%, transparent); color: var(--texto); }
.titulo-es { margin: -.35rem 0 .6rem; color: var(--suave); font-size: .95rem; font-style: italic; }
/* Marca: LICI + KRONOS en degradado; el logo gira un poco al pasar el ratón */
.marca-txt { font-weight: 800; letter-spacing: .04em; }
.marca-txt b { font-weight: 800; background: linear-gradient(90deg, #1f5fbf, #0ea5e9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-logo .marca-txt b { background: linear-gradient(90deg, #7dd3fc, #e0f2fe); -webkit-background-clip: text; background-clip: text; }
.marca img, .auth-logo img { transition: transform .4s cubic-bezier(.34, 1.56, .64, 1); }
.marca:hover img, .auth-logo:hover img { transform: rotate(-8deg) scale(1.06); }
.marca:hover { text-decoration: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .marca-txt b { background: linear-gradient(90deg, #5b9bff, #7dd3fc); -webkit-background-clip: text; background-clip: text; } }

/* Para ti: cabecera con el perfil, barra de IA, menú de grupos fijo y tarjetas en rejilla */
.parati-cab { align-items: center; }
.parati-cab h1 { display: flex; align-items: baseline; gap: .55rem; flex-wrap: wrap; }
.parati-cab h1 small { font-size: 1rem; font-weight: 500; color: #b9c8e6; }
.cifra-grande { font-variant-numeric: tabular-nums; background: linear-gradient(90deg, #ffffff, #7dd3fc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.chips-perfil { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.chip-perfil { padding: .25rem .65rem; border-radius: 999px; font-size: .8rem; font-weight: 500; color: #e0ebff;
  background: rgb(255 255 255 / .1); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .18); backdrop-filter: blur(4px); }
.chip-perfil.mas { font-weight: 700; }
.chip-perfil.zona, .chip-perfil.clasif { background: rgb(56 189 248 / .16); }
.parati-acciones { display: flex; gap: .5rem; flex-wrap: wrap; }
.btn-cristal { display: inline-flex; align-items: center; gap: .45rem; padding: .55rem .95rem; border-radius: 10px; color: #fff; font-weight: 600; font-size: .9rem;
  background: rgb(255 255 255 / .1); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .22); backdrop-filter: blur(6px); transition: background .2s, transform .2s; }
.btn-cristal:hover { background: rgb(255 255 255 / .2); transform: translateY(-1px); text-decoration: none; }
.btn-cristal svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.barra-ia-pro { position: relative; display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; padding: .9rem 1.1rem; margin-bottom: 1rem; border-radius: 12px;
  background: linear-gradient(var(--panel), var(--panel)) padding-box, linear-gradient(90deg, #7048e8, #1f5fbf, #0ea5e9) border-box; border: 1.5px solid transparent;
  box-shadow: var(--sombra); }
.ia-ico { width: 40px; height: 40px; flex: none; border-radius: 11px; display: grid; place-items: center; background: linear-gradient(135deg, #7048e8, #1f5fbf); }
.ia-ico svg { width: 22px; height: 22px; fill: #fff; animation: destello 3s ease-in-out infinite; }
@keyframes destello { 0%, 100% { transform: scale(1) rotate(0); opacity: 1; } 50% { transform: scale(1.12) rotate(8deg); opacity: .85; } }
.ia-texto { display: flex; flex-direction: column; flex: 1 1 260px; min-width: 0; font-size: .92rem; }
.ia-texto > span { color: var(--suave); }
.pastilla { display: inline-block; padding: .05rem .5rem; border-radius: 999px; font-size: .8rem; font-weight: 600; color: var(--primario);
  background: color-mix(in srgb, var(--primario) 10%, transparent); }
.grupos-nav { position: sticky; top: 62px; z-index: 5; display: flex; gap: .35rem; flex-wrap: wrap; padding: .4rem; margin-bottom: 1.1rem; border-radius: 12px;
  background: color-mix(in srgb, var(--panel) 88%, transparent); border: 1px solid var(--borde); backdrop-filter: blur(10px); box-shadow: var(--sombra); }
.grupos-nav a { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .8rem; border-radius: 9px; color: var(--texto); font-size: .9rem; font-weight: 600;
  transition: background .2s, color .2s; }
.grupos-nav a:hover { background: var(--fondo); text-decoration: none; }
.grupos-nav a i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.grupos-nav a b { padding: .02rem .45rem; border-radius: 999px; font-size: .78rem; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); }
.grupos-nav a.activo { background: color-mix(in srgb, var(--c) 12%, transparent); color: var(--c); }
.grupos-nav a.vacio { opacity: .45; }
.g-alta { --c: var(--alta); } .g-menor { --c: var(--menor); } .g-media { --c: var(--media); } .g-ute { --c: var(--ute); }
.grupo { scroll-margin-top: 130px; margin-bottom: 1.75rem; }
.grupo-cab { display: flex; align-items: center; gap: .8rem; margin: .4rem 0 .9rem; padding-left: .8rem; border-left: 4px solid var(--c); }
.grupo-cab h2 { margin: 0; display: flex; align-items: center; gap: .4rem; font-size: 1.15rem; }
.grupo-cab p { margin: .1rem 0 0; color: var(--suave); font-size: .88rem; }
.grupo-cab .contador { padding: .05rem .5rem; border-radius: 999px; font-size: .78rem; font-weight: 700; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); }
.grupo-ico { width: 38px; height: 38px; flex: none; border-radius: 10px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
.grupo-ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rejilla-tarjetas { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); gap: .85rem; align-items: start; }
.rejilla-tarjetas > .tarjeta { margin-bottom: 0; border-top: 3px solid color-mix(in srgb, var(--c) 55%, var(--borde)); }
@media (max-width: 640px) { .grupos-nav { top: 56px; } .grupos-nav a { font-size: .82rem; padding: .4rem .6rem; } }
@media (prefers-reduced-motion: reduce) { .ia-ico svg { animation: none; } }

/* Mis licitaciones: embudo de fases y tarjetas con cuenta atrás */
.conmutador { display: inline-flex; padding: 3px; border-radius: 10px; background: rgb(255 255 255 / .1); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .2); }
.conmutador a { padding: .45rem .9rem; border-radius: 8px; color: #c9d6f0; font-weight: 600; font-size: .9rem; transition: background .2s, color .2s; }
.conmutador a:hover { color: #fff; text-decoration: none; }
.conmutador a.activo { background: #fff; color: #123a7a; }
.e-activas { --c: var(--primario); } .e-interesa { --c: #d97706; } .e-estudio { --c: #1f5fbf; } .e-presentada { --c: #7048e8; }
.e-ganada { --c: #2f9e44; } .e-perdida { --c: #868e96; } .e-todas { --c: #495057; }
.embudo { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .6rem; margin-bottom: 1.25rem; }
.etapa { position: relative; display: flex; flex-direction: column; gap: .1rem; padding: .85rem .9rem .8rem; border-radius: 12px; color: var(--texto);
  background: var(--panel); border: 1px solid var(--borde); box-shadow: var(--sombra); overflow: hidden; transition: transform .2s, box-shadow .2s, border-color .2s; }
.etapa::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--c); transform: scaleX(0); transform-origin: left; transition: transform .3s ease; }
.etapa:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgb(16 24 40 / .09); text-decoration: none; }
.etapa:hover::after, .etapa.activo::after { transform: scaleX(1); }
.etapa.activo { border-color: color-mix(in srgb, var(--c) 55%, var(--borde)); background: color-mix(in srgb, var(--c) 6%, var(--panel)); }
.etapa b { font-size: 1.55rem; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--c); }
.etapa > span:last-child { color: var(--suave); font-size: .85rem; font-weight: 500; }
.etapa-ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; margin-bottom: .35rem; color: var(--c);
  background: color-mix(in srgb, var(--c) 12%, transparent); }
.etapa-ico svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lista-mis { display: grid; gap: .75rem; }
.mis-fila { --c: var(--primario); display: grid; grid-template-columns: minmax(0, 1fr) 120px; border-radius: 12px; overflow: hidden;
  background: var(--panel); border: 1px solid var(--borde); border-left: 4px solid var(--c); box-shadow: var(--sombra);
  transition: transform .2s ease, box-shadow .2s ease; animation: entrar .45s ease-out both; }
.mis-fila:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgb(16 24 40 / .09); }
.mis-fila.s-interesa { --c: #d97706; } .mis-fila.s-estudio { --c: #1f5fbf; } .mis-fila.s-presentada { --c: #7048e8; }
.mis-fila.s-ganada { --c: #2f9e44; } .mis-fila.s-perdida, .mis-fila.s-descartada { --c: #adb5bd; }
.mis-fila.s-perdida .mis-cuerpo, .mis-fila.s-descartada .mis-cuerpo { opacity: .75; }
.lista-mis > .mis-fila:nth-child(2) { animation-delay: .05s; } .lista-mis > .mis-fila:nth-child(3) { animation-delay: .1s; }
.lista-mis > .mis-fila:nth-child(4) { animation-delay: .15s; } .lista-mis > .mis-fila:nth-child(n+5) { animation-delay: .2s; }
.mis-cuerpo { padding: .85rem 1.1rem; min-width: 0; }
.mis-cuerpo h3 { margin: .4rem 0 .2rem; font-size: 1.02rem; line-height: 1.35; }
.mis-organo { margin: 0; color: var(--suave); font-size: .87rem; }
.mis-organo span { opacity: .8; }
.mis-pie { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .9rem; margin-top: .55rem; font-size: .87rem; }
.mis-pie .importe { font-weight: 700; }
.mis-pie .dato { color: var(--suave); }
.mis-pie .dato b { color: var(--texto); }
.mis-pie .aviso-dato { color: var(--aviso); font-weight: 600; }
.quien { display: inline-flex; align-items: center; gap: .35rem; margin-left: auto; font-size: .82rem; color: var(--suave); }
.mini-avatar { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: .7rem; font-weight: 700;
  background: color-mix(in srgb, var(--primario) 14%, transparent); color: var(--primario); }
.cuenta-atras { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .05rem; padding: .7rem .5rem; text-align: center;
  color: var(--texto); background: color-mix(in srgb, var(--c) 6%, var(--fondo)); border-left: 1px solid var(--borde); }
.cuenta-atras:hover { text-decoration: none; background: color-mix(in srgb, var(--c) 11%, var(--fondo)); }
.cuenta-atras b { font-size: 1.9rem; line-height: 1; font-variant-numeric: tabular-nums; }
.cuenta-atras span { font-size: .78rem; font-weight: 600; color: var(--suave); text-transform: uppercase; letter-spacing: .05em; }
.cuenta-atras small { font-size: .74rem; color: var(--suave); margin-top: .2rem; }
.cuenta-atras.pronto b { color: var(--aviso); }
.cuenta-atras.urgente { background: color-mix(in srgb, var(--peligro) 9%, var(--fondo)); }
.cuenta-atras.urgente b { color: var(--peligro); animation: latido-texto 1.6s ease-in-out infinite; }
@keyframes latido-texto { 50% { transform: scale(1.08); } }
.cuenta-atras.cerrada b, .cuenta-atras.pasada b { font-size: 1.5rem; color: var(--suave); }
.mis-fila.prio { box-shadow: var(--sombra), 0 0 0 1px color-mix(in srgb, var(--peligro) 35%, transparent); }
@media (max-width: 1100px) { .embudo { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 640px) { .embudo { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mis-fila { grid-template-columns: minmax(0, 1fr) 88px; }
  .cuenta-atras b { font-size: 1.5rem; } }
@media (prefers-reduced-motion: reduce) { .mis-fila, .cuenta-atras.urgente b { animation: none !important; } }

/* Competencia: cabecera con buscador, podio y ranking con barras */
.comp-cab { align-items: flex-end; }
.comp-cifras { display: flex; gap: 1.75rem; flex-wrap: wrap; margin-top: 1rem; }
.comp-cifras div { display: flex; flex-direction: column; }
.comp-cifras b { font-size: 1.45rem; color: #fff; font-variant-numeric: tabular-nums; }
.comp-cifras span { font-size: .8rem; color: #9fb3d9; }
.comp-busqueda { display: flex; flex-direction: column; gap: .6rem; width: min(440px, 100%); }
.comp-campo { position: relative; }
.comp-campo svg { position: absolute; left: .85rem; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); fill: none; stroke: #9fb3d9; stroke-width: 2; stroke-linecap: round; }
.comp-campo input { width: 100%; padding: .75rem .9rem .75rem 2.5rem; border-radius: 11px; border: 0; color: #fff; font-size: 1rem;
  background: rgb(255 255 255 / .12); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .25); backdrop-filter: blur(6px); }
.comp-campo input::placeholder { color: #9fb3d9; }
.comp-campo input:focus { outline: none; background: rgb(255 255 255 / .18); box-shadow: inset 0 0 0 2px #7dd3fc; }
.comp-opciones { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.comp-opciones select { flex: 1 1 180px; width: auto; color: #fff; border: 0; border-radius: 10px; background-color: rgb(255 255 255 / .12);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .22); }
.comp-opciones select option { color: #1c2430; }
.interruptor { display: inline-flex; align-items: center; gap: .45rem; color: #e0ebff; font-size: .88rem; font-weight: 500; cursor: pointer; white-space: nowrap; }
.interruptor input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.interruptor span { position: relative; width: 36px; height: 20px; border-radius: 999px; background: rgb(255 255 255 / .22); transition: background .2s; }
.interruptor span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; }
.interruptor input:checked + span { background: #38bdf8; }
.interruptor input:checked + span::after { transform: translateX(16px); }
.interruptor input:focus-visible + span { outline: 2px solid #7dd3fc; outline-offset: 2px; }
.avatar-emp { width: 42px; height: 42px; flex: none; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: .95rem; color: #fff; letter-spacing: .02em; }
.avatar-emp.c0 { background: linear-gradient(135deg, #1f5fbf, #38bdf8); } .avatar-emp.c1 { background: linear-gradient(135deg, #7048e8, #a78bfa); }
.avatar-emp.c2 { background: linear-gradient(135deg, #0f766e, #2dd4bf); } .avatar-emp.c3 { background: linear-gradient(135deg, #c2410c, #fb923c); }
.avatar-emp.c4 { background: linear-gradient(135deg, #be123c, #fb7185); } .avatar-emp.c5 { background: linear-gradient(135deg, #4d7c0f, #a3e635); }
.podio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.25rem; align-items: end; }
.podio-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: .45rem; text-align: center; padding: 1.4rem 1rem 1.1rem;
  border-radius: 14px; background: var(--panel); border: 1px solid var(--borde); box-shadow: var(--sombra); color: var(--texto); transition: transform .2s, box-shadow .2s; }
.podio-item:hover { transform: translateY(-4px); box-shadow: 0 16px 30px rgb(16 24 40 / .12); text-decoration: none; }
.podio-item.puesto-1 { order: 2; padding-top: 2rem; border-color: #f2c94c; background: linear-gradient(180deg, color-mix(in srgb, #f2c94c 14%, var(--panel)), var(--panel)); }
.podio-item.puesto-2 { order: 1; } .podio-item.puesto-3 { order: 3; }
.podio-item .avatar-emp { width: 56px; height: 56px; font-size: 1.15rem; border-radius: 16px; }
.medalla { position: absolute; top: -14px; font-size: 1.7rem; filter: drop-shadow(0 3px 4px rgb(0 0 0 / .18)); }
.podio-nombre { font-size: .95rem; line-height: 1.3; }
.podio-dato { color: var(--suave); font-size: .85rem; }
.ranking { display: grid; gap: .55rem; }
.rank-fila { display: flex; align-items: center; gap: .9rem; padding: .8rem 1rem; border-radius: 12px; color: var(--texto);
  background: var(--panel); border: 1px solid var(--borde); box-shadow: var(--sombra); transition: transform .2s, box-shadow .2s, border-color .2s; }
.rank-fila:hover { transform: translateX(4px); border-color: color-mix(in srgb, var(--primario) 40%, var(--borde)); text-decoration: none; }
.rank-pos { width: 28px; flex: none; text-align: center; font-weight: 800; color: var(--suave); font-variant-numeric: tabular-nums; }
.rank-info { flex: 1; min-width: 0; }
.rank-nombre { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.rank-nombre b { font-size: .98rem; }
.rank-nombre small { color: var(--suave); font-size: .78rem; }
.rank-barra { height: 6px; margin: .4rem 0 .45rem; border-radius: 999px; background: var(--fondo); overflow: hidden; max-width: 520px; }
.rank-barra span { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #1f5fbf, #38bdf8);
  transition: width 1s cubic-bezier(.22, 1, .36, 1); }
.rank-chips { display: flex; flex-wrap: wrap; gap: .3rem; }
.mc { padding: .1rem .5rem; border-radius: 999px; font-size: .76rem; font-weight: 600; background: var(--fondo); color: var(--suave); }
.mc.ok { background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ok); }
.mc.menor { background: color-mix(in srgb, var(--menor) 12%, transparent); color: var(--menor); }
.mc.actas { background: color-mix(in srgb, var(--primario) 10%, transparent); color: var(--primario); }
.mc.nuestra { background: color-mix(in srgb, var(--ute) 12%, transparent); color: var(--ute); }
.mc.cliente { font-weight: 500; }
.rank-importe { flex: none; display: flex; flex-direction: column; align-items: flex-end; font-weight: 800; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.rank-importe small { font-weight: 500; font-size: .74rem; color: var(--suave); }
@media (max-width: 760px) { .podio { grid-template-columns: 1fr; } .podio-item.puesto-1, .podio-item.puesto-2, .podio-item.puesto-3 { order: 0; }
  .rank-importe { display: none; } .rank-pos { display: none; } }
@media (prefers-reduced-motion: reduce) { .rank-barra span { transition: none; } }
/* Competencia: el formulario de la cabecera no hereda el estilo general de campos y etiquetas */
.comp-busqueda .comp-campo input[type=search] { background: rgb(255 255 255 / .14); color: #fff; border: 0; }
.comp-busqueda .comp-opciones select { background-color: rgb(255 255 255 / .14); color: #fff; border: 0; padding: .55rem .7rem; }
.comp-busqueda label.interruptor { display: inline-flex; position: relative; margin: 0; padding: .45rem .75rem; border-radius: 10px;
  background: rgb(255 255 255 / .1); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .2); }
.comp-busqueda label.interruptor input[type=checkbox] { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }

/* Mi empresa: anillo de progreso y barra de guardar */
.emp-cab { align-items: center; }
.anillo { position: relative; width: 132px; flex: none; display: flex; flex-direction: column; align-items: center; gap: .2rem; }
.anillo svg { width: 112px; height: 112px; transform: rotate(-90deg); }
.anillo circle { fill: none; stroke-width: 8; }
.anillo-fondo { stroke: rgb(255 255 255 / .14); }
.anillo-valor { stroke: #38bdf8; stroke-linecap: round; transition: stroke-dashoffset 1.2s cubic-bezier(.22, 1, .36, 1); animation: llenar-anillo 1.2s cubic-bezier(.22, 1, .36, 1) both; }
.anillo-valor.completo { stroke: #34d399; }
@keyframes llenar-anillo { from { stroke-dashoffset: 213.6; } }
.anillo > span { position: absolute; top: 56px; left: 50%; transform: translate(-50%, -50%); display: flex; align-items: baseline; color: #fff; }
.anillo > span b { font-size: 1.8rem; font-variant-numeric: tabular-nums; }
.anillo > span small { font-size: .9rem; margin-left: 1px; color: #b9c8e6; }
.anillo em { font-style: normal; font-size: .8rem; color: #b9c8e6; }
.ficha-empresa fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.ficha-empresa .perfil-tabs { overflow-x: auto; scrollbar-width: thin; }
.ficha-empresa .perfil-tabs button { white-space: nowrap; }
.ficha-empresa .cuenta-panel > h2 { margin-bottom: .8rem; }
.barra-guardar-pro { position: sticky; bottom: 0; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  margin: 1.5rem calc(-1 * clamp(1.25rem, 3vw, 2.5rem)) calc(-1 * clamp(1.25rem, 3vw, 2.5rem)); padding: .9rem clamp(1.25rem, 3vw, 2.5rem);
  border-top: 1px solid var(--borde); background: color-mix(in srgb, var(--panel) 92%, transparent); backdrop-filter: blur(8px); }
/* Plataforma y Usuarios: tarjetas de administración */
.rejilla-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: .9rem; margin-bottom: 1.5rem; align-items: start; }
.tarjeta-admin { display: flex; flex-direction: column; gap: .7rem; padding: 1rem 1.1rem; border-radius: 14px; background: var(--panel);
  border: 1px solid var(--borde); box-shadow: var(--sombra); transition: transform .2s, box-shadow .2s; }
.tarjeta-admin:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgb(16 24 40 / .1); }
.tarjeta-admin.pendiente { border-color: color-mix(in srgb, #d97706 45%, var(--borde)); background: linear-gradient(180deg, color-mix(in srgb, #d97706 7%, var(--panel)), var(--panel)); }
.tarjeta-admin.estado-suspendida, .tarjeta-admin.apagado { opacity: .7; }
.ta-cab { display: flex; align-items: center; gap: .75rem; }
.ta-cab > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ta-cab b { overflow-wrap: anywhere; }
.ta-cab small { color: var(--suave); font-size: .8rem; overflow-wrap: anywhere; }
.avatar-emp.redondo { border-radius: 50%; }
.pildora-estado { flex: none; display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .6rem; border-radius: 999px; font-size: .76rem; font-weight: 700; }
.pildora-estado i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pildora-estado.activa { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.pildora-estado.suspendida { color: var(--suave); background: var(--fondo); }
.pildora-estado.bloqueado { color: var(--peligro); background: color-mix(in srgb, var(--peligro) 11%, transparent); }
.ta-uso-txt { display: flex; justify-content: space-between; font-size: .84rem; color: var(--suave); }
.ta-uso .rank-barra { max-width: none; margin: .3rem 0 0; }
.rank-barra span.lleno { background: linear-gradient(90deg, #d97706, #ef4444); }
.ta-metricas { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; font-size: .85rem; color: var(--suave); }
.ta-metricas b { color: var(--texto); }
.ta-chips { display: flex; flex-wrap: wrap; gap: .3rem; }
.ta-datos, .ta-nota { margin: 0; font-size: .85rem; color: var(--suave); overflow-wrap: anywhere; }
.ta-nota { padding: .45rem .6rem; border-radius: 8px; background: var(--fondo); }
.ta-acciones { display: flex; flex-wrap: wrap; gap: .4rem; align-items: flex-start; padding-top: .6rem; border-top: 1px solid var(--borde); }
.ta-acciones form { margin: 0; }
.btn.peligro-suave { color: var(--peligro); border-color: color-mix(in srgb, var(--peligro) 35%, var(--borde)); }
.btn.peligro-suave:hover { background: color-mix(in srgb, var(--peligro) 8%, var(--panel)); border-color: var(--peligro); }
.editar-admin[open] { flex-basis: 100%; }
.editar-panel { display: grid; gap: .6rem; margin-top: .6rem; padding: .8rem; border-radius: 10px; background: var(--fondo); }
.editar-panel .form-mini { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .45rem; }
.form-linea { display: flex; gap: .45rem; align-items: center; }
.form-linea input { flex: 1; }
.desplegable-alta { margin-bottom: 1.25rem; border-radius: 14px; background: var(--panel); border: 1px dashed color-mix(in srgb, var(--primario) 40%, var(--borde)); box-shadow: var(--sombra); }
.desplegable-alta[open] { border-style: solid; }
.desplegable-alta summary { display: flex; align-items: center; gap: .6rem; padding: .9rem 1.1rem; cursor: pointer; font-weight: 700; color: var(--primario); list-style: none; }
.desplegable-alta summary::-webkit-details-marker { display: none; }
.desplegable-alta > form, .desplegable-alta > p { padding: 0 1.1rem; }
.desplegable-alta > p { padding-bottom: 1rem; }
.mini-ico { width: 30px; height: 30px; border-radius: 9px; }
.mini-ico svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; animation: none; }
.desplegable-alta[open] .mini-ico svg { transform: rotate(45deg); transition: transform .25s; }
.pendientes .panel-cab h2 { gap: .55rem; }
.punto-vivo.ambar { background: #f59e0b; animation: latido-aviso 2s infinite; }
.ficha-empresa .rejilla-campos { gap: .2rem 1.25rem; }
.ficha-empresa .rejilla-campos > label { align-content: start; align-items: start; }
.ficha-empresa .rejilla-campos > label > input, .ficha-empresa .rejilla-campos > label > select { align-self: start; }

/* Vencimientos: barra, calendario de barras y filas con cuenta atrás */
.venc-barra { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.venc-barra .contador { margin-left: .3rem; }
.venc-calendario { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(34px, 1fr); gap: .35rem; align-items: end;
  padding: 1rem 1rem .6rem; margin-bottom: 1.25rem; border-radius: 14px; background: var(--panel); border: 1px solid var(--borde);
  box-shadow: var(--sombra); overflow-x: auto; }
.venc-calendario.compacto { padding: .6rem 0 0; margin: 0; border: 0; box-shadow: none; background: none; }
.cal-mes { display: flex; flex-direction: column; align-items: center; gap: .25rem; min-width: 0; }
.cal-mes b { font-size: .78rem; min-height: 1em; font-variant-numeric: tabular-nums; }
.cal-col { width: 100%; max-width: 34px; height: 90px; display: flex; align-items: flex-end; border-radius: 7px; background: var(--fondo); overflow: hidden; }
.cal-col span { display: block; width: 100%; height: 0; border-radius: 7px; background: linear-gradient(0deg, #1f5fbf, #38bdf8);
  transition: height 1s cubic-bezier(.22, 1, .36, 1); }
.cal-mes:nth-child(-n+3) .cal-col span { background: linear-gradient(0deg, #c2410c, #fb923c); }
.venc-calendario.compacto .cal-col span { background: linear-gradient(0deg, #1f5fbf, #38bdf8); }
.cal-mes small { color: var(--suave); font-size: .7rem; text-align: center; line-height: 1.2; }
.venc-lista { display: grid; gap: .7rem; }
.venc-fila { display: flex; gap: 1rem; align-items: flex-start; padding: 1rem 1.1rem; border-radius: 14px; background: var(--panel);
  border: 1px solid var(--borde); border-left: 4px solid var(--primario); box-shadow: var(--sombra); transition: transform .2s, box-shadow .2s; }
.venc-fila:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgb(16 24 40 / .1); }
.venc-fila.pronto { border-left-color: var(--media); }
.venc-fila.urgente { border-left-color: var(--alta); }
.venc-reloj { flex: none; width: 74px; display: flex; flex-direction: column; align-items: center; padding: .55rem .3rem; border-radius: 12px;
  background: color-mix(in srgb, var(--primario) 9%, transparent); color: var(--primario); text-align: center; }
.venc-fila.pronto .venc-reloj { background: color-mix(in srgb, var(--media) 12%, transparent); color: var(--media); }
.venc-fila.urgente .venc-reloj { background: color-mix(in srgb, var(--alta) 12%, transparent); color: var(--alta); }
.venc-reloj b { font-size: 1.6rem; line-height: 1; font-variant-numeric: tabular-nums; }
.venc-reloj span { font-size: .75rem; font-weight: 600; }
.venc-reloj small { margin-top: .3rem; font-size: .7rem; color: var(--suave); }
.venc-cuerpo { flex: 1; min-width: 0; }
.venc-cuerpo h3 { margin: .35rem 0 .25rem; font-size: 1rem; line-height: 1.35; overflow-wrap: anywhere; }
.venc-chips { display: flex; flex-wrap: wrap; gap: .3rem; }
.venc-chips a.mc:hover { text-decoration: none; filter: brightness(.95); }
.venc-organo, .venc-fechas { margin: .15rem 0; font-size: .86rem; color: var(--suave); overflow-wrap: anywhere; }
.venc-ganador { display: flex; flex-wrap: wrap; gap: .35rem .6rem; align-items: center; margin: .45rem 0 .3rem; }
.venc-emp, .intel-emp { display: inline-flex; align-items: center; gap: .45rem; color: var(--texto); font-size: .88rem; font-weight: 600; }
.venc-emp:hover, .intel-emp:hover { text-decoration: none; color: var(--primario); }
.avatar-emp.mini { width: 28px; height: 28px; border-radius: 8px; font-size: .68rem; }
.venc-lado { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: .45rem; }
.venc-lado form { margin: 0; }
.btn.vigilando { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, var(--borde)); background: color-mix(in srgb, var(--ok) 8%, var(--panel)); }
@media (max-width: 700px) {
  .venc-fila { flex-wrap: wrap; }
  .venc-reloj { flex-direction: row; gap: .35rem; width: auto; padding: .35rem .7rem; align-items: baseline; }
  .venc-reloj b { font-size: 1.2rem; }
  .venc-reloj small { margin: 0 0 0 .3rem; }
  .venc-cuerpo { flex-basis: 100%; }
  .venc-lado { flex-direction: row; align-items: center; flex-wrap: wrap; width: 100%; }
  .venc-lado .rank-importe { margin-right: auto; align-items: flex-start; }
}

/* Inicio: contratos que vencen */
.venc-mini { display: grid; gap: .5rem; }
.venc-mini a { display: flex; gap: .7rem; align-items: center; padding: .6rem .75rem; border-radius: 12px; background: var(--panel);
  border: 1px solid var(--borde); color: var(--texto); box-shadow: var(--sombra); transition: transform .2s; }
.venc-mini a:hover { text-decoration: none; transform: translateX(4px); border-color: color-mix(in srgb, var(--primario) 40%, var(--borde)); }
.venc-mini .venc-reloj { width: 58px; padding: .35rem .2rem; }
.venc-mini .venc-reloj b { font-size: 1.2rem; }
.venc-mini div { min-width: 0; display: flex; flex-direction: column; }
.venc-mini div b { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.venc-mini div small { color: var(--suave); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Ficha de órgano */
.org-rejilla { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.org-rejilla > .caja { margin: 0; }
.org-barras { display: grid; gap: .5rem; }
.org-barra { display: flex; align-items: center; gap: .65rem; color: var(--texto); padding: .25rem 0; }
a.org-barra:hover { text-decoration: none; color: var(--primario); }
.org-barra > div { flex: 1; min-width: 0; }
.org-barra > div b { display: block; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.org-barra .rank-barra { margin: .3rem 0 0; max-width: none; }
.org-num { flex: none; display: flex; flex-direction: column; align-items: flex-end; font-weight: 800; font-variant-numeric: tabular-nums; }
.org-num small { font-weight: 500; font-size: .72rem; color: var(--suave); }
.org-cpv { flex: none; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-size: .72rem; font-weight: 800;
  color: var(--primario); background: color-mix(in srgb, var(--primario) 10%, transparent); }
.org-h3 { margin: 1.1rem 0 0; font-size: .9rem; color: var(--suave); }

/* Nota de encaje 0-10 */
.nota10 { display: inline-grid; place-items: center; min-width: 2.3rem; height: 1.55rem; margin-right: .4rem; padding: 0 .4rem; border-radius: 8px;
  font-size: .82rem; font-weight: 800; font-variant-numeric: tabular-nums; color: #fff; background: #94a3b8; vertical-align: middle; }
.nota10.n7, .nota10.n8, .nota10.n9, .nota10.n10 { background: linear-gradient(135deg, #15803d, #22c55e); }
.nota10.n5, .nota10.n6 { background: linear-gradient(135deg, #1f5fbf, #38bdf8); }
.nota10.n3, .nota10.n4 { background: linear-gradient(135deg, #b45309, #f59e0b); }
.ficha-cab.con-nota { position: relative; padding-right: 9.5rem; }
.nota10-bloque { position: absolute; top: 0; right: 0; width: 8.5rem; z-index: 3; }
.nota10-bloque summary { position: relative; display: flex; flex-direction: column; align-items: center; cursor: pointer; list-style: none; text-align: center; }
.nota10-bloque summary::-webkit-details-marker { display: none; }
.nota10-bloque svg { width: 92px; height: 92px; transform: rotate(-90deg); }
.nota10-bloque circle { fill: none; stroke-width: 7; }
.n10-fondo { stroke: var(--borde); }
.n10-valor { stroke: #94a3b8; stroke-linecap: round; animation: llenar-anillo 1.2s cubic-bezier(.22, 1, .36, 1) both; }
.nota10-bloque.n7 .n10-valor, .nota10-bloque.n8 .n10-valor, .nota10-bloque.n9 .n10-valor, .nota10-bloque.n10 .n10-valor { stroke: #22c55e; }
.nota10-bloque.n5 .n10-valor, .nota10-bloque.n6 .n10-valor { stroke: #38bdf8; }
.nota10-bloque.n3 .n10-valor, .nota10-bloque.n4 .n10-valor { stroke: #f59e0b; }
.nota10-bloque summary b { position: absolute; top: 46px; left: 50%; transform: translate(-50%, -50%); font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.nota10-bloque summary small { font-size: .74rem; color: var(--suave); }
.nota10-bloque ul { list-style: none; margin: .5rem 0 0; padding: .6rem .7rem; width: 17rem; position: relative; right: 8.5rem; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--borde); box-shadow: 0 14px 30px rgb(16 24 40 / .16); font-size: .82rem; }
.nota10-bloque li { display: flex; gap: .5rem; padding: .2rem 0; }
.nota10-bloque li span { flex: none; width: 2.4rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.nota10-bloque li.mas span { color: var(--ok); }
.nota10-bloque li.menos span { color: var(--peligro); }
@media (max-width: 700px) {
  .ficha-cab.con-nota { padding-right: 0; }
  .nota10-bloque { position: static; width: auto; margin-bottom: .6rem; }
  .nota10-bloque summary { flex-direction: row; gap: .6rem; }
  .nota10-bloque svg { width: 60px; height: 60px; }
  .nota10-bloque summary b { top: 50%; left: 30px; font-size: 1.1rem; }
  .nota10-bloque ul { right: 0; width: auto; }
}

/* Inteligencia de mercado y preguntas al pliego */
.intel .dato-grande.destacado { background: linear-gradient(135deg, color-mix(in srgb, #22c55e 12%, var(--panel)), var(--panel)); border-color: color-mix(in srgb, #22c55e 45%, var(--borde)); }
.intel .dato-grande small { display: block; color: var(--suave); font-size: .76rem; margin-top: .15rem; }
.intel-anterior { padding: .8rem .9rem; margin-bottom: .9rem; border-radius: 10px; background: var(--fondo); border: 1px dashed var(--borde); }
.intel-etq { display: block; font-size: .78rem; font-weight: 700; color: var(--suave); margin-bottom: .25rem; }
.intel-anterior p { margin: .35rem 0 0; font-size: .88rem; }
.intel h3 { font-size: .95rem; margin: .4rem 0 .5rem; }
.intel-comp { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: .5rem; margin-bottom: .6rem; }
.intel-emp { padding: .5rem .6rem; border-radius: 10px; border: 1px solid var(--borde); background: var(--panel); min-width: 0; }
.intel-emp > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.intel-emp b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.intel-emp small { font-weight: 500; color: var(--suave); font-size: .75rem; }
.pregunta-form { display: flex; gap: .5rem; }
.pregunta-form input { flex: 1; min-width: 0; }
.sugerencias { display: flex; flex-wrap: wrap; gap: .35rem; margin: .6rem 0 .8rem; }
.sugerencias .chip { cursor: pointer; border: 1px solid var(--borde); background: var(--panel); color: var(--texto); font: inherit; font-size: .8rem; }
.sugerencias .chip:hover { border-color: var(--primario); color: var(--primario); }
.pregunta-item { padding: .7rem 0; border-top: 1px solid var(--borde); }
.pregunta-q { margin: 0 0 .3rem; }
.pregunta-q small { color: var(--suave); font-weight: 400; }
.pregunta-r { margin: 0; padding: .6rem .8rem; border-radius: 10px; background: color-mix(in srgb, var(--primario) 7%, var(--panel)); }
.pregunta-item details { margin-top: .35rem; font-size: .85rem; }
.cal-enlace { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.cal-enlace input { flex: 1 1 320px; font-family: ui-monospace, monospace; font-size: .8rem; }
@media (prefers-reduced-motion: reduce) { .venc-fila, .n10-valor, .cal-col span { animation: none !important; transition: none !important; } }
.desplegable-alta > .cal-enlace { padding: 0 1.1rem .4rem; }
.desplegable-alta > form:last-child { padding-bottom: 1rem; }
.portada-mercado { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: .8rem; max-width: 860px; margin: 1.5rem auto 0; }
.portada-mercado > div { display: flex; flex-direction: column; gap: .2rem; padding: .9rem 1rem; border-radius: 14px; background: var(--panel); border: 1px solid var(--borde); box-shadow: var(--sombra); text-align: center; }
.portada-mercado > div > b { font-size: 1.6rem; color: var(--primario); font-variant-numeric: tabular-nums; }
.portada-mercado span { color: var(--suave); font-size: .85rem; }
nav#nav > a { white-space: nowrap; }
@media (min-width: 721px) and (max-width: 1280px) {
  nav#nav > a { padding: .45rem .6rem; }
  nav#nav > a:not(.activo) > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* Ayuda: botón flotante y página */
.boton-ayuda { position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 50; width: 46px; height: 46px; border-radius: 50%; display: grid;
  place-items: center; font-size: 1.35rem; font-weight: 800; color: #fff; background: linear-gradient(135deg, #1f5fbf, #38bdf8);
  box-shadow: 0 10px 24px rgb(31 95 191 / .35); transition: transform .2s, box-shadow .2s; }
.boton-ayuda:hover { transform: translateY(-2px) scale(1.05); box-shadow: 0 14px 30px rgb(31 95 191 / .45); text-decoration: none; color: #fff; }
.ayuda-rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.ayuda-tarjeta { display: flex; flex-direction: column; gap: .5rem; padding: 1.1rem 1.2rem; border-radius: 14px; background: var(--panel);
  border: 1px solid var(--borde); box-shadow: var(--sombra); scroll-margin-top: 90px; }
.ayuda-tarjeta.resaltada, .ayuda-tarjeta:target { border-color: var(--primario); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primario) 22%, transparent), var(--sombra); }
.ayuda-tarjeta h2 { display: flex; align-items: center; gap: .55rem; margin: 0; font-size: 1.1rem; }
.ayuda-ico { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 10px; font-size: 1.15rem;
  background: color-mix(in srgb, var(--primario) 10%, transparent); }
.ayuda-para { margin: 0; font-weight: 600; }
.ayuda-tarjeta ul { margin: 0; padding-left: 1.15rem; color: var(--suave); font-size: .9rem; display: grid; gap: .25rem; }
.ayuda-consejo { margin: .2rem 0 0; padding: .5rem .7rem; border-radius: 9px; font-size: .86rem; background: color-mix(in srgb, #f59e0b 10%, var(--panel)); }
.ayuda-tarjeta .btn { align-self: flex-start; margin-top: auto; }
a.chip-perfil:hover { text-decoration: none; background: rgb(255 255 255 / .22); }
@media print { .boton-ayuda { display: none; } }
.barra-guardar-pro { padding-right: 4.75rem; }

/* inicio compacto: cifras en una fila, vencimientos en la columna de la izquierda */
.kpis:has(> .kpi:nth-child(6)) { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 1000px) { .kpis:has(> .kpi:nth-child(6)) { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .kpis:has(> .kpi:nth-child(6)) { grid-template-columns: repeat(2, 1fr); } }
.col-inicio { display: grid; gap: 1.5rem; min-width: 0; }
.venc-inicio .venc-mini div b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.t-resumen.pendiente { color: var(--suave); font-style: italic; }
.inicio-cols > *, .venc-inicio .venc-mini { min-width: 0; }
.venc-inicio .venc-mini { grid-template-columns: minmax(0, 1fr); }
.venc-inicio .venc-mini a { min-width: 0; }
.venc-inicio .venc-mini div { flex: 1; }

/* pestañas «antes de que salga»: vencimientos y consultas previas */
.pestanas-antes { display: flex; gap: .4rem; margin-bottom: .9rem; flex-wrap: wrap; }
.pestanas-antes a { padding: .5rem 1rem; border-radius: 999px; border: 1px solid var(--borde); background: var(--panel); color: var(--texto); font-weight: 600; font-size: .92rem; }
.pestanas-antes a:hover { text-decoration: none; border-color: color-mix(in srgb, var(--primario) 45%, var(--borde)); }
.pestanas-antes a.activo { background: var(--primario); border-color: var(--primario); color: #fff; }
.aviso-consultas { display: flex; align-items: center; gap: .8rem; padding: .8rem 1rem; border-radius: var(--radio); color: var(--texto);
  border: 1px solid color-mix(in srgb, var(--media) 40%, var(--borde)); background: color-mix(in srgb, var(--media) 8%, var(--panel)); }
.aviso-consultas:hover { text-decoration: none; border-color: var(--media); }
.aviso-consultas .ac-num { flex: none; min-width: 2.6rem; height: 2.6rem; display: grid; place-items: center; border-radius: 12px; font-size: 1.3rem; font-weight: 800;
  color: var(--media); background: color-mix(in srgb, var(--media) 15%, transparent); }
.aviso-consultas b { display: block; }
.aviso-consultas small { color: var(--suave); }
.aviso-consultas .ac-ir { margin-left: auto; font-size: 1.2rem; color: var(--media); }

/* menú de la cuenta */
.usuario summary { gap: .5rem; padding: .3rem .55rem .3rem .3rem; border-radius: 999px; background: var(--panel); transition: border-color .15s, box-shadow .15s; }
.usuario summary:hover, .usuario[open] summary { border-color: color-mix(in srgb, var(--primario) 45%, var(--borde)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primario) 12%, transparent); }
.usuario .nombre-yo { font-weight: 600; max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usuario .chevron { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; color: var(--suave); transition: transform .2s; }
.usuario[open] .chevron { transform: rotate(180deg); }
.avatar-yo { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: .78rem; font-weight: 800; letter-spacing: .02em;
  color: #fff; background: linear-gradient(135deg, var(--primario), color-mix(in srgb, var(--primario) 55%, #00b4d8)); box-shadow: 0 2px 6px color-mix(in srgb, var(--primario) 35%, transparent); }
.avatar-yo.grande { width: 46px; height: 46px; font-size: 1.05rem; }
.desplegable.menu-cuenta { width: 320px; padding: .5rem; gap: 2px; border-radius: 16px; overflow: hidden;
  box-shadow: 0 18px 48px rgb(11 31 68 / .18), 0 2px 6px rgb(11 31 68 / .06); animation: menu-abre .16s ease-out both; transform-origin: top right; }
@keyframes menu-abre { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
.mc-cab { display: flex; gap: .75rem; align-items: center; padding: .8rem .8rem .85rem; margin: -.5rem -.5rem .3rem;
  background: linear-gradient(135deg, color-mix(in srgb, var(--primario) 10%, var(--panel)), var(--panel)); border-bottom: 1px solid var(--borde); }
.mc-cab > div { min-width: 0; display: flex; flex-direction: column; }
.mc-cab b { font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-cab small { color: var(--suave); font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-rol { align-self: flex-start; margin-top: .3rem; padding: .08rem .5rem; border-radius: 999px; font-size: .68rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--suave); background: var(--fondo); border: 1px solid var(--borde); }
.mc-rol.admin { color: #1d7a46; background: color-mix(in srgb, #1d9a55 12%, transparent); border-color: transparent; }
.mc-rol.super { color: #6d3fc0; background: color-mix(in srgb, #6d3fc0 12%, transparent); border-color: transparent; }
.mc-grupo { margin: .5rem .6rem .15rem; font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--suave); }
.desplegable a.mc-op { display: flex; gap: .7rem; align-items: center; padding: .45rem .55rem; border-radius: 10px; transition: background .12s, transform .12s; }
.desplegable a.mc-op:hover { background: var(--fondo); transform: translateX(2px); }
.mc-op > span { display: flex; flex-direction: column; min-width: 0; }
.mc-op b { font-size: .9rem; font-weight: 600; }
.mc-op small { font-size: .76rem; color: var(--suave); }
.mc-ico { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-style: normal; font-size: 1rem; background: var(--fondo); }
.mc-ico.azul { background: color-mix(in srgb, var(--primario) 12%, transparent); }
.mc-ico.verde { background: color-mix(in srgb, #1d9a55 13%, transparent); }
.mc-ico.morado { background: color-mix(in srgb, #6d3fc0 13%, transparent); }
.mc-pie { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin: .45rem -.5rem -.5rem; padding: .55rem .7rem;
  border-top: 1px solid var(--borde); background: color-mix(in srgb, var(--fondo) 60%, var(--panel)); }
.mc-pie form { margin: 0; }
.desplegable a.mc-ayuda { padding: .4rem .6rem; font-weight: 600; font-size: .88rem; color: var(--suave); }
.desplegable a.mc-ayuda:hover { color: var(--texto); }
.mc-salir { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .8rem; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--peligro) 30%, var(--borde));
  background: var(--panel); color: var(--peligro); font-weight: 600; font-size: .88rem; cursor: pointer; font-family: inherit; }
.mc-salir svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mc-salir:hover { background: color-mix(in srgb, var(--peligro) 8%, var(--panel)); border-color: var(--peligro); }
@media (max-width: 720px) {
  .desplegable.menu-cuenta { width: auto; animation: none; box-shadow: none; }
  .usuario .nombre-yo { max-width: none; }
}
@media (prefers-reduced-motion: reduce) { .desplegable.menu-cuenta { animation: none; } }
/* correos de la aplicación: pasos */
.paso-correo h2 { display: flex; align-items: center; gap: .6rem; }
.paso-num { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: .95rem; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--primario), color-mix(in srgb, var(--primario) 55%, #00b4d8)); }
.dest-tabla { width: 100%; }
.dest-tabla td { vertical-align: middle; }
.dest-tabla input[type=email] { width: 100%; min-width: 220px; }
.tabla-scroll { overflow-x: auto; margin: .5rem 0 1rem; }
.mc-op small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 230px; }

/* móvil: ficha, pestañas de consultas y embudo de Mis licitaciones más compactos */
@media (max-width: 720px) {
  .ficha-cab h1 { font-size: 1.15rem; line-height: 1.3; }
  .venc-barra .segmentado { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .venc-barra .segmentado::-webkit-scrollbar { display: none; }
  .venc-barra .segmentado .seg { white-space: nowrap; padding: .5rem .8rem; font-size: .9rem; }
  .embudo { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem; }
  .embudo .etapa { padding: .5rem .45rem; align-items: center; text-align: center; }
  .embudo .etapa-ico { width: 24px; height: 24px; margin-bottom: .15rem; }
  .embudo .etapa b { font-size: 1.2rem; }
  .embudo .etapa span { font-size: .72rem; }
}

/* móvil: barras de organismo dentro del ancho; tablas como tarjetas (una fila = una tarjeta) */
.org-barras { grid-template-columns: minmax(0, 1fr); }
.org-barra { min-width: 0; }
@media (max-width: 720px) {
  .tabla-apilada thead { display: none; }
  .tabla-apilada, .tabla-apilada tbody, .tabla-apilada tr, .tabla-apilada td { display: block; width: 100%; }
  .tabla-apilada { background: none; }
  .tabla-apilada tr { border: 1px solid var(--borde); border-radius: 12px; padding: .6rem .8rem; margin-bottom: .6rem; background: var(--panel); }
  .tabla-apilada td { border: 0 !important; padding: .25rem 0 !important; }
  .tabla-apilada td[data-l]::before { content: attr(data-l); display: block; font-size: .68rem; font-weight: 700; letter-spacing: .05em;
    text-transform: uppercase; color: var(--suave); margin-bottom: .1rem; }
  .dest-tabla input[type=email] { min-width: 0; }
}
@media (max-width: 400px) {
  .portada-barra { gap: .5rem; }
  .portada-barra .marca-txt { font-size: 1rem; }
  .portada-barra .derecha .btn { padding: .45rem .7rem; font-size: .88rem; }
}

.clas-exigida { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .6rem; margin: .6rem 0 .4rem; padding: .6rem .8rem; border-radius: 10px;
  background: color-mix(in srgb, var(--primario) 8%, var(--panel)); border: 1px solid color-mix(in srgb, var(--primario) 25%, var(--borde)); }
.clas-exigida span { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--suave); }
.clas-exigida b { font-size: 1rem; }
.clas-exigida small { flex-basis: 100%; color: var(--suave); }
.clas-exigida.no-exige { background: color-mix(in srgb, #1d9a55 8%, var(--panel)); border-color: color-mix(in srgb, #1d9a55 25%, var(--borde)); }

/* resumen del pliego por apartados, datos clave en negrita */
.resumen-ia .ia-intro { font-size: 1rem; line-height: 1.55; }
.ia-apartados { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; margin-top: .6rem; }
.ia-apartado { border: 1px solid var(--borde); border-radius: 12px; padding: .65rem .85rem; background: var(--panel); }
.ia-apartado h3 { margin: 0 0 .35rem; font-size: .95rem; }
.ia-apartado ul { margin: 0; padding-left: 1.1rem; }
.ia-apartado li { margin: .2rem 0; line-height: 1.45; font-size: .9rem; }
.ia-apartado li b, .ia-intro b { color: var(--primario); font-weight: 700; }
.ia-apartado.ojo { border-color: color-mix(in srgb, var(--aviso, #c2410c) 40%, var(--borde)); background: color-mix(in srgb, var(--aviso, #c2410c) 5%, var(--panel)); }
@media (max-width: 900px) { .ia-apartados { grid-template-columns: 1fr; } }
