@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 0.2; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.text-vr-gradient {
  background: linear-gradient(135deg, #0070f3 0%, #7928ca 50%, #00d2ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nfc-ring {
  animation: pulse-ring 2s infinite ease-in-out;
}

.custom-scrollbar::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

/* ─── Navegación lateral (cliente) ─── */
.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.625rem 0.875rem;
  border-radius: 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  transition: all 0.15s ease;
  cursor: pointer;
  border: none;
  background: transparent;
  text-align: left;
}
.nav-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.nav-item.active {
  background: #2563eb;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.25);
}
.nav-item.active .nav-badge {
  background: rgba(255,255,255,0.25);
  color: #fff;
}
.nav-item-biz.active {
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 700;
  border: 1px solid #bfdbfe;
}
.nav-badge {
  font-size: 10px;
  font-family: ui-monospace, monospace;
  font-weight: 700;
  background: #e2e8f0;
  color: #334155;
  padding: 0.125rem 0.375rem;
  border-radius: 0.375rem;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  padding: 0 0.75rem;
  margin-bottom: 0.35rem;
}

/* ─── Sub-pestañas de negocio ─── */
.biz-subnav {
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  padding: 0.35rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.biz-subnav::-webkit-scrollbar { height: 0; }

.biz-tab {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  border-radius: 0.7rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: #64748b;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.biz-tab:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.biz-tab.active {
  background: #0f172a;
  color: #fff;
}
.biz-tab .tab-icon {
  font-size: 0.75rem;
  opacity: 0.85;
}
.biz-tab.active .tab-icon {
  opacity: 1;
  color: #00d2ff;
}

/* ─── Paneles de pestaña ─── */
.tab-panel {
  display: none;
  animation: fadeIn 0.2s ease;
}
.tab-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Admin: pestañas de detalle cliente ─── */
.admin-tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 1.25rem;
}
.admin-tab {
  padding: 0.6rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
  border-bottom: 2px solid transparent;
  background: transparent;
  border-top: none;
  border-left: none;
  border-right: none;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-bottom: -1px;
}
.admin-tab:hover { color: #0f172a; }
.admin-tab.active {
  color: #2563eb;
  border-bottom-color: #2563eb;
}

/* Sticky subnav when scrolling */
.subnav-sticky {
  position: sticky;
  top: 0;
  z-index: 15;
  background: #f1f5f9;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  margin: -0.5rem -0.25rem 0.75rem;
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}

/* Leaflet map inside cards */
#client-locations-map {
  width: 100%;
  min-height: 16rem;
}
.leaflet-container {
  font-family: "Plus Jakarta Sans", sans-serif;
  z-index: 0;
}
.vr-map-popup {
  font-size: 12px;
  line-height: 1.35;
}
.vr-map-popup strong {
  display: block;
  font-size: 13px;
  margin-bottom: 2px;
}


/* Sidebar colapsable */
.office-sidebar {
  transition: width 0.22s ease, min-width 0.22s ease, margin 0.22s ease, opacity 0.2s ease;
  overflow: hidden;
}
body.sidebar-collapsed .office-sidebar {
  width: 0 !important;
  min-width: 0 !important;
  border-right-width: 0;
  opacity: 0;
  pointer-events: none;
}
body.sidebar-collapsed.sidebar-pinned .office-sidebar {
  /* pinned overrides collapse only when user expands? pin means stay open */
}
body.sidebar-pinned #btn-pin-sidebar {
  background: #dbeafe;
  color: #1d4ed8;
}
