/* usu.cabecera.css   · ACTUALIZAR (v7.9.1) → Archivos: SÍ, reemplazar este archivo · Base de datos: NO
   Cabecera ondulada del sistema: la misma en todos los módulos y parametrizable por empresa.
   Los colores, el alto, la fuente y el estilo vienen de las variables --rp-* que entrega emp.tema.css.php
   (Parametrización › Apariencia). Sin ese archivo se ven los valores ANTARES de siempre.
   La pintan usuCabecera() (PHP) y usu.cabecera.js (pantallas antiguas).

   FILTROS DETRÁS DE LA OLA: a la caja de filtros de cada módulo se le pone la clase  rp-filtros .
   Queda metida debajo de la cabecera y la ola se ve pasando por encima. */

.rph {
  --rp-ola-h: var(--rp-ola, 80px);
  position: relative; overflow: hidden; margin: 0; z-index: 3;
  padding: var(--rp-cab-pt, 34px) 24px var(--rp-cab-pb, 112px);
  color: #fff; text-align: left; font-family: var(--rp-fuente,Quicksand,sans-serif);
  background: var(--rp-grad, linear-gradient(135deg, var(--rp-c1,#6d0c40) 0%, var(--rp-c2,#a3145f) 55%, var(--rp-c3,#c2337f) 100%)); background-size: 200% 200%;
  animation: var(--rp-anim, rphFlow 14s ease infinite);
  --rp-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 90' preserveAspectRatio='none'%3E%3Cpath d='M0,0 H1440 V40 C1200,96 960,48 720,24 C480,0 240,90 0,32 Z'/%3E%3C/svg%3E");
  -webkit-mask: linear-gradient(#000, #000) top / 100% calc(100% - var(--rp-ola-h) + 1px) no-repeat, var(--rp-mask) bottom / 100% var(--rp-ola-h) no-repeat;
          mask: linear-gradient(#000, #000) top / 100% calc(100% - var(--rp-ola-h) + 1px) no-repeat, var(--rp-mask) bottom / 100% var(--rp-ola-h) no-repeat;
}
.rph[data-estilo="curva"] { --rp-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 90' preserveAspectRatio='none'%3E%3Cpath d='M0,0 H1440 V26 Q720,114 0,26 Z'/%3E%3C/svg%3E"); }
.rph[data-estilo="diagonal"] { --rp-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 90' preserveAspectRatio='none'%3E%3Cpath d='M0,0 H1440 V14 L0,86 Z'/%3E%3C/svg%3E"); }
.rph[data-estilo="plano"] { -webkit-mask: none; mask: none; border-radius: 0 0 26px 26px; padding-bottom: calc(var(--rp-cab-pb, 112px) - 62px); }
@keyframes rphFlow { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
.rph *, .rph *::before, .rph *::after { box-sizing: border-box; }

/* burbujas de fondo */
.rph-blobs { position: absolute; inset: 0; overflow: hidden; opacity: .05; pointer-events: none; display: var(--rp-burb, block); }
.rph-blobs span { position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); background: #fff; border-radius: 42% 58% 63% 37% / 47% 40% 60% 53%;
  animation: rphFloat var(--t) ease-in-out infinite, rphMorph 8s ease-in-out infinite; animation-delay: var(--d), var(--d); }
.rph-blobs span:nth-child(1) { --x: 2%;  --y: 8%;  --s: 190px; --t: 19s; --d: 0s; }
.rph-blobs span:nth-child(2) { --x: 24%; --y: 45%; --s: 120px; --t: 15s; --d: 2.2s; }
.rph-blobs span:nth-child(3) { --x: 44%; --y: 5%;  --s: 160px; --t: 21s; --d: 1.1s; }
.rph-blobs span:nth-child(4) { --x: 64%; --y: 40%; --s: 100px; --t: 14s; --d: 3.6s; }
.rph-blobs span:nth-child(5) { --x: 80%; --y: 10%; --s: 175px; --t: 20s; --d: .8s; }
@keyframes rphFloat { 0%,100% { transform: translate(0, 0) scale(.95); } 25% { transform: translate(4%, -16%) scale(1.05); } 55% { transform: translate(-3%, -6%) scale(.9); } 80% { transform: translate(5%, -20%) scale(1.08); } }
@keyframes rphMorph { 0%,100% { border-radius: 42% 58% 63% 37% / 47% 40% 60% 53%; } 33% { border-radius: 60% 40% 34% 66% / 55% 60% 40% 45%; } 66% { border-radius: 48% 52% 66% 34% / 40% 55% 45% 60%; } }

/* segunda ola, translúcida, que se desliza por dentro de la cabecera */
.rph-ola { position: absolute; left: 0; right: 0; bottom: 0; height: var(--rp-ola-h); pointer-events: none; overflow: hidden;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 720 80' preserveAspectRatio='none'%3E%3Cpath fill='%23ffffff' fill-opacity='.13' d='M0,44 C120,14 240,14 360,44 S600,74 720,44 V80 H0 Z'/%3E%3C/svg%3E") repeat-x 0 100% / 50% 100%;
  animation: var(--rp-anim-ola, rphOla 22s linear infinite); }
.rph[data-estilo="plano"] .rph-ola { display: none; }
@keyframes rphOla { from { background-position-x: 0; } to { background-position-x: -100%; } }
.rph-ola svg { display: none; }

.rph-in { position: relative; z-index: 2; max-width: 1500px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.rph-marca { display: flex; align-items: center; gap: 18px; min-width: 0; }
.rph-logo { width: 62px; height: 62px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 25px; color: var(--rp-acento,#fab726); overflow: hidden;
  border-radius: var(--rp-logo-rad, 43% 57% 61% 39% / 46% 41% 59% 54%); background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.34); animation: rphLogo 8s ease-in-out infinite; }
.rph-logo.con-img { background: #fff; border-color: rgba(255,255,255,.9); padding: 6px; animation: none; }
.rph-logo img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
@keyframes rphLogo { 0%,100% { border-radius: 43% 57% 61% 39% / 46% 41% 59% 54%; } 50% { border-radius: 61% 39% 44% 56% / 55% 62% 38% 45%; } }
.rph h1 { margin: 0; padding: 0; font-size: 1.6rem; line-height: 1.2; font-weight: 700; letter-spacing: .5px; color: #fff; text-transform: uppercase; display: block; text-align: inherit; }
.rph h1 span { color: var(--rp-acento,#fab726); }
.rph p { margin: 4px 0 0; padding: 0; opacity: .9; font-weight: 500; font-size: .93rem; letter-spacing: 0; color: #fff; text-align: inherit; text-transform: none; }
.rph p b { color: var(--rp-acento,#fab726); font-weight: 700; }
.rph-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.rph-btn, .rph .rp-btn { display: inline-flex; align-items: center; gap: 9px; height: 44px; padding: 0 18px; text-decoration: none; white-space: nowrap; cursor: pointer;
  border-radius: 22px 22px 22px 8px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.3); color: #fff; font: 700 .86rem var(--rp-fuente,Quicksand,sans-serif);
  transition: background .25s ease, transform .25s ease, color .25s ease; position: relative; }
.rph-btn:hover, .rph .rp-btn:hover { background: #fff; color: var(--rp-c2, var(--rp-v1,#8f1054)); transform: translateY(-2px); }
.rph-btn.es-principal, .rph .rp-btn.es-principal { background: var(--rp-acento,#fab726); border-color: var(--rp-acento,#fab726); color: var(--rp-c1,#6d0c40); }
.rph-btn.es-principal:hover, .rph .rp-btn.es-principal:hover { filter: brightness(1.08); color: var(--rp-c1,#6d0c40); box-shadow: 0 10px 22px rgba(0,0,0,.22); }
.rph-meta select { height: 44px; padding: 0 14px; border-radius: 22px 22px 22px 8px; border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.95); color: var(--rp-c1,#6d0c40); font: 700 .86rem var(--rp-fuente,Quicksand,sans-serif); max-width: 100%; }
.rph-chip { display: inline-flex; align-items: center; gap: 7px; height: 44px; padding: 0 14px; border-radius: 22px; background: rgba(0,0,0,.18); border: 1px solid rgba(255,255,255,.22); font-size: .78rem; font-weight: 700; white-space: nowrap; color: #fff; text-decoration: none; }
a.rph-chip:hover { background: rgba(0,0,0,.3); color: #fff; }
.rph-bell { width: 44px; padding: 0; justify-content: center; }
.rph-bell .rph-n { position: absolute; top: -5px; right: -5px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #e11d48; color: #fff; font-size: .7rem; font-weight: 800; display: none; align-items: center; justify-content: center; border: 2px solid #fff; }
.rph-bell .rph-n.on { display: flex; }

/* ── CAJA DE FILTROS DETRÁS DE LA CABECERA ──
   Se mete debajo de la ola (margen negativo) y el contenido empieza ya por debajo del borde ondulado. */
.rp-filtros { position: relative; z-index: 1; margin-top: calc(var(--rp-tuck, 62px) * -1) !important; padding-top: calc(var(--rp-tuck, 62px) + 16px) !important;
  background: #fff; border-radius: 0 0 22px 22px !important; box-shadow: 0 10px 28px rgba(60,20,45,.1); }
.rp-tuck { position: relative; z-index: 1; margin-top: calc(var(--rp-tuck, 62px) * -1) !important; padding-top: calc(var(--rp-tuck, 62px) + 14px) !important; }

@media (max-width: 767px) {
  .rph { padding: 26px 16px var(--rp-cab-pb, 104px); }
  .rph[data-estilo="plano"] { padding-bottom: calc(var(--rp-cab-pb, 104px) - 62px); }
  .rph-in { justify-content: center; text-align: center; }
  .rph-marca { flex-direction: column; gap: 10px; }
  .rph h1 { font-size: 1.25rem; }
  .rph-meta { width: 100%; justify-content: center; }
  .rph-btn, .rph .rp-btn, .rph-meta select { flex: 1 1 140px; justify-content: center; }
  .rph-bell { flex: 0 0 44px; }
}
@media (prefers-reduced-motion: reduce) { .rph, .rph-logo, .rph-blobs span, .rph-ola { animation: none; } }
@media print { .rph { display: none; } }

/* ── Pantallas con envoltorio propio (.rp-wrap, .coti-wrap): su primer bloque se mete detrás de la ola ── */
body .rp-wrap, body .coti-wrap { margin-top: 0; }
.rp-wrap:not(.rp-tuck) > :first-child:not(.rp-filtros), .coti-wrap:not(.rp-tuck) > :first-child:not(.rp-filtros) {
  margin-top: calc(var(--rp-tuck, 62px) * -1); padding-top: calc(var(--rp-tuck, 62px) + 14px); position: relative; z-index: 1; }
.rp-wrap > .rp-filtros, .coti-wrap > .rp-filtros { margin-top: calc(var(--rp-tuck, 62px) * -1) !important; }

/* ── v8.7/v9.4 · cabecera que se achica y queda fija al bajar (ini.cab.js) — vale en TODOS los módulos ── */
.rph.rph-fija { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; margin: 0; padding: 7px 22px; border-radius: 0 0 20px 20px;
  -webkit-mask: none; mask: none; box-shadow: 0 8px 26px rgba(40,10,30,.3); animation: rphBaja .28s ease-out, var(--rp-anim, rphFlow 14s ease infinite); }
@keyframes rphBaja { from { transform: translateY(-100%); } to { transform: none; } }
.rph.rph-fija .rph-ola, .rph.rph-fija .rph-blobs { display: none; }
.rph.rph-fija .rph-in { gap: 12px; flex-wrap: nowrap; }
.rph.rph-fija .rph-marca { gap: 12px; }
.rph.rph-fija .rph-logo { width: 38px; height: 38px; font-size: 16px; padding: 4px; animation: none; }
.rph.rph-fija h1 { font-size: 1rem; letter-spacing: .4px; white-space: nowrap; }
.rph.rph-fija p { display: none; }
.rph.rph-fija .rph-meta { flex-wrap: nowrap; gap: 8px; }
.rph.rph-fija .rph-btn, .rph.rph-fija .rph-chip, .rph.rph-fija .rph-meta select, .rph.rph-fija .lt-pill.en-cab .lt-b { height: 36px; padding: 0 13px; font-size: .78rem; }
.rph.rph-fija .rph-bell { width: 36px; padding: 0; }
.rph.rph-fija .lt-b small { display: none; }
@media (max-width: 767px) {
  .rph.rph-fija { padding: 6px 12px; border-radius: 0 0 16px 16px; }
  .rph.rph-fija .rph-marca > div:not(.rph-logo), .rph.rph-fija .rph-chip { display: none; } /* en el celular solo quedan el logo y los botones */
}
/* v9.4 · pasos de ajuste cuando la barra tiene muchos botones (los pone ini.cab.js) */
.rph.rph-fija .rph-in { overflow: visible; }
.rph.rph-n1 .rph-marca > div:not(.rph-logo) { display: none; }
.rph.rph-n2 .rph-chip { display: none; }
.rph.rph-n3 .rph-btn { font-size: 0; gap: 0; padding: 0; width: 36px; justify-content: center; }
.rph.rph-n3 .rph-btn i { font-size: .9rem; }
@media (max-width: 767px) {   /* celular: si aun así no cabe, la barra se desliza con el dedo */
  .rph.rph-fija .rph-in { overflow-x: auto; justify-content: flex-start; scrollbar-width: none; }
  .rph.rph-fija .rph-in::-webkit-scrollbar { display: none; }
  .rph.rph-fija .rph-meta { flex: 0 0 auto; width: auto; }
  .rph.rph-fija .rph-btn, .rph.rph-fija .rp-btn, .rph.rph-fija .rph-meta select { flex: 0 0 auto; }
}
@media (prefers-reduced-motion: reduce) { .rph.rph-fija { animation: none; } }

/* v8.8 · crédito por cobrar en «Mi día» y tarjeta «Por cobrar» */
.vh-cred { display: block; font-size: .82rem; font-weight: 700; opacity: .95; margin-top: 3px; font-variant-numeric: tabular-nums; }
.vh-cred i { margin-right: 4px; }
.ig-tj.cob .ig-t i { color: #16a34a; margin-right: 4px; } .ig-tj.cob .ig-v { color: #15803d; font-size: 1.35rem; } .ig-tj.cob.hay .ig-v { color: var(--rp-c1, #6d0c40); }
.ig-tj.cob .stk-bt { background: #16a34a; text-decoration: none; } .ig-tj.cob.hay .stk-bt { background: #dc2626; }
#vh-hoy { -webkit-line-clamp: 4; }   /* la línea del crédito por cobrar no se corta */

/* Neurona de ANTARES en lugar de la casita (Inicio) */
.ant-ico { display: inline-block; width: 1em; height: 1em; vertical-align: -.125em; flex-shrink: 0; }
.rph-btn .ant-ico { font-size: 1.15em; }
.rph-logo .ant-ico { width: 34px; height: 34px; color: var(--rp-ico-cab,#fff); }
.rph .rph-btn:not(:hover) .ant-ico { color: var(--rp-ico-cab,#fff); }
.rph.rph-n3 .rph-btn .ant-ico { font-size: 1.25rem; }
