/* Canonical PULSE shell shared by B2B and Employee.
   Product content and product-specific controls stay local. */

.shell-top {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  min-height: 78px;
  padding: 16px 24px;
  background: color-mix(in srgb, var(--background) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.btn-round {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--borderSubtle);
  border-radius: 50%;
  background: var(--surface);
  color: var(--mutedForeground);
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, transform 150ms ease;
}

.btn-round:hover {
  background: var(--muted);
  color: var(--foreground);
}

.btn-round:active { transform: scale(0.96); }

.dot-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border: 2px solid var(--background);
  border-radius: 9px;
  background: var(--accent);
  color: var(--accentForeground);
  font: 10px/1 ui-monospace, Menlo, monospace;
}

.brand-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  user-select: none;
}

.brand-center .venue-name {
  font-size: clamp(26px, 3.2vw, 40px);
  letter-spacing: 0.08em;
  line-height: 1;
}

.brand-center .brand-sub {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 3px;
  color: var(--subtleForeground);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.top-actions {
  display: flex;
  gap: 10px;
  margin-left: auto;
}

.content {
  width: 100%;
  max-width: min(94vw, 1880px);
  margin: 0 auto;
  padding: 22px 28px 150px;
}

.dock-wrap {
  position: fixed;
  bottom: 18px;
  left: 50%;
  z-index: 45;
  display: flex;
  max-width: calc(100vw - 24px);
  transform: translateX(-50%);
}

.dock {
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: calc(100vw - 24px);
  padding: 8px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  box-shadow: var(--shadow-lg);
  scrollbar-width: none;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.dock::-webkit-scrollbar { display: none; }

.dock-item {
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
  padding: 9px 16px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--mutedForeground);
  font: 14px/1.25 inherit;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: background 140ms ease, color 140ms ease, opacity 140ms ease, transform 140ms ease;
}

.dock-item:hover {
  background: var(--muted);
  color: var(--foreground);
}

.dock-item.active,
.dock-item[aria-current="page"] {
  background: var(--primary);
  color: var(--primaryForeground);
}

.dock-item:active { transform: scale(0.97); }
.dock-item.dragging { opacity: 0.35; }
.dock-icon { display: flex; width: 40px; align-items: center; justify-content: center; padding: 9px 0; }
.dock-sep { width: 1px; height: 22px; margin: 0 4px; flex: 0 0 auto; background: var(--borderSubtle); }

.dock-cust {
  width: min(600px, calc(100vw - 32px));
  max-height: min(560px, calc(100vh - 120px));
  padding: 20px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surfaceElevated);
  box-shadow: var(--shadow-lg), inset 0 1px 0 color-mix(in srgb, var(--foreground) 7%, transparent);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
}

.dock-cust .dc-title { margin: 0 0 3px; font-size: 17px; font-weight: 500; }
.dock-cust .dc-sub { margin: 0; color: var(--subtleForeground); font-size: 13px; }
.cust-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 8px; margin-top: 16px; }
.cust-tile { min-height: 44px; padding: 12px 13px; border: 1px solid var(--borderSubtle); border-radius: 13px; background: var(--surface); color: var(--mutedForeground); font: 14px/1.3 inherit; text-align: left; cursor: pointer; }
.cust-tile.active { border-color: var(--accent); background: var(--accent-soft); color: var(--foreground); }

.ai-fab {
  position: fixed;
  right: 22px;
  bottom: 26px;
  z-index: 46;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  padding: 0;
  border: 1px solid var(--accent);
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent);
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease;
}

.ai-fab:hover {
  transform: translateY(-2px);
  background: var(--accent-soft);
}

.pulse-word { display: inline-flex; }

.pulse-word .pl {
  color: #666;
  animation: pulseLetterSweep 2450ms linear infinite;
}

.pulse-word .pl:nth-child(1) { animation-delay: 0ms; }
.pulse-word .pl:nth-child(2) { animation-delay: 150ms; }
.pulse-word .pl:nth-child(3) { animation-delay: 300ms; }
.pulse-word .pl:nth-child(4) { animation-delay: 450ms; }
.pulse-word .pl:nth-child(5) { animation-delay: 600ms; }

@keyframes pulseLetterSweep {
  0% { color: #666; text-shadow: 0 0 0 transparent; }
  16% { color: #6c38cc; text-shadow: 0 0 15px rgba(108, 56, 204, 0.8); }
  68%, 100% { color: #666; text-shadow: 0 0 0 transparent; }
}

.hub-menu {
  position: fixed;
  top: 0;
  left: -360px;
  z-index: 70;
  display: flex;
  flex-direction: column;
  width: 330px;
  max-width: calc(100vw - 28px);
  height: 100vh;
  padding: 22px 16px;
  overflow-y: auto;
  border-right: 1px solid var(--border);
  background: var(--surface);
  transform: none;
  transition: left 280ms ease;
}

.hub-menu.open {
  left: 0;
  box-shadow: var(--shadow-lg);
}

.hub-brand {
  margin-bottom: 16px;
  padding: 6px 10px 18px;
  border-bottom: 1px solid var(--borderSubtle);
}

.hub-brand .venue { font-size: 22px; letter-spacing: 0.02em; }
.hub-brand .on-pulse { margin-top: 2px; font-size: 12px; letter-spacing: 0.24em; text-transform: uppercase; }
.rail-group { margin-bottom: 20px; }
.rail-group-label { margin-bottom: 8px; padding: 0 10px; color: var(--subtleForeground); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; }

.nav-item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  margin-bottom: 2px;
  padding: 9px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--mutedForeground);
  font: 15px/1.4 inherit;
  text-align: left;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}

.nav-item:hover { background: var(--muted); color: var(--foreground); }
.nav-item.active { background: var(--primary); color: var(--primaryForeground); }
.rail-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--borderSubtle); }
.hub-hint { margin-top: 10px; color: var(--subtleForeground); font-size: 12px; text-align: center; }

.theme-toggle,
.rail-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--borderSubtle);
  border-radius: 9px;
  background: var(--surfaceElevated);
  color: var(--mutedForeground);
  font: 14px/1.4 inherit;
  cursor: pointer;
}

.theme-toggle:hover,
.rail-logout:hover { background: var(--muted); color: var(--foreground); }
.rail-logout { margin-top: 8px; }

@media (max-width: 900px) {
  .brand-center { position: static; transform: none; }
  .shell-top { gap: 12px; }
}

@media (max-width: 620px) {
  .content { padding: 16px 16px 140px; }
  .shell-top { flex-wrap: wrap; row-gap: 8px; padding: 12px 16px 10px; }
  .brand-center { order: -1; flex: 1 1 100%; }
  .brand-center .venue-name { font-size: 20px; }
  .brand-center .brand-sub { letter-spacing: 0.16em; }
  .top-actions { gap: 6px; }
  .shell-top .btn-round { width: 44px; height: 44px; }
  .dock-item { padding: 8px 12px; font-size: 13px; }
  .dock {
    mask-image: linear-gradient(to right, transparent, #000 20px, #000 calc(100% - 20px), transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, #000 20px, #000 calc(100% - 20px), transparent);
  }
  .ai-fab { right: 16px; bottom: 88px; width: 46px; height: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  .pulse-word .pl { animation: none; color: #666; text-shadow: none; }
}
