/* Nexus app switcher (hub bar) + extra side-rail app icons.
   Uses the app's existing theme variables so it matches light/dark. */

.hub-switch {
  position: relative;
  margin-left: auto; /* push to the far right of the hub bar */
}

.hub-switch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.hub-switch-btn:hover {
  background: var(--panel-2);
  color: var(--text);
}
.hub-switch-btn svg { width: 18px; height: 18px; }

.hub-switch-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 260px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg, 14px);
  box-shadow: var(--shadow-md, 0 4px 12px rgba(16,24,40,.10));
  z-index: 70;
  overflow: hidden;
  animation: hubSwitchIn .14s ease-out;
}
@keyframes hubSwitchIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hub-switch-head {
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.hub-switch-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  padding: 8px;
}

.hub-switch-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 12px 6px;
  border-radius: 10px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
  transition: background .12s;
}
.hub-switch-item:hover { background: var(--panel-2); }
.hub-switch-item svg { width: 22px; height: 22px; color: var(--brand-green, #20a052); }
.hub-switch-item span {
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
}
.hub-switch-item.is-current {
  cursor: default;
  background: var(--panel-2);
}
.hub-switch-item.is-current svg { color: var(--muted); }

/* Side-rail icons for the new CRM and Service links (mask-based, matching the
   existing rail icon style). */
.side-rail .tab[data-icon="crm"] .rail-ico {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/><circle cx='9' cy='7' r='4'/><path d='M22 21v-2a4 4 0 0 0-3-3.87'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/><circle cx='9' cy='7' r='4'/><path d='M22 21v-2a4 4 0 0 0-3-3.87'/></svg>");
}
.side-rail .tab[data-icon="service"] .rail-ico {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M14.7 6.3a4 4 0 0 0-5.4 5.4L3 18v3h3l6.3-6.3a4 4 0 0 0 5.4-5.4l-2.5 2.5-2.1-2.1z'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M14.7 6.3a4 4 0 0 0-5.4 5.4L3 18v3h3l6.3-6.3a4 4 0 0 0 5.4-5.4l-2.5 2.5-2.1-2.1z'/></svg>");
}
