/* ARCHIVO: gestion.femanext.com → assets/producto.css */
/* Sistema visual de los productos FEMA (el mismo de FEMA CRM). No se edita por producto: lo propio de Gestión va en css/gestion.css */
/* ==========================================================================
   FEMA CRM — sistema visual
   Mismos colores, letra, redondeos y gestos que el panel FEMA
   (fema-sistema.css): el brillo que cruza el logo, el barrido de los botones,
   el azul que ordena y el rojo que llama a hacer algo.
   Para personalizar, se tocan solo los tokens de acá arriba.
   ========================================================================== */
:root {
    /* ---- TEXTO ---- */
    --f-titulo-pagina:  34px;
    --f-lead:           18px;
    --f-titulo-seccion: 20px;
    --f-titulo-tarjeta: 15.5px;
    --f-texto:          16px;
    --f-texto-chico:    14px;
    --f-etiqueta:       11.5px;
    --f-boton:          16px;

    --peso-titulo: 700;
    --peso-medio:  700;
    --peso-normal: 500;

    /* ---- COLORES (los de FEMA) ---- */
    --c-marca:       #1e169c;   /* azul de Felipe: lo que ordena  */
    --c-marca-suave: #d9d7f0;
    --c-marca-fondo: #fbfaff;
    --c-accion:      #ff203c;   /* rojo de Maite: lo que llama a hacer algo */
    --c-accion-suave:#ffd6dc;
    --c-accion-fondo:#fff5f6;
    --c-tinta:   #0a0e27;
    --c-texto:   #5b6170;
    --c-suave:   #8a8e9c;
    --c-tenue:   #b6bac7;
    --c-linea:   #ececef;
    --c-linea-2: #e4e6ee;
    --c-fondo:   #f7f8fa;
    --c-boton:   #353535;
    --c-wa:      #128c4a;

    --c-ok:    #166534; --c-ok-fondo:    #dcfce7; --c-ok-borde:    #86efac;
    --c-aviso: #b45309; --c-aviso-fondo: #fffbeb; --c-aviso-borde: #fcd34d;
    --c-error: #b91c1c; --c-error-fondo: #fee2e2; --c-error-borde: #fca5a5;

    --degrade: linear-gradient(90deg, var(--c-marca) 0%, var(--c-accion) 100%);
    --degrade-titulo: linear-gradient(95deg, var(--c-marca) 0%, var(--c-marca) 42%, var(--c-accion) 100%);

    /* ---- MEDIDAS ---- */
    --alto-control:       48px;
    --alto-control-chico: 38px;
    --alto-control-m:     52px;
    --radio:      11px;
    --radio-caja: 14px;
    --ancho-lado: 240px;

    --sep-bloque:  22px;
    --sep-interno: 16px;
    --sep-campo:   18px;

    --sombra-caja:  0 1px 2px rgba(10,14,39,.04);
    --sombra-hover: 0 12px 26px -18px rgba(10,14,39,.55);
    --sombra-flota: 0 30px 70px -30px rgba(10,14,39,.45);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    font-size: var(--f-texto); color: var(--c-texto); background: var(--c-fondo);
    line-height: 1.5; -webkit-font-smoothing: antialiased;
}
a { color: var(--c-marca); text-decoration: none; }
a:hover { color: var(--c-accion); }
h1, h2, h3, h4 { color: var(--c-tinta); margin: 0; line-height: 1.2; }
p { margin: 0; }
[hidden] { display: none !important; }
button, input, select, textarea { font-family: inherit; }
.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ico.es-chico { width: 16px; height: 16px; }
.oculto-movil { }

/* ---------- El brillo del logo (igual que el panel FEMA) ---------- */
.brillo { position: relative; display: inline-block; line-height: 0; }
.brillo img { display: block; width: auto; }
.brillo::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(100deg, rgba(255,255,255,0) 42%, rgba(255,255,255,.95) 50%, rgba(255,255,255,0) 58%);
    background-size: 300% 100%; background-repeat: no-repeat;
    -webkit-mask-image: url('logo-color.png'); mask-image: url('logo-color.png');
    -webkit-mask-size: contain; mask-size: contain;
    -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
    -webkit-mask-position: left center; mask-position: left center;
    animation: femaBrilloLogo 3s linear infinite;
}
.brillo.es-blanco::after { -webkit-mask-image: url('logo-blanco.png'); mask-image: url('logo-blanco.png'); }
@keyframes femaBrilloLogo { 0% { background-position: 130% 0; } 70%, 100% { background-position: -30% 0; } }
@keyframes femaSweep { 0% { left: -100%; } 100% { left: 200%; } }
@media (prefers-reduced-motion: reduce) { .brillo::after { animation: none; display: none; } }

/* ---------- Botones: tres colores y el barrido ---------- */
.fbtn {
    position: relative; overflow: hidden;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: var(--alto-control); padding: 0 20px; border-radius: var(--radio);
    border: 1.5px solid var(--c-marca); background: var(--c-marca); color: #fff;
    font-size: var(--f-boton); font-weight: var(--peso-medio);
    cursor: pointer; white-space: nowrap; text-decoration: none; line-height: 1;
    transition: background .18s, color .18s, border-color .18s, box-shadow .18s;
}
.fbtn::before {
    content: ''; position: absolute; top: 0; left: -100%; width: 60%; height: 100%; z-index: 1; pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); transform: skewX(-20deg);
}
.fbtn:hover::before { animation: femaSweep .9s ease-out forwards; }
.fbtn:hover { color: #fff; box-shadow: 0 12px 26px -18px rgba(30,22,156,.8); }
.fbtn.es-rojo { background: var(--c-accion); border-color: var(--c-accion); }
.fbtn.es-rojo:hover { box-shadow: 0 12px 26px -16px rgba(255,32,60,.75); }
.fbtn.es-sec, .fbtn.es-neutro { background: #fff; color: var(--c-boton); border-color: var(--c-linea-2); }
.fbtn.es-sec::before, .fbtn.es-neutro::before { background: linear-gradient(90deg, transparent, rgba(255,255,255,.25), transparent); }
.fbtn.es-sec:hover, .fbtn.es-neutro:hover { background: var(--c-tinta); border-color: var(--c-tinta); color: #fff; box-shadow: var(--sombra-hover); }
.fbtn.es-peligro { background: #fff; color: var(--c-accion); border-color: #f3c6c6; }
.fbtn.es-peligro:hover { background: var(--c-accion); color: #fff; border-color: var(--c-accion); }
.fbtn.es-wa { background: var(--c-wa); border-color: var(--c-wa); }
.fbtn.es-wa:hover { box-shadow: 0 12px 26px -16px rgba(18,140,74,.8); }
.fbtn.es-chico { min-height: var(--alto-control-chico); padding: 0 14px; font-size: var(--f-texto-chico); }
.fbtn.es-ancho { width: 100%; }
.fbtn[disabled], .fbtn.es-off { opacity: .45; cursor: not-allowed; box-shadow: none; }

.icobtn { width: 36px; height: 36px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--c-suave); display: inline-grid; place-items: center; cursor: pointer; transition: all .15s; flex: none; }
.icobtn:hover { background: var(--c-fondo); color: var(--c-tinta); border-color: var(--c-linea); }
.icobtn.es-wa { color: #fff; background: var(--c-wa); }
.icobtn.es-wa:hover { filter: brightness(1.1); }
.icobtn.es-borde { border-color: var(--c-linea-2); background: #fff; color: var(--c-tinta); width: var(--alto-control); height: var(--alto-control); border-radius: var(--radio); }
.icobtn.es-borde:hover { background: var(--c-tinta); color: #fff; border-color: var(--c-tinta); }

/* ---------- Estructura: menú lateral ---------- */
.app { display: flex; min-height: 100vh; }
.lado {
    position: sticky; top: 0; height: 100vh; flex: 0 0 var(--ancho-lado); width: var(--ancho-lado);
    background: #fff; color: var(--c-tinta); display: flex; flex-direction: column;
    padding: 26px 16px 18px; overflow: hidden; z-index: 30; border-right: 1px solid var(--c-linea);
}
.lado::before, .lado::after { content: ''; position: absolute; border-radius: 50%; pointer-events: none; }
.lado::before { width: 260px; height: 260px; background: var(--c-marca); filter: blur(90px); opacity: .10; left: -140px; top: -140px; }
.lado::after { width: 240px; height: 240px; background: var(--c-accion); filter: blur(90px); opacity: .10; right: -150px; bottom: -130px; }
.lado > * { position: relative; z-index: 1; }
.lado-logo { display: flex; align-items: center; gap: 10px; padding: 0 10px 28px; }
.lado-logo span:last-child { font-size: 12px; font-weight: 800; letter-spacing: .18em; color: var(--c-accion); border-left: 1.5px solid var(--c-linea-2); padding-left: 10px; }
.lado-items { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.lado-item, .lado-personalizar, .lado-salir {
    display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px;
    font-size: 16px; font-weight: 600; color: var(--c-texto); background: transparent; border: 0; cursor: pointer; text-align: left; width: 100%;
    transition: background .18s, color .18s; position: relative;
}
.lado-item:hover, .lado-personalizar:hover { background: var(--c-marca-fondo); color: var(--c-marca); }
.lado-item:hover .ico { color: var(--c-marca); }
.lado-item.activo { background: var(--c-accion-fondo); color: var(--c-accion); }
.lado-item.activo::before { content: ''; position: absolute; left: -16px; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--c-accion); }
.lado-item.activo .ico { color: var(--c-accion); }
.lado-item .ico { color: var(--c-marca); transition: color .18s; }
.lado-item span { flex: 1; }
.lado-cuenta { font-size: 12px; font-weight: 800; background: var(--c-accion); color: #fff; border-radius: 999px; padding: 2px 8px; }
.lado-pie { display: flex; flex-direction: column; gap: 6px; }
.lado-personalizar { border: 1.5px solid var(--c-linea-2); color: var(--c-tinta); margin-bottom: 6px; }
.lado-personalizar .ico { color: var(--c-accion); }
.lado-usuario { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; color: var(--c-tinta); }
.lado-usuario:hover, .lado-usuario.activo { background: var(--c-fondo); color: var(--c-tinta); }
.lado-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--degrade); display: grid; place-items: center; font-weight: 700; flex: none; color: #fff; }
.lado-usuario-txt { min-width: 0; line-height: 1.25; }
.lado-usuario-txt b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lado-usuario-txt small { font-size: 12px; color: var(--c-suave); }
.lado-salir { font-size: 14px; padding: 9px 12px; color: var(--c-suave); }
.lado-salir:hover { background: var(--c-accion-fondo); color: var(--c-accion); }
.lado-salir .ico { width: 17px; height: 17px; }
.app-cuerpo { flex: 1; min-width: 0; }

/* ---------- Franja superior (prueba / vencimiento) ---------- */
.crm-franja { background: linear-gradient(90deg, var(--c-marca-fondo), #fff 55%, var(--c-accion-fondo)); color: var(--c-tinta); font-size: var(--f-texto-chico); position: relative; z-index: 40; border-bottom: 1px solid var(--c-linea); }
.crm-franja::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--degrade); opacity: .55; }
.crm-franja .ico { color: var(--c-marca); }
.crm-franja b { color: var(--c-marca); }
.crm-franja.es-gracia { background: var(--c-aviso-fondo); }
.crm-franja.es-gracia .ico, .crm-franja.es-gracia b { color: var(--c-aviso); }
.crm-franja.es-lectura { background: var(--c-error-fondo); }
.crm-franja.es-lectura .ico, .crm-franja.es-lectura b { color: var(--c-error); }
.crm-franja-in { padding: 9px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.crm-franja-in > span { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.crm-franja-in b { font-weight: 700; }
.crm-franja-btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 6px; flex: none; background: var(--c-accion); color: #fff !important; font-weight: 700; padding: 7px 14px; border-radius: 9px; }
.crm-franja.es-prueba .crm-franja-btn { background: var(--c-accion); color: #fff !important; }
.crm-franja-btn:hover { background: var(--c-marca); }
.crm-franja .crm-franja-btn .ico { color: #fff; }
.crm-franja-btn .ico { width: 14px; height: 14px; }

/* ---------- Contenido ---------- */
.crm-main { padding: 30px 34px 60px; display: flex; flex-direction: column; gap: var(--sep-bloque); max-width: 1600px; }
.crm-cab { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.crm-titulo { font-size: var(--f-titulo-pagina); font-weight: var(--peso-titulo); letter-spacing: -.02em; background: var(--degrade-titulo); -webkit-background-clip: text; background-clip: text; color: transparent; }
.crm-bajada { font-size: var(--f-lead); color: var(--c-suave); margin-top: 4px; }
.crm-cab-acciones { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.crm-seccion-titulo { font-size: var(--f-titulo-seccion); font-weight: var(--peso-medio); color: var(--c-tinta); display: flex; align-items: center; gap: 10px; }
.crm-seccion-titulo .ico { color: var(--c-marca); }
.crm-ayuda { font-size: var(--f-texto-chico); color: var(--c-suave); }
.crm-rotulo { font-size: var(--f-etiqueta); font-weight: 800; color: var(--c-suave); text-transform: uppercase; letter-spacing: .1em; }

/* ---------- Tarjetas, chips, avisos ---------- */
.fcard { background: #fff; border: 1px solid var(--c-linea); border-radius: var(--radio-caja); box-shadow: var(--sombra-caja); padding: 22px 24px; }
.fcard-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: var(--sep-interno); flex-wrap: wrap; }
.fchip { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--c-fondo); color: var(--c-texto); border: 1px solid var(--c-linea); line-height: 1.4; max-width: 100%; }
.fchip .ico { width: 13px; height: 13px; }
.fchip.es-azul  { background: var(--c-marca-fondo); color: var(--c-marca); border-color: var(--c-marca-suave); }
.fchip.es-rojo  { background: var(--c-error-fondo); color: var(--c-error); border-color: var(--c-error-borde); }
.fchip.es-aviso { background: var(--c-aviso-fondo); color: var(--c-aviso); border-color: var(--c-aviso-borde); }
.fchip.es-ok    { background: var(--c-ok-fondo); color: var(--c-ok); border-color: var(--c-ok-borde); }
.fchip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.falert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: var(--radio); border: 1px solid; font-weight: var(--peso-normal); }
.falert .ico { margin-top: 1px; }
.falert.es-ok    { background: var(--c-ok-fondo); color: var(--c-ok); border-color: var(--c-ok-borde); }
.falert.es-aviso { background: var(--c-aviso-fondo); color: var(--c-aviso); border-color: var(--c-aviso-borde); }
.falert.es-error { background: var(--c-error-fondo); color: var(--c-error); border-color: var(--c-error-borde); }
.falert.es-info  { background: var(--c-marca-fondo); color: var(--c-marca); border-color: var(--c-marca-suave); }

/* ---------- Campos ---------- */
.fcampo { margin-bottom: var(--sep-campo); }
.fcampo > label, .fcampo-rotulo { display: block; font-weight: var(--peso-medio); color: var(--c-tinta); margin-bottom: 7px; }
.fcampo .crm-ayuda { margin-top: 6px; }
.finput, .fcampo input:not([type=checkbox]):not([type=radio]):not([type=file]), .fcampo select, .fcampo textarea {
    width: 100%; min-height: var(--alto-control); padding: 0 14px;
    border: 1.5px solid var(--c-linea-2); border-radius: var(--radio);
    background: #fff; color: var(--c-tinta); font-size: var(--f-texto);
    transition: border-color .15s, box-shadow .15s;
}
.fcampo textarea, textarea.finput { min-height: 100px; padding: 12px 14px; line-height: 1.55; resize: vertical; }
.finput:focus, .fcampo input:focus, .fcampo select:focus, .fcampo textarea:focus { outline: none; border-color: var(--c-marca); box-shadow: 0 0 0 3px rgba(30,22,156,.12); }
::placeholder { color: var(--c-tenue); }
.fgrilla { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.fgrilla-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }

/* ---------- Pestañas y filtros ---------- */
.fpestanas { display: flex; gap: 4px; border-bottom: 1px solid var(--c-linea); overflow-x: auto; scrollbar-width: none; }
.fpestanas::-webkit-scrollbar { display: none; }
.fpestanas a, .fpestanas button {
    display: inline-flex; align-items: center; gap: 8px; padding: 0 16px; height: 48px;
    background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -1px;
    font-size: var(--f-texto); font-weight: 700; color: var(--c-texto); cursor: pointer; white-space: nowrap;
}
.fpestanas a:hover, .fpestanas button:hover { color: var(--c-tinta); }
.fpestanas .activo { color: var(--c-accion); border-bottom-color: var(--c-accion); }
.ffiltros { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ffiltro { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--c-linea-2); background: #fff; color: var(--c-texto); font-size: var(--f-texto-chico); font-weight: 700; cursor: pointer; transition: all .15s; }
.ffiltro:hover { border-color: var(--c-tinta); color: var(--c-tinta); }
.ffiltro.activo { background: var(--c-accion); border-color: var(--c-accion); color: #fff; }
select.ffiltro, select.fselect { padding-right: 32px; appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235b6170' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; }
select.fselect { height: var(--alto-control); border: 1.5px solid var(--c-linea-2); border-radius: var(--radio); padding-left: 14px; font-size: var(--f-texto-chico); font-weight: 700; color: var(--c-tinta); cursor: pointer; }

/* ---------- Números ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kpi { background: #fff; border: 1px solid var(--c-linea); border-radius: var(--radio-caja); padding: 16px 18px; display: flex; gap: 14px; align-items: center; box-shadow: var(--sombra-caja); }
.kpi-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--c-marca-fondo); color: var(--c-marca); }
.kpi-ico.es-rojo { background: var(--c-accion-fondo); color: var(--c-accion); }
.kpi-ico.es-ok { background: var(--c-ok-fondo); color: var(--c-ok); }
.kpi-ico.es-aviso { background: var(--c-aviso-fondo); color: var(--c-aviso); }
.kpi-num { font-size: 24px; font-weight: 800; color: var(--c-tinta); line-height: 1.1; letter-spacing: -.01em; }
.kpi-txt { font-size: var(--f-texto-chico); color: var(--c-suave); margin-top: 2px; }

/* ---------- Buscador y menú "Más" ---------- */
.fbuscar { position: relative; }
.fbuscar > .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--c-suave); pointer-events: none; }
.fbuscar input { width: 100%; height: var(--alto-control); border: 1.5px solid var(--c-linea-2); border-radius: 12px; padding: 0 14px 0 44px; font-size: var(--f-texto); background: #fff; color: var(--c-tinta); }
.fbuscar input:focus { outline: none; border-color: var(--c-marca); box-shadow: 0 0 0 3px rgba(30,22,156,.12); }
.buscar-resultados { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--c-linea); border-radius: var(--radio-caja); box-shadow: var(--sombra-flota); z-index: 60; max-height: 380px; overflow-y: auto; }
.buscar-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--c-linea); cursor: pointer; }
.buscar-item:last-child { border-bottom: 0; }
.buscar-item:hover { background: var(--c-marca-fondo); }
.buscar-item b { color: var(--c-tinta); display: block; }
.buscar-item small { color: var(--c-suave); }
.buscar-vacio { padding: 16px; color: var(--c-suave); font-size: var(--f-texto-chico); }
.fmenu { position: relative; }
.fmenu-lista { position: absolute; right: 0; top: calc(100% + 6px); min-width: 280px; background: #fff; border: 1px solid var(--c-linea); border-radius: var(--radio-caja); box-shadow: var(--sombra-flota); padding: 6px; z-index: 60; }
.fmenu-lista button, .fmenu-lista a { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 0; background: none; border-radius: 9px; font-size: 15.5px; font-weight: 600; color: var(--c-tinta); cursor: pointer; text-align: left; }
.fmenu-lista button:hover, .fmenu-lista a:hover { background: var(--c-fondo); color: var(--c-tinta); }
.fmenu-lista .ico { color: var(--c-marca); }
.fmenu-lista small { display: block; color: var(--c-suave); font-size: 12.5px; font-weight: 500; line-height: 1.3; }
.fmenu-lista hr { border: 0; border-top: 1px solid var(--c-linea); margin: 6px 4px; }

/* ---------- Tablero: cabecera ---------- */
.tab-cab { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tab-cab .crm-titulo { flex: 1 1 auto; }
.tab-cab .fbuscar { width: 340px; }

/* ---------- Para hoy ---------- */
.para-hoy {
    border-radius: 20px; padding: 18px 20px; color: var(--c-tinta); display: flex; align-items: center; gap: 20px;
    position: relative; overflow: hidden; border: 1px solid var(--c-linea); box-shadow: var(--sombra-caja);
    background: radial-gradient(45% 140% at 0% 0%, rgba(30,22,156,.07), rgba(30,22,156,0) 70%), radial-gradient(40% 140% at 100% 100%, rgba(255,32,60,.08), rgba(255,32,60,0) 70%), #fff;
}
.para-hoy::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(180deg, var(--c-marca), var(--c-accion)); }
.para-hoy-txt { flex: 0 0 210px; }
.para-hoy-txt small { display: block; font-size: 12px; font-weight: 800; letter-spacing: .16em; color: var(--c-accion); }
.para-hoy-txt b { display: block; font-size: 22px; font-weight: 700; line-height: 1.2; margin-top: 4px; color: var(--c-tinta); }
.para-hoy-txt a { display: inline-block; margin-top: 6px; font-size: 13.5px; color: var(--c-marca); font-weight: 700; }
.para-hoy-txt a:hover { color: var(--c-accion); }
.para-hoy-lista { flex: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ph-item { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--c-linea-2); border-radius: 14px; padding: 11px 12px; cursor: pointer; transition: border-color .18s, box-shadow .18s, transform .18s; min-width: 0; }
.ph-item:hover { border-color: var(--c-marca-suave); box-shadow: var(--sombra-hover); transform: translateY(-1px); }
.ph-ini { width: 38px; height: 38px; border-radius: 50%; background: var(--c-marca-fondo); border: 1.5px solid var(--c-marca-suave); color: var(--c-marca); display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: none; }
.ph-item:nth-child(2) .ph-ini { background: var(--c-accion-fondo); border-color: var(--c-accion-suave); color: var(--c-accion); }
.ph-dato { flex: 1; min-width: 0; }
.ph-dato b { display: block; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--c-tinta); }
.ph-dato span { font-size: 13px; color: var(--c-marca); font-weight: 600; }
.ph-dato span.es-atrasado { color: var(--c-accion); }
.para-hoy.es-vacio { padding: 16px 20px; }
.para-hoy.es-vacio .para-hoy-txt { flex: 1; }

/* ---------- Tablero: carriles ---------- */
.tablero { display: flex; gap: 14px; align-items: flex-start; overflow-x: auto; padding-bottom: 8px; }
.col { flex: 1 1 0; min-width: 250px; display: flex; flex-direction: column; gap: 10px; }
.col-cab { display: flex; align-items: center; gap: 10px; padding: 0 4px; }
.col-cab i { width: 10px; height: 10px; border-radius: 3px; background: var(--col); flex: none; }
.col-cab h3 { font-size: 16px; font-weight: 700; flex: 1; }
.col-cuenta { font-size: 13px; color: var(--c-suave); font-weight: 700; }
.col-raya { height: 3px; border-radius: 3px; background: var(--col); opacity: .85; }
.col-total { font-size: 13px; color: var(--c-suave); font-weight: 600; padding: 0 4px; margin-top: -4px; min-height: 18px; }
.col-lista { display: flex; flex-direction: column; gap: 8px; min-height: 140px; max-height: calc(100vh - 330px); overflow-y: auto; padding: 2px 2px 10px; border-radius: 12px; }
.col-vacia { border: 1.5px dashed var(--c-linea-2); border-radius: 12px; padding: 18px 12px; text-align: center; font-size: var(--f-texto-chico); color: var(--c-suave); }
.col-lista:has(.lead) .col-vacia { display: none; }
.col.es-plegada { flex: 0 0 58px; min-width: 58px; }
.col-plegada { height: 100%; min-height: 220px; background: #fff; border: 1.5px dashed var(--c-linea-2); border-radius: 14px; display: flex; flex-direction: column; align-items: center; padding-top: 14px; gap: 10px; color: var(--c-suave); cursor: pointer; width: 100%; }
.col-plegada:hover { border-color: var(--c-tinta); color: var(--c-tinta); }
.col-plegada i { width: 10px; height: 10px; border-radius: 3px; background: var(--col); }
.col-plegada span { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 14px; font-weight: 700; }

.lead { background: #fff; border: 1px solid var(--c-linea); border-radius: 14px; padding: 11px 12px; display: flex; gap: 11px; align-items: flex-start; cursor: pointer; transition: box-shadow .15s, border-color .15s; }
.lead:hover { border-color: var(--c-marca-suave); box-shadow: var(--sombra-hover); }
.lead.es-arrastrable { cursor: grab; }
.lead-ini { width: 34px; height: 34px; border-radius: 50%; background: var(--c-fondo); border: 1.5px solid var(--c-linea-2); color: var(--c-texto); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; text-transform: uppercase; }
.lead-dato { flex: 1; min-width: 0; }
.lead-nom { display: block; font-size: var(--f-titulo-tarjeta); font-weight: 700; color: var(--c-tinta); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lead-sub { display: block; font-size: 13.5px; color: var(--c-suave); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lead-valor { color: var(--c-texto); font-weight: 600; }
.lead-extra { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.lead-nota { margin-top: 7px; font-size: 13px; color: var(--c-texto); background: var(--c-fondo); border-radius: 8px; padding: 6px 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lead-punto { width: 9px; height: 9px; border-radius: 50%; flex: none; margin-top: 6px; }
.lead-punto.es-hoy { background: #f59e0b; }
.lead-punto.es-vencido { background: var(--c-accion); }
.lead-punto.es-frio { background: var(--c-tenue); }
.sortable-ghost { opacity: .35; }
.sortable-chosen { box-shadow: var(--sombra-flota); }

/* ---------- Hoy ---------- */
.hoy-grupo { display: flex; flex-direction: column; gap: 10px; }
.hoy-grupo h2 { font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.hoy-grupo h2 i { width: 10px; height: 10px; border-radius: 50%; }
.hoy-grupo h2 small { font-size: 13px; color: var(--c-suave); font-weight: 600; }
.hoy-fila { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--c-linea); border-radius: 14px; padding: 12px 14px; }
.hoy-fila .lead-ini { width: 40px; height: 40px; }
.hoy-fila .lead-dato a { color: inherit; }
.hoy-acc { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.vacio-grande { text-align: center; padding: 50px 20px; background: #fff; border: 1px dashed var(--c-linea-2); border-radius: var(--radio-caja); }
.vacio-grande .ico { width: 34px; height: 34px; color: var(--c-ok); }
.vacio-grande b { display: block; font-size: 20px; color: var(--c-tinta); margin-top: 10px; }

/* ---------- Contactos ---------- */
.tabla-caja { background: #fff; border: 1px solid var(--c-linea); border-radius: var(--radio-caja); overflow-x: auto; }
.tabla { width: 100%; border-collapse: collapse; min-width: 720px; }
.tabla th { text-align: left; font-size: var(--f-etiqueta); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--c-suave); padding: 14px 16px; border-bottom: 1px solid var(--c-linea); background: #fcfcfd; }
.tabla td { padding: 12px 16px; border-bottom: 1px solid var(--c-linea); font-size: 15px; color: var(--c-texto); }
.tabla tr:last-child td { border-bottom: 0; }
.tabla tbody tr { cursor: pointer; }
.tabla tbody tr:hover td { background: var(--c-marca-fondo); }
.tabla td b { color: var(--c-tinta); }
.tabla .etapa { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; color: var(--c-tinta); font-size: 14px; }
.tabla .etapa i { width: 9px; height: 9px; border-radius: 3px; }
.paginas { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }

/* ---------- Modales ---------- */
.crm-modal { position: fixed; inset: 0; background: rgba(10,14,39,.5); backdrop-filter: blur(3px); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 18px; animation: crm-fade .15s ease-out; }
.crm-modal-caja { background: #fff; border-radius: 20px; width: 100%; max-width: 640px; max-height: 92vh; display: flex; flex-direction: column; box-shadow: var(--sombra-flota); overflow: hidden; animation: crm-pop .18s ease-out; }
.crm-modal-caja.es-chica { max-width: 420px; }
.crm-modal-cab { padding: 22px 24px 18px; border-bottom: 1px solid var(--c-linea); display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; position: relative; }
.crm-modal-cab::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--degrade); }
.crm-modal-cab h3 { font-size: var(--f-titulo-seccion); font-weight: 700; }
.crm-modal-cab p { color: var(--c-suave); font-size: var(--f-texto-chico); margin-top: 3px; }
.crm-modal-cuerpo { padding: 22px 24px 6px; overflow-y: auto; flex: 1; }
.crm-modal-pie { padding: 16px 24px; border-top: 1px solid var(--c-linea); display: flex; gap: 10px; justify-content: flex-end; background: #fff; }
.crm-modal-pie .fbtn { min-width: 130px; }
.crm-confirmar-cuerpo { padding: 28px 26px 18px; text-align: center; }
.crm-confirmar-ico { width: 58px; height: 58px; border-radius: 16px; margin: 0 auto 14px; display: grid; place-items: center; background: var(--c-marca-fondo); color: var(--c-marca); }
.crm-confirmar-ico.es-peligro { background: var(--c-accion-fondo); color: var(--c-accion); }
.crm-confirmar-ico .ico { width: 26px; height: 26px; }
.crm-confirmar-cuerpo h3 { font-size: var(--f-titulo-seccion); font-weight: 700; }
.crm-confirmar-cuerpo p { margin-top: 8px; color: var(--c-texto); }
#crm-confirmar .crm-modal-pie, #crm-bienvenida .crm-modal-pie { border-top: 0; padding-top: 4px; }
#crm-confirmar .crm-modal-pie .fbtn { flex: 1; min-width: 0; }

/* Personalizar: panel a la derecha */
.crm-modal.es-lateral { justify-content: flex-end; align-items: stretch; padding: 16px; }
.crm-modal.es-lateral .crm-modal-caja { max-width: 380px; max-height: none; animation: crm-entra .2s ease-out; }
.interruptor { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0; font-weight: 600; color: var(--c-tinta); cursor: pointer; }
.interruptor small { display: block; font-size: 13px; color: var(--c-suave); font-weight: 500; }
.interruptor input { position: absolute; opacity: 0; pointer-events: none; }
.interruptor .pista { width: 44px; height: 26px; border-radius: 999px; background: var(--c-linea-2); position: relative; flex: none; transition: background .2s; }
.interruptor .pista::after { content: ''; position: absolute; top: 4px; left: 4px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: left .2s; }
.interruptor input:checked + .pista { background: var(--degrade); }
.interruptor input:checked + .pista::after { left: 22px; }
.interruptor input:focus-visible + .pista { box-shadow: 0 0 0 3px rgba(30,22,156,.2); }
.pers-grupo { margin-bottom: 18px; }
.pers-grupo + .pers-grupo { border-top: 1px solid var(--c-linea); padding-top: 14px; }

.subir-zona { display: block; border: 2px dashed var(--c-marca-suave); border-radius: var(--radio-caja); padding: 26px 18px; text-align: center; cursor: pointer; background: var(--c-marca-fondo); transition: border-color .15s; }
.subir-zona:hover { border-color: var(--c-marca); }
.subir-zona .ico { width: 30px; height: 30px; color: var(--c-marca); }
.subir-zona b { display: block; color: var(--c-tinta); margin-top: 8px; }
.subir-zona small { color: var(--c-suave); }
.subir-zona input { display: none; }
.pasos { margin: 0 0 18px; padding: 0; list-style: none; counter-reset: p; display: grid; gap: 10px; }
.pasos li { counter-increment: p; display: flex; gap: 12px; align-items: flex-start; }
.pasos li::before { content: counter(p); width: 26px; height: 26px; border-radius: 50%; background: var(--c-marca); color: #fff; font-weight: 800; font-size: 13px; display: grid; place-items: center; flex: none; }

/* ---------- Ficha lateral ---------- */
.ficha { position: fixed; top: 0; right: 0; bottom: 0; width: 100%; max-width: 540px; background: #fff; z-index: 90; box-shadow: var(--sombra-flota); display: flex; flex-direction: column; animation: crm-entra .2s ease-out; }
.ficha-velo { position: fixed; inset: 0; background: rgba(10,14,39,.32); z-index: 89; animation: crm-fade .15s; }
.ficha-cab { padding: 20px 22px 16px; position: relative; border-bottom: 1px solid var(--c-linea); }
.ficha-cab::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--degrade); }
.ficha-cab-1 { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.ficha-nom { font-size: 23px; font-weight: 700; color: var(--c-tinta); line-height: 1.2; word-break: break-word; }
.ficha-datos { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: var(--f-texto-chico); }
.ficha-datos span { display: inline-flex; align-items: center; gap: 6px; }
.ficha-datos .ico { width: 15px; height: 15px; color: var(--c-suave); }
.ficha-acciones { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; }
.ficha-acciones .fbtn { padding: 0 8px; }
.ficha-estado { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.ficha-estado .fcampo { margin: 0; }
.ficha-estado label { font-size: var(--f-etiqueta) !important; text-transform: uppercase; letter-spacing: .08em; color: var(--c-suave) !important; margin-bottom: 5px !important; }
.ficha .fpestanas { padding: 0 14px; }
.ficha-cuerpo { flex: 1; overflow-y: auto; padding: 20px 22px; }
.ficha-bloque { border: 1px solid var(--c-linea); border-radius: var(--radio-caja); padding: 16px; margin-bottom: 14px; }
.ficha-bloque.es-alerta { border-color: #f9c0c8; background: var(--c-accion-fondo); }
.ficha-bloque h4 { font-size: var(--f-texto); font-weight: 700; display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ficha-bloque h4 .ico { color: var(--c-marca); }
.ficha-bloque.es-alerta h4 .ico { color: var(--c-accion); }
.ficha-borrar { margin-top: 18px; text-align: center; }
.ficha-borrar button { background: none; border: 0; color: var(--c-suave); font-size: 14px; font-weight: 600; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.ficha-borrar button:hover { color: var(--c-accion); }
.plantillas-rapidas { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.plantillas-rapidas button { border: 1.5px solid var(--c-linea-2); background: #fff; border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 700; color: var(--c-texto); cursor: pointer; }
.plantillas-rapidas button.activo, .plantillas-rapidas button:hover { border-color: var(--c-marca); color: var(--c-marca); background: var(--c-marca-fondo); }
.seg-rapido { display: flex; flex-wrap: wrap; gap: 6px; }
.seg-rapido .ffiltro { height: 34px; font-size: 13px; }
.linea-tiempo { display: flex; flex-direction: column; }
.lt-item { display: flex; gap: 12px; padding: 0 0 14px; position: relative; }
.lt-item::before { content: ""; position: absolute; left: 7px; top: 18px; bottom: 0; width: 2px; background: var(--c-linea); }
.lt-item:last-child::before { display: none; }
.lt-punto { width: 16px; height: 16px; border-radius: 50%; border: 3px solid var(--c-marca-suave); background: #fff; flex: none; margin-top: 3px; }
.lt-item.es-wa .lt-punto { border-color: #9be3b9; }
.lt-item.es-etapa .lt-punto { border-color: var(--c-aviso-borde); }
.lt-item.es-nota .lt-punto { border-color: var(--c-marca); }
.lt-txt { color: var(--c-tinta); white-space: pre-wrap; word-break: break-word; }
.lt-fecha { font-size: 12px; color: var(--c-suave); font-weight: 600; }
.vacio { text-align: center; color: var(--c-suave); padding: 26px 10px; font-size: var(--f-texto-chico); }

/* ---------- Avisos flotantes ---------- */
.crm-avisos { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.crm-aviso { display: flex; align-items: center; gap: 10px; background: var(--c-tinta); color: #fff; padding: 12px 18px; border-radius: 12px; box-shadow: var(--sombra-flota); font-weight: 600; animation: crm-pop .2s ease-out; max-width: 92vw; }
.crm-aviso.es-ok .ico { color: #6ee7a0; }
.crm-aviso.es-error { background: var(--c-error); }

/* ---------- Reportes ---------- */
.grilla-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sep-bloque); }
.barra-fila { margin-bottom: 14px; }
.barra-fila-txt { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; font-size: var(--f-texto-chico); }
.barra-fila-txt b { color: var(--c-tinta); font-weight: 700; display: inline-flex; align-items: center; gap: 7px; }
.barra-fila-txt b i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.barra-pista { height: 10px; background: var(--c-fondo); border-radius: 999px; overflow: hidden; border: 1px solid var(--c-linea); }
.barra-llena { height: 100%; border-radius: 999px; background: var(--c-marca); }
.lectura { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.lectura li { display: flex; gap: 10px; align-items: flex-start; color: var(--c-tinta); }
.lectura li .ico { color: var(--c-marca); margin-top: 2px; }
.actividad-fila { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--c-linea); }
.actividad-fila:last-child { border-bottom: 0; }
.actividad-fila b { color: var(--c-tinta); font-weight: 700; }
.bloqueado { background: var(--c-tinta); color: #fff; border-radius: var(--radio-caja); padding: 20px; display: flex; gap: 14px; align-items: center; }
.bloqueado .ico { color: #ffd166; width: 28px; height: 28px; }
.bloqueado small { color: rgba(255,255,255,.7); display: block; margin-top: 2px; }

/* ---------- Cuenta ---------- */
.cuenta-grilla { display: grid; grid-template-columns: minmax(0, 760px); gap: var(--sep-bloque); }
.uso { margin-bottom: 18px; }
.uso-txt { display: flex; justify-content: space-between; margin-bottom: 7px; color: var(--c-tinta); font-weight: 700; }
.planes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.plan { border: 1.5px solid var(--c-linea-2); border-radius: var(--radio-caja); padding: 18px; background: #fff; display: flex; flex-direction: column; gap: 6px; }
.plan.activo { border-color: var(--c-marca); background: var(--c-marca-fondo); }
.plan b { font-size: 17px; color: var(--c-tinta); }
.persona { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--c-linea); border-radius: var(--radio); margin-bottom: 8px; }
.persona-ini { width: 38px; height: 38px; border-radius: 50%; background: var(--c-marca-fondo); color: var(--c-marca); display: grid; place-items: center; font-weight: 800; flex: none; text-transform: uppercase; }
.persona-dato { display: flex; align-items: center; gap: 12px; min-width: 0; }
.persona-dato b { color: var(--c-tinta); display: block; }
.dosfa-qr { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.dosfa-qr #qr { padding: 10px; background: #fff; border: 1px solid var(--c-linea); border-radius: 12px; width: 180px; height: 180px; }
.dosfa-qr #qr img, .dosfa-qr #qr canvas { width: 158px !important; height: 158px !important; }
.clave { font-family: ui-monospace, Menlo, monospace; font-weight: 700; font-size: 18px; letter-spacing: .14em; color: var(--c-marca); background: var(--c-fondo); border: 1px solid var(--c-linea); border-radius: 9px; padding: 8px 12px; display: inline-block; user-select: all; word-break: break-all; }
.codigo-input { text-align: center; letter-spacing: .5em; font-family: ui-monospace, Menlo, monospace !important; font-size: 26px !important; font-weight: 700; min-height: 60px !important; }
.vencida-caja { max-width: 560px; margin: 60px auto; text-align: center; }
.vencida-caja .fbtn { margin-top: 10px; }

/* ---------- Ingreso ---------- */
.acceso { min-height: 100vh; display: flex; background: #fff; color: var(--c-tinta); }
.acceso-form { flex: 0 0 40%; max-width: 40%; display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 32px; padding: 52px 5vw 36px; }
.acceso-marca { display: flex; align-items: center; justify-content: center; gap: 16px; }
.acceso-marca span:last-child { font-size: 22px; font-weight: 800; letter-spacing: .2em; color: var(--c-accion); border-left: 2px solid var(--c-linea-2); padding-left: 16px; line-height: 1.6; }
.acceso-caja { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 4px; }
.acceso-caja h1 { font-size: 42px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; background: var(--degrade-titulo); -webkit-background-clip: text; background-clip: text; color: transparent; }
.acceso-caja .crm-bajada { font-size: 19px; margin: 8px 0 22px; }
.acceso-caja .falert { margin-bottom: 16px; }
.acceso-caja .fcampo label { display: flex; justify-content: space-between; }
.acceso-caja .fbtn { min-height: 56px; font-size: 18px; margin-top: 4px; }
.acceso-pie { font-size: 14px; color: var(--c-suave); text-align: center; }
.acceso-pie a { font-weight: 600; }

/* Panel animado (60%) */
.acceso-visual {
    flex: 1; position: relative; margin: 16px 16px 16px 0; border-radius: 28px; overflow: hidden; min-height: 620px;
    background: var(--c-fondo);
    background-image: radial-gradient(rgba(30,22,156,.09) 1px, transparent 1px); background-size: 26px 26px;
}
.av-luz { position: absolute; border-radius: 50%; pointer-events: none; filter: blur(70px); }
.av-luz.es-azul { width: 520px; height: 520px; background: #cfcaff; left: -140px; top: -160px; opacity: .8; animation: av-deriva 18s ease-in-out infinite; }
.av-luz.es-roja { width: 460px; height: 460px; background: #ffc9d1; right: -120px; bottom: -150px; opacity: .85; animation: av-deriva 22s ease-in-out infinite reverse; }
.av-luz.es-chica { width: 240px; height: 240px; background: #ffd6dc; left: 55%; top: 12%; opacity: .5; animation: av-deriva 15s ease-in-out infinite; }
@keyframes av-deriva { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(60px, 40px) scale(1.08); } 66% { transform: translate(-30px, 70px) scale(.95); } }

.av-escena {
    position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 34px;
    padding: 56px clamp(32px, 5vw, 80px) 84px;
    opacity: 0; visibility: hidden; transform: translateY(26px) scale(.985); filter: blur(8px);
    transition: opacity .7s ease, transform .8s cubic-bezier(.2,.8,.2,1), filter .7s ease, visibility 0s .8s;
}
.av-escena.activa { opacity: 1; visibility: visible; transform: none; filter: none; transition: opacity .7s ease .15s, transform .8s cubic-bezier(.2,.8,.2,1) .15s, filter .7s ease .15s, visibility 0s; }
.av-escena.sale { visibility: visible; opacity: 0; transform: translateY(-26px) scale(.985); filter: blur(8px); transition: opacity .6s ease, transform .7s ease, filter .6s ease; }
.av-titulo small { display: block; font-size: 13px; font-weight: 800; letter-spacing: .18em; color: var(--c-accion); margin-bottom: 12px; }
.av-titulo h2 { font-size: clamp(30px, 2.9vw, 46px); font-weight: 700; letter-spacing: -.02em; line-height: 1.08; max-width: 640px; }
.av-titulo h2 em { font-style: normal; background: var(--degrade); -webkit-background-clip: text; background-clip: text; color: transparent; }
.av-escena.activa .av-titulo > * { animation: av-sube .7s cubic-bezier(.2,.8,.2,1) both; }
.av-escena.activa .av-titulo h2 { animation-delay: .25s; }
@keyframes av-sube { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes av-pop { 0% { opacity: 0; transform: translateY(14px) scale(.96); } 100% { opacity: 1; transform: none; } }

.k-ini { width: 34px; height: 34px; border-radius: 50%; background: var(--c-marca-fondo); border: 1.5px solid var(--c-marca-suave); color: var(--c-marca); display: grid; place-items: center; font-weight: 800; font-size: 12.5px; flex: none; }
.k-ini.es-rojo { background: var(--c-accion-fondo); border-color: var(--c-accion-suave); color: var(--c-accion); }

/* Escena: tablero */
.k-tablero { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-width: 760px; }
.k-col { background: rgba(255,255,255,.6); border: 1px solid rgba(255,255,255,.9); border-radius: 18px; padding: 12px; display: flex; flex-direction: column; gap: 10px; backdrop-filter: blur(6px); }
.av-escena.activa .k-col { animation: av-pop .6s cubic-bezier(.2,.8,.2,1) both; }
.av-escena.activa .k-col:nth-child(2) { animation-delay: .1s; }
.av-escena.activa .k-col:nth-child(3) { animation-delay: .2s; }
.k-cab { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; padding: 2px 4px 4px; }
.k-cab i { width: 9px; height: 9px; border-radius: 50%; background: var(--col); }
.k-cab b { margin-left: auto; font-size: 12px; background: #fff; border: 1px solid var(--c-linea); border-radius: 999px; padding: 1px 9px; color: var(--c-texto); }
.k-cuenta { display: inline-grid !important; }
.k-cuenta span { grid-area: 1 / 1; }
.k-cuenta span:last-child { opacity: 0; }
.av-escena.activa .k-cuenta span:first-child { animation: k-fuera 6s both; }
.av-escena.activa .k-cuenta span:last-child { animation: k-dentro 6s both; }
@keyframes k-fuera { 0%, 70% { opacity: 1; } 74%, 100% { opacity: 0; } }
@keyframes k-dentro { 0%, 72% { opacity: 0; transform: scale(.5); } 78% { opacity: 1; transform: scale(1.35); color: var(--c-ok); } 86%, 100% { opacity: 1; transform: scale(1); color: var(--c-ok); } }
.k-tar { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 13px; padding: 10px 11px; box-shadow: 0 8px 18px -14px rgba(10,14,39,.45); border: 1px solid var(--c-linea); min-height: 56px; }
.k-tar b { display: block; font-size: 14px; white-space: nowrap; }
.k-tar small { font-size: 12.5px; color: var(--c-suave); }
.k-tar.es-fantasma { border: 1.5px dashed var(--c-marca-suave); background: transparent; box-shadow: none; opacity: 0; }
.av-escena.activa .k-tar.es-fantasma { animation: k-fantasma 6s both; }
@keyframes k-fantasma { 0%, 12% { opacity: 0; } 16%, 100% { opacity: 1; } }
.k-hueco { min-height: 56px; border-radius: 13px; border: 1.5px dashed rgba(22,101,52,.35); opacity: 0; }
.av-escena.activa .k-hueco { animation: k-hueco 6s both; }
@keyframes k-hueco { 0%, 50% { opacity: 0; } 56%, 70% { opacity: 1; background: rgba(22,101,52,.06); } 72%, 100% { opacity: 0; } }
.k-mueve { position: absolute; left: 12px; top: 52px; width: calc((100% - 28px) / 3 - 24px); z-index: 3; border-color: var(--c-accion-suave); }
.av-escena.activa .k-mueve { animation: k-mueve 6s cubic-bezier(.55,.05,.3,1) both; }
@keyframes k-mueve {
    0%, 14%  { transform: translate(0, 0) rotate(0); box-shadow: 0 8px 18px -14px rgba(10,14,39,.45); }
    18%      { transform: translate(0, -6px) rotate(-3deg); box-shadow: 0 26px 40px -18px rgba(10,14,39,.5); }
    38%      { transform: translate(calc(100% + 38px), -6px) rotate(2deg); box-shadow: 0 26px 40px -18px rgba(10,14,39,.5); }
    44%      { transform: translate(calc(100% + 38px), -6px) rotate(-2deg); }
    66%      { transform: translate(calc(200% + 76px), -6px) rotate(2deg); box-shadow: 0 26px 40px -18px rgba(10,14,39,.5); border-color: var(--c-accion-suave); }
    72%, 100%{ transform: translate(calc(200% + 76px), 0) rotate(0); box-shadow: 0 8px 18px -14px rgba(10,14,39,.45); border-color: #86efac; }
}
.k-ok { margin-left: auto; width: 24px; height: 24px; border-radius: 50%; background: var(--c-ok); color: #fff; display: grid; place-items: center; opacity: 0; transform: scale(.4); }
.k-ok .ico { width: 13px; height: 13px; }
.av-escena.activa .k-ok { animation: k-ok 6s both; }
@keyframes k-ok { 0%, 72% { opacity: 0; transform: scale(.4); } 78% { opacity: 1; transform: scale(1.2); } 84%, 100% { opacity: 1; transform: scale(1); } }
.k-cursor { position: absolute; width: 24px; height: 24px; right: 22%; bottom: -12px; opacity: 0; filter: drop-shadow(0 3px 4px rgba(0,0,0,.25)); }
.av-escena.activa .k-cursor { animation: k-cursor 6s both; }
@keyframes k-cursor { 0% { opacity: 0; transform: translate(30px, 30px); } 10% { opacity: 1; transform: none; } 14% { transform: scale(.85); } 18%, 66% { opacity: 1; transform: scale(.85); } 72% { transform: scale(1); } 80%, 100% { opacity: 0; transform: translate(20px, 26px); } }

/* Escena: para hoy + chat */
.h-grilla { display: grid; grid-template-columns: 1.05fr 1fr; gap: 18px; max-width: 760px; align-items: start; }
.h-lista, .h-chat { background: #fff; border-radius: 20px; box-shadow: var(--sombra-flota); border: 1px solid var(--c-linea); }
.h-lista { padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.h-rot { font-size: 12px; font-weight: 800; letter-spacing: .14em; color: var(--c-accion); }
.h-fila { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 13px; border: 1px solid var(--c-linea); position: relative; }
.h-fila b { display: block; font-size: 14.5px; }
.h-fila small { font-size: 12.5px; color: var(--c-marca); font-weight: 600; }
.h-fila small.es-rojo { color: var(--c-accion); }
.av-escena.activa .h-fila { animation: av-pop .55s cubic-bezier(.2,.8,.2,1) both; }
.av-escena.activa .h-fila:nth-child(2) { animation-delay: .35s; }
.av-escena.activa .h-fila:nth-child(3) { animation-delay: .5s; }
.av-escena.activa .h-fila:nth-child(4) { animation-delay: .65s; }
.h-check { margin-left: auto; width: 34px; height: 34px; border-radius: 10px; background: #eafaf1; color: var(--c-wa); display: grid; place-items: center; }
.av-escena.activa .h-fila.es-hecha { animation: av-pop .55s cubic-bezier(.2,.8,.2,1) .35s both, h-hecha 6.5s both; }
@keyframes h-hecha { 0%, 70% { background: #fff; } 76%, 100% { background: #f3fbf6; border-color: #b7ebc9; } }
.av-escena.activa .h-fila.es-hecha .h-check { animation: h-check 6.5s both; }
@keyframes h-check { 0%, 70% { background: #eafaf1; color: var(--c-wa); } 74% { transform: scale(1.2); } 76%, 100% { background: var(--c-ok); color: #fff; transform: none; } }
.av-wa { width: 34px; height: 34px; border-radius: 10px; background: #eafaf1; color: var(--c-wa); display: grid; place-items: center; margin-left: auto; }
.h-chat { overflow: hidden; }
.av-escena.activa .h-chat { animation: av-pop .7s cubic-bezier(.2,.8,.2,1) .5s both; }
.h-chat-cab { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--c-marca); color: #fff; }
.h-chat-cab b { display: block; font-size: 14.5px; }
.h-chat-cab small { font-size: 12px; opacity: .75; }
.h-chat-cab .k-ini { background: #fff; }
.h-chat-cuerpo { min-height: 200px; padding: 16px 14px; display: flex; flex-direction: column; gap: 10px; background: #f3f1ff; background-image: radial-gradient(rgba(30,22,156,.06) 1px, transparent 1px); background-size: 14px 14px; position: relative; }
.h-escribe { align-self: flex-end; display: flex; gap: 4px; padding: 11px 14px; background: #fff; border-radius: 14px; opacity: 0; position: absolute; right: 14px; top: 16px; }
.h-escribe i { width: 7px; height: 7px; border-radius: 50%; background: var(--c-tenue); animation: h-punto 1s infinite; }
.h-escribe i:nth-child(2) { animation-delay: .15s; } .h-escribe i:nth-child(3) { animation-delay: .3s; }
@keyframes h-punto { 0%, 100% { transform: translateY(0); opacity: .5; } 50% { transform: translateY(-4px); opacity: 1; } }
.av-escena.activa .h-escribe { animation: h-escribe 6.5s both; }
@keyframes h-escribe { 0%, 18% { opacity: 0; } 22%, 38% { opacity: 1; } 42%, 100% { opacity: 0; } }
.h-burbuja { align-self: flex-end; max-width: 88%; background: #dcf8e6; color: var(--c-tinta); font-size: 14px; line-height: 1.4; padding: 10px 12px; border-radius: 14px 14px 4px 14px; opacity: 0; }
.h-burbuja.es-ella { align-self: flex-start; background: #fff; border-radius: 14px 14px 14px 4px; }
.h-tilde { display: block; text-align: right; font-size: 11px; font-weight: 700; color: var(--c-tenue); margin-top: 2px; letter-spacing: -.1em; }
.av-escena.activa .h-burbuja { animation: h-burbuja 6.5s both; }
.av-escena.activa .h-burbuja.es-ella { animation-name: h-burbuja2; }
.av-escena.activa .h-tilde { animation: h-tilde 6.5s both; }
@keyframes h-burbuja { 0%, 40% { opacity: 0; transform: translateY(10px) scale(.95); } 46%, 100% { opacity: 1; transform: none; } }
@keyframes h-burbuja2 { 0%, 60% { opacity: 0; transform: translateY(10px) scale(.95); } 66%, 100% { opacity: 1; transform: none; } }
@keyframes h-tilde { 0%, 55% { color: var(--c-tenue); } 58%, 100% { color: #3b82f6; } }

/* Escena: números */
.n-grilla { display: grid; grid-template-columns: 1fr 1.25fr; gap: 16px; max-width: 760px; }
.n-tarjeta { background: #fff; border-radius: 20px; padding: 20px 22px; box-shadow: var(--sombra-flota); border: 1px solid var(--c-linea); }
.n-tarjeta small { display: block; font-size: 12px; font-weight: 800; letter-spacing: .14em; color: var(--c-marca); }
.n-tarjeta.es-oscura { background: linear-gradient(140deg, var(--c-marca) 0%, #2a1fb8 55%, var(--c-accion) 140%); color: #fff; border: 0; }
.n-tarjeta.es-oscura small { color: #ffd6dc; }
.av-escena.activa .n-tarjeta { animation: av-pop .6s cubic-bezier(.2,.8,.2,1) .2s both; }
.av-escena.activa .n-tarjeta + .n-tarjeta { animation-delay: .35s; }
.n-num { font-size: 38px; font-weight: 800; letter-spacing: -.02em; margin: 8px 0 16px; }
.n-barra { height: 9px; border-radius: 999px; background: rgba(255,255,255,.2); overflow: hidden; }
.n-barra i { display: block; height: 100%; width: 0; border-radius: 999px; background: #fff; }
.av-escena.activa .n-barra i { animation: n-barra 1.8s cubic-bezier(.2,.8,.2,1) .5s both; }
@keyframes n-barra { to { width: 68%; } }
.n-pie { margin-top: 10px; font-size: 13.5px; opacity: .85; }
.n-barras { height: 130px; display: flex; align-items: flex-end; gap: 12px; margin-top: 16px; }
.n-barras i { flex: 1; height: var(--h); border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg, #5b4ce0, var(--c-marca)); transform-origin: bottom; transform: scaleY(0); }
.n-barras i.es-rojo { background: linear-gradient(180deg, #ff5a6e, var(--c-accion)); }
.av-escena.activa .n-barras i { animation: n-crece .9s cubic-bezier(.2,.8,.2,1) both; }
.av-escena.activa .n-barras i:nth-child(1) { animation-delay: .5s; } .av-escena.activa .n-barras i:nth-child(2) { animation-delay: .6s; }
.av-escena.activa .n-barras i:nth-child(3) { animation-delay: .7s; } .av-escena.activa .n-barras i:nth-child(4) { animation-delay: .8s; }
.av-escena.activa .n-barras i:nth-child(5) { animation-delay: .9s; } .av-escena.activa .n-barras i:nth-child(6) { animation-delay: 1s; }
@keyframes n-crece { to { transform: scaleY(1); } }
.n-meses { display: flex; gap: 12px; margin-top: 8px; }
.n-meses span { flex: 1; text-align: center; font-size: 11px; font-weight: 700; color: var(--c-suave); }
.n-chips { grid-column: 1 / -1; display: flex; gap: 14px; }
.n-chip { flex: 1; display: flex; align-items: baseline; gap: 10px; background: #fff; border-radius: 16px; padding: 14px 18px; border: 1px solid var(--c-linea); box-shadow: 0 14px 30px -24px rgba(10,14,39,.5); }
.n-chip b { font-size: 26px; font-weight: 800; color: var(--c-marca); }
.n-chip.es-rojo b { color: var(--c-accion); }
.n-chip span { font-size: 14px; color: var(--c-texto); font-weight: 600; }
.av-escena.activa .n-chip { animation: av-pop .6s cubic-bezier(.2,.8,.2,1) .7s both; }
.av-escena.activa .n-chip + .n-chip { animation-delay: .85s; }

/* Escena: avisos */
.a-pila { display: flex; flex-direction: column; gap: 12px; max-width: 520px; }
.a-aviso { display: flex; align-items: center; gap: 14px; background: #fff; border-radius: 18px; padding: 14px 16px; border: 1px solid var(--c-linea); box-shadow: 0 20px 40px -26px rgba(10,14,39,.45); opacity: 0; }
.a-aviso:nth-child(even) { margin-left: 48px; }
.a-aviso b { display: block; font-size: 15px; }
.a-aviso small { font-size: 13px; color: var(--c-suave); }
.a-aviso em { margin-left: auto; font-style: normal; font-size: 12px; color: var(--c-tenue); white-space: nowrap; align-self: flex-start; }
.a-ico { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex: none; background: var(--c-marca-fondo); color: var(--c-marca); }
.a-ico.es-rojo { background: var(--c-accion-fondo); color: var(--c-accion); }
.a-ico.es-ok { background: var(--c-ok-fondo); color: var(--c-ok); }
.av-escena.activa .a-aviso { animation: a-entra .7s cubic-bezier(.2,.9,.25,1.15) both; }
.av-escena.activa .a-aviso:nth-child(1) { animation-delay: .4s; } .av-escena.activa .a-aviso:nth-child(2) { animation-delay: 1.2s; }
.av-escena.activa .a-aviso:nth-child(3) { animation-delay: 2s; } .av-escena.activa .a-aviso:nth-child(4) { animation-delay: 2.8s; }
@keyframes a-entra { from { opacity: 0; transform: translateX(60px) scale(.95); } to { opacity: 1; transform: none; } }
.av-escena.activa .a-aviso:nth-child(1) .a-ico { animation: a-late 1.4s ease-in-out 1.2s 2; }
@keyframes a-late { 0%, 100% { box-shadow: 0 0 0 0 rgba(30,22,156,.3); } 50% { box-shadow: 0 0 0 10px rgba(30,22,156,0); } }

/* Puntos */
.av-puntos { position: absolute; left: clamp(32px, 5vw, 80px); bottom: 34px; display: flex; gap: 8px; z-index: 5; }
.av-puntos button { width: 28px; height: 6px; border-radius: 999px; border: 0; padding: 0; background: rgba(30,22,156,.15); cursor: pointer; position: relative; overflow: hidden; transition: width .4s; }
.av-puntos button.activo { width: 64px; }
.av-puntos button.activo::after { content: ''; position: absolute; inset: 0; background: var(--degrade); transform-origin: left; animation: av-progreso 7s linear both; }
@keyframes av-progreso { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.ver-clave { position: relative; }
.ver-clave input { padding-right: 48px !important; }
.ver-clave button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }

/* ---------- Animaciones ---------- */
@keyframes crm-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes crm-pop { from { opacity: 0; transform: scale(.96) translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes crm-entra { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes crm-flota { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
    .para-hoy-lista { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .para-hoy-lista .ph-item:nth-child(3) { display: none; }
    .kpis { grid-template-columns: repeat(2, 1fr); }
    .acceso-form { padding: 44px 3.5vw 32px; }
    .k-tar b { font-size: 13px; }
}
@media (max-width: 1080px) {
    .acceso-visual { display: none; }
    .acceso-form { flex: 1; max-width: none; }
    .grilla-2, .planes { grid-template-columns: 1fr; }
    :root { --ancho-lado: 84px; }
    .lado { padding: 22px 12px; }
    .lado-logo { justify-content: center; padding: 0 0 24px; }
    .lado-logo .brillo img { height: 20px !important; }
    .lado-logo span:last-child, .lado-item span, .lado-usuario-txt, .lado-personalizar span, .lado-salir span { display: none; }
    .lado-item, .lado-personalizar, .lado-salir, .lado-usuario { justify-content: center; position: relative; }
    .lado-cuenta { position: absolute; top: 4px; right: 6px; padding: 1px 6px; font-size: 11px; }
}
@media (max-width: 760px) {
    :root { --f-titulo-pagina: 27px; --f-lead: 15.5px; }
    .app { flex-direction: column; }
    .lado {
        position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; width: 100%;
        flex-direction: row; padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px)); z-index: 80;
    }
    .lado::before, .lado::after, .lado-logo, .lado-personalizar, .lado-salir { display: none; }
    .lado-items { flex-direction: row; gap: 2px; }
    .lado-item, .lado-usuario { flex: 1; flex-direction: column; gap: 3px; padding: 8px 4px; font-size: 11.5px; }
    .lado-item span { display: block; flex: none; }
    .lado-pie { flex: 0 0 64px; }
    .lado-usuario-txt { display: none; }
    .lado-avatar { width: 28px; height: 28px; font-size: 13px; }
    .lado-cuenta { top: 2px; right: 50%; margin-right: -22px; }
    .app-cuerpo { padding-bottom: 76px; }
    .crm-franja-in { padding: 9px 14px; flex-direction: column; align-items: stretch; text-align: center; gap: 8px; }
    .crm-franja-in > span { justify-content: center; }
    .crm-franja-btn { justify-content: center; }
    .crm-main { padding: 18px 14px 40px; gap: 16px; }
    .tab-cab .crm-titulo { flex: 1 1 100%; }
    .tab-cab .fbuscar { width: auto; flex: 1; }
    .tab-cab .fbtn.es-rojo span { display: none; }
    .tab-cab .fbtn.es-rojo { padding: 0; width: var(--alto-control); }
    .para-hoy { flex-direction: column; align-items: stretch; gap: 12px; padding: 16px; }
    .para-hoy-txt { flex: none; }
    .para-hoy-lista { grid-template-columns: 1fr; }
    .para-hoy-lista .ph-item:nth-child(3) { display: flex; }
    .kpis { gap: 10px; }
    .kpi { padding: 12px; flex-direction: column; align-items: flex-start; gap: 8px; }
    .kpi-num { font-size: 19px; }
    .tablero { scroll-snap-type: x mandatory; gap: 12px; }
    .col { flex: 0 0 84vw; min-width: 0; scroll-snap-align: start; }
    .col.es-plegada { flex: 0 0 58px; }
    .col-lista { max-height: none; }
    .fcard { padding: 18px 16px; }
    .fgrilla, .fgrilla-3 { grid-template-columns: 1fr; }
    .fbtn { min-height: var(--alto-control-m); }
    .finput, .fcampo input:not([type=checkbox]):not([type=radio]):not([type=file]), .fcampo select { min-height: var(--alto-control-m); font-size: 16px; }
    .crm-modal { padding: 0; align-items: flex-end; }
    .crm-modal-caja { border-radius: 18px 18px 0 0; max-height: 94vh; }
    .crm-modal.es-lateral { padding: 0; align-items: flex-end; }
    .crm-modal.es-lateral .crm-modal-caja { max-width: none; max-height: 90vh; }
    .crm-modal-pie .fbtn { flex: 1; min-width: 0; }
    .ficha-acciones { grid-template-columns: repeat(2, 1fr); }
    .ficha-estado { grid-template-columns: 1fr; }
    .hoy-fila { flex-wrap: wrap; }
    .hoy-acc { width: 100%; justify-content: stretch; }
    .hoy-acc .fbtn { flex: 1; }
    .acceso-form { padding: 32px 22px; }
    .acceso-caja h1 { font-size: 34px; }
}

/* Columna plegada: solo se ve la tira; al abrirla, la tira se va. */
.col.es-plegada > :not(.col-plegada) { display: none; }
.col:not(.es-plegada) > .col-plegada { display: none; }
.crm-franja-in { flex-wrap: wrap; }
@media (max-width: 760px) {
    .tab-cab .fbuscar { flex: 1 1 100%; order: 2; }
    .tab-cab .fselect { flex: 1; order: 3; }
    .tab-cab .fmenu { order: 4; }
    .tab-cab .fbtn.es-rojo { order: 5; }
    .tab-cab .crm-titulo { order: 1; }
    .lado { border-right: 0; border-top: 1px solid var(--c-linea); box-shadow: 0 -10px 30px -20px rgba(10,14,39,.3); }
    .lado-item:hover, .lado-usuario:hover { background: transparent; }
    .lado-item.activo { background: var(--c-accion-fondo); }
    .lado-item.activo::before { display: none; }
    .acceso-marca span:last-child { font-size: 18px; }
}
.n-chip b span { font-size: inherit; color: inherit; font-weight: inherit; }

.h-fila > div, .k-tar > div { min-width: 0; flex: 1; }
.h-fila b, .h-fila small, .k-tar b, .k-tar small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-grilla { grid-template-columns: 1.1fr .9fr; gap: 14px; }
.k-tablero { gap: 12px; }
.k-col { padding: 10px; }
.k-tar { padding: 9px; gap: 8px; }
.k-tar .k-ini { width: 30px; height: 30px; font-size: 11.5px; }
.k-mueve { left: 10px; top: 48px; width: calc((100% - 24px) / 3 - 20px); }
@keyframes k-mueve {
    0%, 14%  { transform: translate(0, 0) rotate(0); box-shadow: 0 8px 18px -14px rgba(10,14,39,.45); }
    18%      { transform: translate(0, -6px) rotate(-3deg); box-shadow: 0 26px 40px -18px rgba(10,14,39,.5); }
    38%      { transform: translate(calc(100% + 32px), -6px) rotate(2deg); box-shadow: 0 26px 40px -18px rgba(10,14,39,.5); }
    44%      { transform: translate(calc(100% + 32px), -6px) rotate(-2deg); }
    66%      { transform: translate(calc(200% + 64px), -6px) rotate(2deg); box-shadow: 0 26px 40px -18px rgba(10,14,39,.5); border-color: var(--c-accion-suave); }
    72%, 100%{ transform: translate(calc(200% + 64px), 0) rotate(0); box-shadow: 0 8px 18px -14px rgba(10,14,39,.45); border-color: #86efac; }
}
.k-hueco { min-height: 50px; }
.k-tar { min-height: 50px; }

/* =========================================================
   INGRESO: franja blanca con la marca + banda con onda azul/roja
   (animaciones a la izquierda, formulario en tarjeta a la derecha)
   ========================================================= */
.acceso { min-height: 100vh; display: flex; flex-direction: column; background: #fff; }
.acceso-cab { flex: none; display: flex; justify-content: center; align-items: center; padding: 28px 24px; background: #fff; position: relative; z-index: 3; }
.acceso-cab .acceso-marca { gap: 20px; }
.acceso-cab .acceso-marca span:last-child { font-size: 28px; letter-spacing: .22em; border-left-width: 2px; padding-left: 20px; line-height: 1.7; }

.acceso-cuerpo {
    flex: 1; position: relative; overflow: hidden; isolation: isolate;
    display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); align-items: center; gap: clamp(32px, 5vw, 96px);
    padding: clamp(36px, 5vh, 64px) clamp(28px, 6vw, 120px);
    background: linear-gradient(105deg, #2d2bec 0%, #1e169c 28%, #5a1a9e 52%, #b4134f 76%, #ff203c 100%);
    background-size: 160% 100%; animation: ac-fondo 14s ease-in-out infinite alternate;
}
@keyframes ac-fondo { 0% { background-position: 0% 50%; } 100% { background-position: 100% 50%; } }
.acceso-ondas { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.acceso-ondas svg { position: absolute; left: 0; width: 200%; height: 46%; }
.acceso-ondas .o1 { bottom: -4%; animation: ac-onda 16s linear infinite; }
.acceso-ondas .o2 { bottom: -10%; height: 40%; animation: ac-onda 24s linear infinite reverse; }
.acceso-ondas .o3 { bottom: 6%; height: 52%; animation: ac-onda 30s linear infinite; }
.acceso-ondas .o4 { top: -8%; height: 38%; transform-origin: center; animation: ac-onda-arriba 26s linear infinite; }
@keyframes ac-onda { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes ac-onda-arriba { from { transform: translateX(-50%) scaleY(-1); } to { transform: translateX(0) scaleY(-1); } }
.acceso-ondas i { position: absolute; border-radius: 50%; filter: blur(80px); }
.acceso-ondas i:nth-of-type(1) { width: 520px; height: 520px; background: #4f46ff; opacity: .55; left: -160px; top: -200px; animation: av-deriva 20s ease-in-out infinite; }
.acceso-ondas i:nth-of-type(2) { width: 480px; height: 480px; background: #ff4d63; opacity: .45; right: -160px; bottom: -200px; animation: av-deriva 24s ease-in-out infinite reverse; }

/* Animaciones (izquierda) */
.acceso-visual { position: relative; min-height: 540px; height: 100%; max-height: 640px; z-index: 1; }
.acceso-visual .av-escena { padding: 0 0 46px; gap: 26px; }
.acceso-visual .av-titulo {
    align-self: flex-start; max-width: 100%; padding: 20px 26px 22px; border-radius: 20px;
    background: rgba(255,255,255,.94); box-shadow: 0 24px 50px -28px rgba(10,14,39,.6); backdrop-filter: blur(10px);
}
.acceso-visual .av-titulo small { margin-bottom: 8px; }
.acceso-visual .av-titulo h2 { font-size: clamp(26px, 2.3vw, 40px); color: var(--c-tinta); }
.acceso-visual .k-col { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.28); }
.acceso-visual .k-cab { color: #fff; }
.acceso-visual .k-cab i { box-shadow: 0 0 0 2px rgba(255,255,255,.85); }
.acceso-visual .k-tar.es-fantasma { border-color: rgba(255,255,255,.5); }
.acceso-visual .k-hueco { border-color: rgba(255,255,255,.7); }
.acceso-visual .h-lista, .acceso-visual .h-chat, .acceso-visual .n-tarjeta, .acceso-visual .n-chip, .acceso-visual .a-aviso { border-color: transparent; box-shadow: 0 30px 60px -30px rgba(10,14,39,.65); }
.acceso-visual .n-tarjeta.es-oscura { background: linear-gradient(140deg, #0f0a5c 0%, var(--c-marca) 60%, #3a2fd1 100%); box-shadow: 0 30px 60px -26px rgba(10,14,39,.8), inset 0 0 0 1px rgba(255,255,255,.12); }
.acceso-visual .av-puntos { left: 0; bottom: 0; }
.acceso-visual .av-puntos button { background: rgba(255,255,255,.3); }
.acceso-visual .av-puntos button.activo::after { background: #fff; }
.av-texto { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; }
.av-texto > * { color: #fff; }
.av-texto small { display: block; font-size: 13px; font-weight: 800; letter-spacing: .18em; opacity: .8; margin-bottom: 12px; }
.av-texto h2 { font-size: clamp(30px, 2.8vw, 46px); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; max-width: 560px; }

/* Formulario (derecha, en tarjeta) */
.acceso-cuerpo .acceso-form {
    position: relative; z-index: 2; justify-self: end; width: 100%; max-width: 540px;
    display: flex; flex-direction: column; gap: 22px; padding: 44px 48px 28px;
    background: #fff; border-radius: 26px; overflow: hidden;
    box-shadow: 0 50px 90px -40px rgba(10,14,39,.75), 0 0 0 1px rgba(255,255,255,.5);
    animation: av-pop .8s cubic-bezier(.2,.8,.2,1) both;
}
.acceso-cuerpo .acceso-form::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--degrade); }
.acceso-cuerpo .acceso-caja { max-width: none; }
.acceso-cuerpo .acceso-caja h1 { font-size: 40px; }
.acceso-cuerpo .acceso-caja .crm-bajada { font-size: 18px; margin: 6px 0 22px; }
.acceso-cuerpo .acceso-pie { border-top: 1px solid var(--c-linea); padding-top: 18px; margin: 0; }

@media (max-width: 1280px) {
    .acceso-cuerpo { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); padding-left: 40px; padding-right: 40px; gap: 40px; }
    .acceso-cuerpo .acceso-form { padding: 36px 34px 24px; }
}
@media (max-width: 1080px) {
    .acceso-cuerpo { grid-template-columns: 1fr; justify-items: center; }
    .acceso-visual { display: none; }
    .acceso-cuerpo .acceso-form { justify-self: center; }
}
@media (max-width: 760px) {
    .acceso-cab { padding: 18px 16px; }
    .acceso-cab .brillo img { height: 42px !important; }
    .acceso-cab .acceso-marca { gap: 14px; }
    .acceso-cab .acceso-marca span:last-child { font-size: 20px; padding-left: 14px; }
    .acceso-cuerpo { padding: 24px 14px 32px; align-items: start; }
    .acceso-cuerpo .acceso-form { padding: 30px 22px 20px; border-radius: 20px; }
    .acceso-cuerpo .acceso-caja h1 { font-size: 32px; }
}
@media (prefers-reduced-motion: reduce) { .acceso-cuerpo, .acceso-ondas svg, .acceso-ondas i { animation: none !important; } }
.acceso-cuerpo .acceso-visual { background: none; margin: 0; border-radius: 0; overflow: visible; min-height: 560px; }
.acceso-cuerpo .acceso-form { align-items: stretch; justify-content: flex-start; }
.acceso-cuerpo { background-size: 125% 100%; }
.acceso-visual .k-tablero, .acceso-visual .h-grilla, .acceso-visual .n-grilla { max-width: 860px; }
.acceso-visual .a-pila { max-width: 640px; }
.acceso-visual .av-titulo { max-width: 860px; }

/* Fondo del ingreso: colores difuminados que se mezclan, sin líneas */
.acceso-cuerpo { background: linear-gradient(110deg, #2a26d6 0%, #1e169c 35%, #6b1c9e 62%, #e0183f 88%, #ff203c 100%); background-size: 100% 100%; animation: none; }
.acceso-ondas svg { display: none; }
.acceso-ondas { overflow: hidden; }
.acceso-ondas i, .acceso-ondas::before, .acceso-ondas::after { content: ''; position: absolute; border-radius: 50%; filter: blur(110px); will-change: transform; }
.acceso-ondas i:nth-of-type(1) { width: 62vw; height: 62vw; left: -18vw; top: -30vw; background: #3d39ff; opacity: .75; animation: ac-mancha1 26s ease-in-out infinite; }
.acceso-ondas i:nth-of-type(2) { width: 58vw; height: 58vw; right: -16vw; bottom: -30vw; background: #ff2e4d; opacity: .8; animation: ac-mancha2 30s ease-in-out infinite; }
.acceso-ondas::before { width: 46vw; height: 46vw; left: 28vw; top: -6vw; background: #8a1fb0; opacity: .6; animation: ac-mancha3 34s ease-in-out infinite; }
.acceso-ondas::after { width: 40vw; height: 40vw; left: 4vw; bottom: -22vw; background: #c81450; opacity: .45; animation: ac-mancha4 38s ease-in-out infinite; }
@keyframes ac-mancha1 { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(14vw, 10vw) scale(1.12); } 66% { transform: translate(4vw, 18vw) scale(.92); } }
@keyframes ac-mancha2 { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(-16vw, -8vw) scale(.9); } 66% { transform: translate(-6vw, -16vw) scale(1.1); } }
@keyframes ac-mancha3 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-14vw, 14vw) scale(1.2); } }
@keyframes ac-mancha4 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(30vw, -10vw) scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .acceso-ondas::before, .acceso-ondas::after { animation: none !important; } }

/* Fondo del ingreso: manchas de color más vivas y con más movimiento */
.acceso-cuerpo .acceso-form::before { display: none; }
.acceso-cuerpo { background: #160f6e; }
.acceso-ondas i, .acceso-ondas::before, .acceso-ondas::after { filter: blur(70px); mix-blend-mode: screen; opacity: 1; }
.acceso-ondas i:nth-of-type(1) { width: 52vw; height: 52vw; left: -12vw; top: -22vw; background: radial-gradient(circle, #4a44ff 0%, #2d27e0 45%, rgba(45,39,224,0) 70%); animation: ac-mancha1 16s ease-in-out infinite; }
.acceso-ondas i:nth-of-type(2) { width: 50vw; height: 50vw; right: -10vw; bottom: -24vw; background: radial-gradient(circle, #ff2a48 0%, #e3123a 45%, rgba(227,18,58,0) 70%); animation: ac-mancha2 18s ease-in-out infinite; }
.acceso-ondas::before { width: 42vw; height: 42vw; left: 30vw; top: -10vw; background: radial-gradient(circle, #b02bd6 0%, #7d1fb8 45%, rgba(125,31,184,0) 70%); animation: ac-mancha3 20s ease-in-out infinite; }
.acceso-ondas::after { width: 40vw; height: 40vw; left: 0; bottom: -20vw; background: radial-gradient(circle, #ff3d7a 0%, #d8155e 45%, rgba(216,21,94,0) 70%); animation: ac-mancha4 22s ease-in-out infinite; }
@keyframes ac-mancha1 { 0%, 100% { transform: translate(0, 0) scale(1); } 25% { transform: translate(26vw, 12vw) scale(1.25); } 50% { transform: translate(40vw, 26vw) scale(.9); } 75% { transform: translate(10vw, 30vw) scale(1.15); } }
@keyframes ac-mancha2 { 0%, 100% { transform: translate(0, 0) scale(1); } 25% { transform: translate(-24vw, -6vw) scale(.85); } 50% { transform: translate(-44vw, -22vw) scale(1.2); } 75% { transform: translate(-14vw, -28vw) scale(1); } }
@keyframes ac-mancha3 { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(-26vw, 18vw) scale(1.3); } 66% { transform: translate(14vw, 26vw) scale(.85); } }
@keyframes ac-mancha4 { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(34vw, -14vw) scale(1.2); } 66% { transform: translate(52vw, 4vw) scale(.9); } }
.acceso-ondas i, .acceso-ondas::before, .acceso-ondas::after { mix-blend-mode: normal; }
.acceso-ondas::before { background: radial-gradient(circle, #6a2bd8 0%, #4b1fb0 45%, rgba(75,31,176,0) 70%); }
.acceso-ondas::after { background: radial-gradient(circle, #ff3048 0%, #e0163c 45%, rgba(224,22,60,0) 70%); }

/* Fondo del ingreso: degradé fino y quieto, sin animaciones */
.acceso-ondas { display: none; }
.acceso-cuerpo {
    animation: none;
    background:
        radial-gradient(60% 80% at 12% 10%, rgba(255,255,255,.10) 0%, rgba(255,255,255,0) 60%),
        radial-gradient(50% 70% at 92% 95%, rgba(255,255,255,.08) 0%, rgba(255,255,255,0) 60%),
        linear-gradient(115deg, #1e169c 0%, #2a1fae 30%, #6a1c9c 58%, #d4163f 85%, #ff203c 100%);
}

/* =========================================================
   INGRESO (versión clara): fondo celeste/rosado, formulario
   protagonista con marco degradé y animaciones en un panel chico
   ========================================================= */
.acceso-cuerpo {
    background: linear-gradient(100deg, #e6ecff 0%, #efeafc 50%, #ffe5eb 100%);
    grid-template-columns: minmax(0, .92fr) minmax(0, 1fr); align-items: center; gap: 40px;
    padding: 48px max(40px, calc((100vw - 1320px) / 2));
}
.acceso-cuerpo .acceso-visual {
    height: 480px; min-height: 0; max-height: none; overflow: hidden; border-radius: 26px;
    background: radial-gradient(70% 60% at 0% 0%, rgba(255,255,255,.12), rgba(255,255,255,0) 60%), linear-gradient(140deg, #2b22c9 0%, #1e169c 45%, #5a1a9e 100%);
    box-shadow: 0 40px 70px -40px rgba(30,22,156,.7);
}
.acceso-visual .av-escena { padding: 22px; gap: 18px; justify-content: center; }
.acceso-visual .av-titulo { padding: 16px 20px 18px; border-radius: 16px; max-width: 100%; }
.acceso-visual .av-titulo small { font-size: 11.5px; margin-bottom: 6px; }
.acceso-visual .av-titulo h2 { font-size: clamp(20px, 1.75vw, 28px); }
.acceso-visual .k-tablero, .acceso-visual .h-grilla, .acceso-visual .n-grilla, .acceso-visual .a-pila { max-width: 100%; }
.acceso-visual .h-lista { padding: 14px; gap: 8px; }
.acceso-visual .h-fila { padding: 7px 9px; }
.acceso-visual .h-chat-cuerpo { min-height: 170px; }
.acceso-visual .n-tarjeta { padding: 16px 18px; }
.acceso-visual .n-num { font-size: 30px; margin: 6px 0 12px; }
.acceso-visual .n-barras { height: 100px; gap: 9px; }
.acceso-visual .n-chip { padding: 11px 14px; }
.acceso-visual .n-chip b { font-size: 21px; }
.acceso-visual .a-pila { gap: 9px; }
.acceso-visual .a-aviso { padding: 10px 14px; border-radius: 15px; }
.acceso-visual .a-aviso:nth-child(even) { margin-left: 30px; }
.acceso-visual .a-ico { width: 36px; height: 36px; border-radius: 11px; }
.acceso-visual .av-puntos { display: none; }

.acceso-cuerpo .acceso-form {
    justify-self: stretch; max-width: none; padding: 46px 52px 28px; border-radius: 30px;
    border: 9px solid transparent;
    background: linear-gradient(#fff, #fff) padding-box, linear-gradient(135deg, #1e169c 0%, #5a1a9e 45%, #ff203c 100%) border-box;
    box-shadow: 0 50px 90px -45px rgba(30,22,156,.55);
}
.acceso-cuerpo .acceso-caja h1 { font-size: 44px; }
@media (max-width: 1280px) {
    .acceso-cuerpo { padding: 40px 32px; gap: 28px; }
    .acceso-cuerpo .acceso-form { padding: 36px 36px 24px; }
}
@media (max-width: 1080px) {
    .acceso-cuerpo { grid-template-columns: 1fr; }
    .acceso-cuerpo .acceso-form { max-width: 560px; justify-self: center; }
}
@media (max-width: 760px) {
    .acceso-cuerpo { padding: 22px 14px 32px; }
    .acceso-cuerpo .acceso-form { padding: 28px 22px 20px; border-width: 6px; border-radius: 22px; }
    .acceso-cuerpo .acceso-caja h1 { font-size: 32px; }
}

/* Animaciones del ingreso sin panel de fondo */
.acceso-cuerpo .acceso-visual { background: none; box-shadow: none; border-radius: 0; overflow: visible; }
.acceso-visual .av-escena { padding: 22px 0; }
.acceso-visual .av-titulo { box-shadow: 0 20px 40px -28px rgba(30,22,156,.45); border: 1px solid rgba(30,22,156,.06); }
.acceso-visual .k-col { background: rgba(255,255,255,.55); border: 1px solid #fff; }
.acceso-visual .k-cab { color: var(--c-tinta); }
.acceso-visual .k-cab i { box-shadow: none; }
.acceso-visual .k-cab b { border-color: var(--c-linea-2); }
.acceso-visual .k-tar.es-fantasma { border-color: var(--c-marca-suave); }
.acceso-visual .k-hueco { border-color: rgba(22,101,52,.35); }
.acceso-visual .h-lista, .acceso-visual .h-chat, .acceso-visual .n-tarjeta, .acceso-visual .n-chip, .acceso-visual .a-aviso { box-shadow: 0 24px 46px -28px rgba(30,22,156,.45); }
.acceso-visual .n-tarjeta.es-oscura { box-shadow: 0 24px 46px -24px rgba(30,22,156,.6); }

/* =========================================================
   COLOR EQUILIBRADO: menú lateral, franja de arriba y "Para hoy"
   con azul y rojo de FEMA mezclados, moderados
   ========================================================= */
.lado {
    background: linear-gradient(175deg, #241ba8 0%, #3a1ca6 38%, #7a1c96 72%, #c8173f 100%);
    color: #fff; border-right: 0;
}
.lado::before { background: #6c63ff; opacity: .35; }
.lado::after { background: #ff4d63; opacity: .35; }
.lado-logo span:last-child { color: #fff; border-left-color: rgba(255,255,255,.3); }
.lado-item, .lado-personalizar, .lado-salir { color: rgba(255,255,255,.82); }
.lado-item .ico { color: rgba(255,255,255,.75); }
.lado-item:hover, .lado-personalizar:hover { background: rgba(255,255,255,.12); color: #fff; }
.lado-item:hover .ico { color: #fff; }
.lado-item.activo { background: rgba(255,255,255,.18); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.lado-item.activo::before { background: #fff; }
.lado-item.activo .ico { color: #fff; }
.lado-cuenta { background: #fff; color: var(--c-accion); }
.lado-personalizar { border-color: rgba(255,255,255,.3); color: #fff; }
.lado-personalizar .ico { color: #fff; }
.lado-usuario, .lado-usuario:hover, .lado-usuario.activo { color: #fff; }
.lado-usuario:hover, .lado-usuario.activo { background: rgba(255,255,255,.12); }
.lado-usuario-txt small { color: rgba(255,255,255,.7); }
.lado-avatar { background: #fff; color: var(--c-marca); }
.lado-salir { color: rgba(255,255,255,.7); }
.lado-salir:hover { background: rgba(255,255,255,.12); color: #fff; }

.crm-franja { background: linear-gradient(90deg, #2a1fae 0%, #5a1c9e 50%, #d0183f 100%); color: #fff; border-bottom: 0; }
.crm-franja::after { display: none; }
.crm-franja .ico, .crm-franja b { color: #fff; }
.crm-franja-btn, .crm-franja.es-prueba .crm-franja-btn { background: #fff; color: var(--c-accion) !important; }
.crm-franja-btn:hover { background: #fff; color: var(--c-marca) !important; }
.crm-franja .crm-franja-btn .ico { color: inherit; }
.crm-franja.es-gracia { background: linear-gradient(90deg, #b45309, #d97706); }
.crm-franja.es-lectura { background: linear-gradient(90deg, #b91c1c, #e11d48); }
.crm-franja.es-gracia .ico, .crm-franja.es-gracia b, .crm-franja.es-lectura .ico, .crm-franja.es-lectura b { color: #fff; }

.para-hoy {
    background: radial-gradient(50% 140% at 100% 100%, rgba(255,77,99,.35), rgba(255,77,99,0) 70%), linear-gradient(110deg, #2a1fae 0%, #4b1ca2 45%, #9a1a86 80%, #d0183f 100%);
    color: #fff; border: 0; box-shadow: 0 24px 44px -28px rgba(30,22,156,.7);
}
.para-hoy::before { display: none; }
.para-hoy-txt small { color: #ffd6dc; }
.para-hoy-txt b { color: #fff; }
.para-hoy-txt a { color: #fff; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255,255,255,.45); }
.para-hoy-txt a:hover { color: #ffd6dc; }
.ph-item { border-color: transparent; }
.ph-item:hover { border-color: transparent; box-shadow: 0 16px 30px -18px rgba(10,14,39,.6); }

@media (max-width: 760px) {
    .lado { background: linear-gradient(90deg, #2a1fae 0%, #5a1c9e 50%, #d0183f 100%); border-top: 0; }
    .lado-item.activo { background: rgba(255,255,255,.2); }
}

/* Las 5 columnas (Perdido incluida) entran completas en pantalla */
@media (min-width: 761px) { .col { min-width: 196px; } }

/* =========================================================
   FUNCIONES NUEVAS: etiquetas, motivo, tareas, equipo, presupuestos
   ========================================================= */
.lead-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.lead-etq { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; line-height: 1.5; padding: 1px 8px; border-radius: 999px; color: var(--etq); background: color-mix(in srgb, var(--etq) 10%, #fff); border: 1px solid color-mix(in srgb, var(--etq) 28%, #fff); white-space: nowrap; }
.lead-etq button { border: 0; background: none; color: inherit; font: inherit; font-size: 14px; line-height: 1; padding: 0 0 0 2px; cursor: pointer; opacity: .7; }
.lead-etq button:hover { opacity: 1; }
.lead-motivo { display: inline-flex; font-size: 11.5px; font-weight: 700; line-height: 1.5; padding: 1px 8px; border-radius: 999px; background: var(--c-error-fondo); color: var(--c-error); border: 1px dashed var(--c-error-borde); }
.lead-tareas { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 800; line-height: 1.5; padding: 1px 8px; border-radius: 999px; background: var(--c-marca-fondo); color: var(--c-marca); border: 1px solid var(--c-marca-suave); }
.lead-tareas .ico { width: 12px; height: 12px; }
.lead-asig { width: 24px; height: 24px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 10px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--c-marca), #6b1ea7); margin-top: 2px; letter-spacing: .02em; }

.ficha-etqs { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.ficha-motivo { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 9px 12px; border-radius: 11px; background: var(--c-error-fondo); color: var(--c-error); font-size: 14px; border: 1px solid var(--c-error-borde); }
.ficha-motivo .ico { width: 16px; height: 16px; flex: none; }
.pestana-n { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--c-accion); color: #fff; font-size: 11px; font-weight: 800; margin-left: 2px; }

.tarea-nueva { display: grid; grid-template-columns: 1fr 150px auto; gap: 8px; margin-bottom: 16px; }
.tarea-nueva input { min-height: 44px; border: 1.5px solid var(--c-linea-2); border-radius: 11px; padding: 0 12px; font: inherit; font-size: 15px; background: #fff; color: var(--c-tinta); }
.tarea-nueva input:focus { outline: none; border-color: var(--c-marca); box-shadow: 0 0 0 3px rgba(30,22,156,.1); }
.tarea { display: flex; align-items: flex-start; gap: 10px; padding: 10px 4px; border-bottom: 1px solid var(--c-linea); }
.tarea:last-child { border-bottom: 0; }
.tarea-check { width: 26px; height: 26px; flex: none; border-radius: 8px; border: 2px solid var(--c-linea-2); background: #fff; display: grid; place-items: center; cursor: pointer; color: transparent; transition: all .15s; padding: 0; }
.tarea-check .ico { width: 15px; height: 15px; }
.tarea-check:hover { border-color: var(--c-ok); color: var(--c-ok); }
.tarea.es-hecha .tarea-check { background: var(--c-ok); border-color: var(--c-ok); color: #fff; }
.tarea-txt { flex: 1; min-width: 0; font-size: 15px; color: var(--c-tinta); padding-top: 2px; }
.tarea.es-hecha .tarea-txt { color: var(--c-suave); text-decoration: line-through; }
.tarea-txt small { display: flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--c-suave); margin-top: 3px; text-decoration: none; }
.tarea-txt small .ico { width: 12px; height: 12px; }
.tarea-txt small.es-vencida { color: var(--c-accion); font-weight: 700; }
.tarea-txt small.es-hoy { color: #b45309; font-weight: 700; }

.presu { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--c-linea); border-radius: 13px; margin-bottom: 10px; background: #fff; }
.presu-dato { flex: 1; min-width: 0; }
.presu-dato b { display: block; font-size: 15px; }
.presu-dato small { font-size: 13px; color: var(--c-suave); }
.presu-acc { display: flex; gap: 6px; }

.motivos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.motivo { min-height: 46px; border-radius: 12px; border: 1.5px solid var(--c-linea-2); background: #fff; font: inherit; font-size: 15px; font-weight: 600; color: var(--c-tinta); cursor: pointer; transition: all .15s; }
.motivo:hover { border-color: var(--c-accion); color: var(--c-accion); }
.motivo.activo { background: var(--c-accion); border-color: var(--c-accion); color: #fff; }

.etq-campo { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; min-height: 48px; padding: 6px 10px; border: 1.5px solid var(--c-linea-2); border-radius: 11px; background: #fff; cursor: text; }
.etq-campo:focus-within { border-color: var(--c-marca); box-shadow: 0 0 0 3px rgba(30,22,156,.1); }
.etq-campo #ed-etq-chips { display: contents; }
.etq-campo input { flex: 1; min-width: 110px; border: 0 !important; box-shadow: none !important; outline: none; padding: 4px 2px !important; min-height: 0 !important; font: inherit; background: transparent !important; }
.etq-sugeridas { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 7px; }
.etq-sugeridas small { font-size: 12.5px; color: var(--c-suave); margin-right: 2px; }
.etq-sugeridas button { border: 1px dashed var(--c-linea-2); background: #fff; border-radius: 999px; padding: 2px 9px; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--c-texto); cursor: pointer; }
.etq-sugeridas button:hover { border-color: var(--c-marca); color: var(--c-marca); }

@media (max-width: 760px) {
    .tarea-nueva { grid-template-columns: 1fr 1fr; }
    .tarea-nueva input:first-child { grid-column: 1 / -1; }
    .motivos { grid-template-columns: 1fr; }
}

/* Formulario web (Mi cuenta) */
.copiar-fila { display: flex; gap: 8px; flex-wrap: wrap; }
.copiar-fila input { flex: 1 1 260px; min-height: 48px; border: 1.5px solid var(--c-linea-2); border-radius: 11px; padding: 0 12px; font: inherit; font-size: 14.5px; color: var(--c-marca); font-weight: 600; background: var(--c-marca-fondo); }
.codigo-caja { width: 100%; border: 1.5px solid var(--c-linea-2); border-radius: 12px; padding: 12px 14px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.5; color: #e6e8ff; background: #14104f; resize: vertical; }

/* Presupuesto (editor) */
.presu-volver { display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; font-weight: 600; color: var(--c-suave); margin-bottom: 10px; }
.presu-volver:hover { color: var(--c-marca); }
.presu-volver .ico { width: 16px; height: 16px; }
.presu-listo { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; padding: 16px 18px; border-radius: 16px; margin-bottom: var(--sep-bloque); color: #fff; background: linear-gradient(110deg, #1e169c, #4b1ca2 55%, #c8173f); box-shadow: 0 24px 44px -28px rgba(30,22,156,.7); }
.presu-listo-txt { display: flex; align-items: center; gap: 12px; }
.presu-listo-txt > .ico { width: 34px; height: 34px; padding: 7px; border-radius: 50%; background: rgba(255,255,255,.18); }
.presu-listo-txt b { display: block; font-size: 17px; }
.presu-listo-txt span { font-size: 14px; opacity: .85; }
.presu-listo-acc { display: flex; gap: 8px; flex-wrap: wrap; }
.presu-listo .fbtn.es-sec { background: #fff; border-color: #fff; color: var(--c-tinta); }
.presu-para { min-height: 86px; border-radius: 11px; background: var(--c-fondo); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.presu-para b { font-size: 16px; }
.presu-para span { font-size: 14px; color: var(--c-suave); }
.presu-items { display: flex; flex-direction: column; gap: 8px; }
.presu-item { display: grid; grid-template-columns: minmax(0, 1fr) 80px 150px 130px 40px; gap: 8px; align-items: center; }
.presu-item.es-cab span { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--c-suave); }
.presu-item.es-cab span:nth-child(2), .presu-item.es-cab span:nth-child(3), .presu-item.es-cab span:nth-child(4) { text-align: right; }
.presu-item input { min-height: 46px; border: 1.5px solid var(--c-linea-2); border-radius: 10px; padding: 0 12px; font: inherit; font-size: 15px; color: var(--c-tinta); background: #fff; width: 100%; }
.presu-item input.es-num { text-align: right; }
.presu-item input:focus { outline: none; border-color: var(--c-marca); box-shadow: 0 0 0 3px rgba(30,22,156,.1); }
.presu-sub { text-align: right; font-size: 15px; color: var(--c-tinta); }
.presu-total { display: flex; justify-content: flex-end; align-items: baseline; gap: 18px; margin: 18px 0 22px; padding: 14px 18px; border-radius: 14px; background: var(--c-marca-fondo); border: 1px solid var(--c-marca-suave); }
.presu-total span { font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--c-marca); }
.presu-total b { font-size: 26px; font-weight: 800; color: var(--c-marca); }
.presu-pie { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; padding-top: 18px; border-top: 1px solid var(--c-linea); }
@media (max-width: 760px) {
    .presu-item { grid-template-columns: 1fr 64px 40px; }
    .presu-item.es-cab { display: none; }
    .presu-item input:nth-child(1) { grid-column: 1 / -1; }
    .presu-item input:nth-child(3) { grid-column: 1; grid-row: 2; }
    .presu-item input:nth-child(2) { grid-column: 2; grid-row: 2; }
    .presu-item .presu-sub { display: none; }
    .presu-item [data-quitar] { grid-column: 3; grid-row: 2; }
    .presu-item { padding-bottom: 10px; border-bottom: 1px dashed var(--c-linea); }
}
.presu-total b span { font: inherit; letter-spacing: 0; text-transform: none; color: inherit; }
.presu-opciones { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; margin-top: 4px; }
@media (max-width: 760px) { .presu-opciones { grid-template-columns: 1fr; } }
/* Pestañas de la ficha: que entren las cinco */
.ficha .fpestanas { gap: 0; }
.ficha .fpestanas button { padding-left: 11px; padding-right: 11px; font-size: 15px; }
