/* ── BITÁCORA ──
   [v2026.09.28-1] navbar.css
   2026-09-28 | El ticket "IA" cuando el plan no trae asistente o la empresa está por activar
     (connection-status.js [v2026.09.28-1]; alternativa C del preview, aprobada por Alberto):
     + .hv-luz-plan: el candadito en lugar de la luz, igual al de la barra lateral (círculo
       blanco, candado ámbar). + .hv-tk-sin-ia: "IA" más apagado. + .hv-luz-apagada: gris,
       sin parpadeo (por activar: no es un problema, todavía no parte).
     + En el globo: .hv-e-plan (candado ámbar y texto gris), .hv-e-gris, .hv-g-txt (párrafo)
       y .hv-g-guardado (los tokens que le quedan).
   [v2026.09.16-2] navbar.css
   2026-09-16 (2) | − .hv-nav-tk-mt: el saldo de tokens ya no va al lado de "IA" en la navbar
     (ajuste de Alberto); queda solo en el globo.
   [v2026.09.16-1] navbar.css
   2026-09-16 | + Los dos tickets de la navbar (Servicios e IA) y su globo (preview aprobado):
     .hv-nav-tk, la luz de color (.hv-luz-ok/bajo/cero/rev/sin) y .hv-nav-globo, blanco con
     texto gris suave y borde fino, como el resto de los globos del sitio. En celular los
     tickets se ocultan igual que el indicador anterior (.hv-nav-status).
*/
/* ── HEAVENSY NAV ── */
.hv-nav {
  position: sticky; top: 0; z-index: 1000;
  height: 54px;
  background: #5a79d4;
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(150, 175, 255, 0.16);
  display: flex; align-items: center;
  padding: 0 24px; gap: 16px;
  box-shadow: 0 2px 20px rgba(10, 20, 70, 0.4);
}

/* Brand */
.hv-nav-brand {
  display: flex; align-items: center; gap: 9px;
  text-decoration: none; flex-shrink: 0;
}
.hv-nav-logo {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #9961FF 0%, #5b8dee 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(153, 97, 255, 0.4);
}
.hv-nav-name {
  font-size: 16px; font-weight: 400; color: #fff;
  font-family: 'Poppins', sans-serif; letter-spacing: .2px;
}

.hv-nav-links {
  display: flex; align-items: center; gap: 6px;
}
.hv-nav-link {
  font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,0.78);
  text-decoration: none; padding: 4px 12px;
  border-radius: 6px;
  transition: background .2s, color .2s;
  white-space: nowrap;
}
.hv-nav-link:hover { background: rgba(255,255,255,0.10); color: #fff; }

/* Center button */
.hv-nav-center-btn {
  font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,0.82);
  background: rgba(255,255,255,0.09);
  border: 1px solid rgba(255,255,255,0.14);
  padding: 5px 14px; border-radius: 20px;
  cursor: pointer;
  transition: background .2s, color .2s;
  white-space: nowrap; display: flex; align-items: center;
}
.hv-nav-center-btn:hover { background: rgba(255,255,255,0.16); color: #fff; }

/* Right section */
.hv-nav-right {
  display: flex; align-items: center; gap: 12px;
  flex-shrink: 0;
}

/* Bell */
.hv-nav-bell {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: rgba(255,255,255,0.75);
  flex-shrink: 0;
}
.hv-nav-bell:hover { color: #fff; }
.hv-nav-bell-dot {
  position: absolute; top: -6px; right: -6px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #9961FF;
  border: 1.5px solid rgba(70, 90, 180, 0.96);
  font-size: 9px; font-weight: 700; color: #fff;
  font-family: Arial, sans-serif;
  display: grid; place-items: center;
  line-height: 0;
}

/* Status */
.hv-nav-status {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600;
  color: rgba(255,255,255,0.72);
  white-space: nowrap;
}
.hv-nav-status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #4ADE80;
  box-shadow: 0 0 7px rgba(74, 222, 128, 0.8);
  flex-shrink: 0;
}

/* ── [16-09] Tickets: Servicios e IA ─────────────────────────────────────── */
.hv-nav-tk {
  display: flex; align-items: center; gap: 7px;
  padding: 5px 9px; border-radius: 8px; cursor: default;
  font-size: 12px; font-weight: 700; color: rgba(255,255,255,0.9);
  white-space: nowrap; flex-shrink: 0; transition: background .15s;
}
.hv-nav-tk:hover, .hv-nav-tk.abierto { background: rgba(255,255,255,0.12); }
.hv-nav-tk-ico { font-size: 13px; opacity: .92; }
.hv-nav-tk-luz { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.hv-luz-ok   { background: #4ADE80; box-shadow: 0 0 6px rgba(74,222,128,.8); }
.hv-luz-bajo { background: #fbbf24; box-shadow: 0 0 6px rgba(251,191,36,.8); }
.hv-luz-cero { background: #f87171; box-shadow: 0 0 6px rgba(248,113,113,.85); animation: hvLuzLate 1.6s infinite; }
.hv-luz-rev  { background: #facc15; animation: hvLuzLate 1s infinite; }
.hv-luz-sin  { background: #c4b5fd; box-shadow: 0 0 6px rgba(196,181,253,.8); }
/* [28-09-2026] Por activar: gris y quieta. Plan sin asistente: el candadito de la barra lateral. */
.hv-luz-apagada { background: #cbd5e1; }
.hv-luz-plan { width: 13px; height: 13px; background: #fff; color: #b7791f; font-size: 7.5px;
  display: grid; place-items: center; box-shadow: 0 0 0 1px #f0e0bd; }
.hv-nav-tk.hv-tk-sin-ia { color: rgba(255,255,255,0.62); }
@keyframes hvLuzLate { 50% { opacity: .45; } }

/* El globo de los tickets: vive en el <body>, bajo el ticket, y se queda abierto al entrar en él */
.hv-nav-globo {
  position: fixed; z-index: 2100; width: 300px; display: none;
  background: #fff; border: 1px solid #e4e7f2; border-radius: 12px;
  box-shadow: 0 14px 34px rgba(31,36,51,.16);
  color: #6b7280; font: 500 12.5px 'DM Sans', sans-serif; text-align: left;
}
.hv-nav-globo.ver { display: block; }
.hv-nav-globo::before {
  content: ""; position: absolute; top: -6px; right: var(--hv-flecha, 22px);
  width: 10px; height: 10px; background: #fff;
  border-left: 1px solid #e4e7f2; border-top: 1px solid #e4e7f2; transform: rotate(45deg);
}
.hv-g-cab { padding: 12px 14px 10px; border-bottom: 1px solid #f1f2f7; }
.hv-g-cab b { display: block; color: #1f2433; font-size: 13px; margin-bottom: 2px; }
.hv-g-cuerpo { padding: 10px 14px; display: grid; gap: 8px; }
.hv-g-fila { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.hv-g-fila span:last-child { color: #1f2433; font-weight: 700; }
.hv-g-grande { font-size: 22px; font-weight: 800; color: #1f2433; }
.hv-g-est { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.hv-g-est i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.hv-e-ok { color: #1D8A63; }   .hv-e-ok i { background: #1D8A63; }
.hv-e-bajo { color: #854F0B; } .hv-e-bajo i { background: #C98A16; }
.hv-e-cero { color: #B3261E; } .hv-e-cero i { background: #B3261E; }
.hv-e-sin { color: #6d5bd0; }  .hv-e-sin i { background: #8b7bf0; }
/* [28-09-2026] Plan sin asistente y empresa por activar */
.hv-e-plan { color: #6b7280; }
.hv-e-plan i.fa-lock { width: auto; height: auto; border-radius: 0; background: none; color: #b7791f; font-size: 11px; }
.hv-e-gris { color: #6b7280; } .hv-e-gris i { background: #cbd5e1; }
.hv-g-txt { line-height: 1.5; }
.hv-g-txt b { color: #1f2433; }
.hv-g-guardado { background: #f7f8fc; border-radius: 8px; padding: 8px 10px; font-size: 12px; }
.hv-g-guardado small { display: block; color: #9ca3af; margin-top: 2px; line-height: 1.4; }
.hv-g-pie small { line-height: 1.4; }
.hv-g-aviso { border-radius: 8px; padding: 8px 10px; font-size: 12px; }
.hv-g-aviso.bajo { background: #FAEEDA; color: #854F0B; }
.hv-g-aviso.cero { background: #FDECEA; color: #B3261E; }
.hv-g-pie { padding: 10px 14px 12px; border-top: 1px solid #f1f2f7; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.hv-g-pie small { color: #9ca3af; }
.hv-g-btn { background: #7c3aed; color: #fff; border-radius: 8px; padding: 7px 12px; font-weight: 700; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.hv-g-btn:hover { background: #6a2fd6; color: #fff; }
.hv-g-btn.sec { background: #F3EEFF; color: #7c3aed; }
.hv-g-btn.sec:hover { background: #e9deff; color: #6a2fd6; }
.hv-g-srv { display: grid; grid-template-columns: 12px 1fr auto; gap: 6px 8px; align-items: center; }
.hv-g-srv .luz { width: 8px; height: 8px; border-radius: 50%; }
.hv-g-srv b { color: #1f2433; font-weight: 700; }
.hv-g-srv small { color: #9ca3af; }
.hv-g-srv .v { font-weight: 700; }
.hv-g-srv .v.ok { color: #1D8A63; } .hv-g-srv .v.lento { color: #854F0B; } .hv-g-srv .v.mal { color: #B3261E; }

/* Divider */
.hv-nav-divider {
  width: 1px; height: 22px;
  background: rgba(255,255,255,0.15);
  flex-shrink: 0;
}

/* User */
.hv-nav-user {
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; padding: 3px 4px 3px 4px;
  border-radius: 22px;
  transition: background .2s;
}
.hv-nav-user:hover { background: rgba(255,255,255,0.09); }
.hv-nav-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, #9961FF, #5b8dee);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff;
  flex-shrink: 0; overflow: hidden;
  border: 1.5px solid rgba(255,255,255,0.25);
}
.hv-nav-avatar img { width: 100%; height: 100%; object-fit: cover; }
.hv-nav-user-name {
  font-size: 13px; font-weight: 600;
  color: rgba(255,255,255,0.88);
  white-space: nowrap;
}
.hv-nav-chevron { color: rgba(255,255,255,0.45); flex-shrink: 0; transition: transform .2s; }
.hv-nav-user.open .hv-nav-chevron { transform: rotate(180deg); }

/* Dropdown */
.hv-nav-user-wrap { position: relative; }
.hv-nav-dropdown {
  display: none; position: absolute; top: calc(100% + 10px); right: 0;
  background: rgba(30, 40, 105, 0.97);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(150,175,255,0.2);
  border-radius: 12px; min-width: 170px;
  box-shadow: 0 8px 28px rgba(10,20,80,0.45);
  overflow: hidden; z-index: 2000;
}
.hv-nav-dropdown.open { display: block; }
.hv-nav-dropdown a {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px;
  font-size: 13px; font-weight: 500; color: rgba(255,255,255,0.85);
  text-decoration: none; transition: background .15s;
  font-family: 'Poppins', sans-serif;
}
.hv-nav-dropdown a:hover { background: rgba(255,255,255,0.09); color: #fff; }
.hv-nav-dropdown a.danger { color: rgba(255,100,100,0.85); }
.hv-nav-dropdown a.danger:hover { background: rgba(255,80,80,0.1); color: #ff7070; }
.hv-nav-dropdown-sep { height: 1px; background: rgba(150,175,255,0.15); margin: 4px 0; }

/* Mobile */
@media (max-width: 600px) {
  .hv-nav { padding: 0 14px; gap: 10px; }
  .hv-nav-status { display: none; }
  .hv-nav-tk { display: none; }   /* [16-09] como el indicador anterior */
  .hv-nav-divider { display: none; }
  .hv-nav-link { padding: 5px 10px; font-size: 11.5px; }
  .hv-nav-user-name { display: none; }
}