:root {
  --s360-public-header-offset: 100px;
  --s360-bg-950: #ffffff;
  --s360-bg-900: #f6f9fb;
  --s360-bg-850: #eef4f7;
  --s360-ink: #000000;
  --s360-muted: rgba(42, 108, 136, 0.75);
  --s360-border: rgba(0, 0, 0, 0.12);
  --s360-border-strong: rgba(0, 0, 0, 0.18);
  --s360-border-subtle: rgba(0, 0, 0, 0.08);
  --s360-border-accent: rgba(42, 108, 136, 0.35);
  --s360-border-accent-strong: rgba(42, 108, 136, 0.55);
  --s360-brand: #2a6c88;
  --s360-brand-deep: #1f566b;
  --s360-accent: #2ca536;
  --s360-accent-2: #1f566b;
  --s360-highlight: #cfe3ec;
  --s360-success: #2ca536;
  --s360-warning: #2a6c88;
  --s360-danger: #000000;
  --s360-info: #2a6c88;
  --s360-surface-1: rgba(255, 255, 255, 0.9);
  --s360-surface-2: rgba(255, 255, 255, 0.82);
  --s360-surface-3: rgba(255, 255, 255, 0.96);
  --s360-glow-primary: rgba(42, 108, 136, 0.25);
  --s360-glow-secondary: rgba(42, 108, 136, 0.18);
  --s360-glow-accent: rgba(44, 165, 54, 0.22);
  --s360-glow-warn: rgba(42, 108, 136, 0.18);
  --s360-chip-bg: rgba(42, 108, 136, 0.12);
  --s360-chip-bg-strong: rgba(42, 108, 136, 0.2);
}

.s360-header {
  position: relative;
  z-index: 50;
  color: var(--s360-ink);
  background: linear-gradient(180deg, var(--s360-bg-950), var(--s360-bg-900));
  border-bottom: 1px solid var(--s360-border);
  overflow: visible;
  font-family: "Poppins", "Segoe UI", sans-serif;
}

 .s360-header__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
 }

 .s360-header__glow {
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
 }

.s360-header__glow.g1 {
  top: -220px;
  left: -140px;
  background: radial-gradient(circle at 30% 30%, rgba(42, 108, 136, 0.35), transparent 65%);
}

.s360-header__glow.g2 {
  top: -240px;
  right: -160px;
  background: radial-gradient(circle at 70% 30%, rgba(44, 165, 54, 0.32), transparent 60%);
}

.s360-header__scan {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(42, 108, 136, 0.15) 50%, transparent 100%);
  transform: translateX(-100%);
  animation: s360-scan 12s var(--s360-ease-out) infinite;
  opacity: 0.35;
 }

.s360-header__shell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 44px;
  max-width: 1280px;
  margin: 0 auto;
}

 .s360-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: inherit;
  text-decoration: none;
 }

.s360-brand__mark {
  position: relative;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: radial-gradient(circle at 30% 30%, rgba(42, 108, 136, 0.12), rgba(255, 255, 255, 0.95));
  border: 1px solid var(--s360-border-strong);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.12);
  transition: transform var(--s360-dur-fast) var(--s360-ease-out),
    border-color var(--s360-dur-fast) var(--s360-ease-out);
}

.s360-brand__logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.12));
}

.s360-brand__text {
  display: grid;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.95rem;
  color: var(--s360-muted);
}

 .s360-brand__top {
  font-weight: 600;
  color: var(--s360-ink);
 }

 .s360-brand__bot {
  font-weight: 500;
 }

.mark-ping {
  position: absolute;
  inset: -8px;
  border: 1px solid rgba(42, 108, 136, 0.45);
  border-radius: 50%;
  animation: s360-ping 3.6s ease-out infinite;
  opacity: 0;
}

.s360-brand:hover .s360-brand__mark {
  transform: translateY(-2px) scale(1.02);
  border-color: var(--s360-border-accent);
}

.s360-nav__rail {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px;
  border-radius: 999px;
  border: 1px solid var(--s360-border);
  background: var(--s360-surface-2);
}

.s360-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--s360-ink);
  text-decoration: none;
  font-size: 0.92rem;
  border: 1px solid transparent;
  transition: color var(--s360-dur-fast) var(--s360-ease-out),
    background var(--s360-dur-fast) var(--s360-ease-out),
    border-color var(--s360-dur-fast) var(--s360-ease-out),
    transform var(--s360-dur-fast) var(--s360-ease-out);
}

.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 600;
  color: #ffffff;
  background: var(--s360-accent);
  box-shadow: 0 8px 18px rgba(44, 165, 54, 0.25);
}

 .s360-nav__link i {
  font-size: 0.9rem;
  color: var(--s360-muted);
 }

.s360-nav__link .nav-ink {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(42, 108, 136, 0.12);
  opacity: 0;
  transition: opacity var(--s360-dur-fast) var(--s360-ease-out);
 }

.s360-nav__link:hover .nav-ink,
.s360-nav__link:focus-visible .nav-ink {
  opacity: 1;
}

.s360-nav__link:hover,
.s360-nav__link:focus-visible {
  border-color: var(--s360-border-accent);
  transform: none;
}

.s360-nav__link.is-ghost {
  color: var(--s360-muted);
}

.s360-nav__link.is-active {
  background: var(--s360-chip-bg-strong);
  border-color: var(--s360-border-accent-strong);
  color: var(--s360-ink);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
}

.s360-nav__link.is-active .nav-ink {
  opacity: 1;
}

.s360-nav__link.is-active i {
  color: var(--s360-ink);
}

.s360-header--public {
  background: transparent !important;
  border-bottom: none !important;
  border: 0 !important;
  padding: 10px 16px;
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 140;
  box-shadow: none !important;
  isolation: isolate;
}

.s360-header.s360-header--public {
  background: transparent !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
}

.s360-header--public::before,
.s360-header--public::after {
  content: none !important;
}

.s360-header--public .s360-header__bg,
.s360-header--public .s360-header__edge {
  display: none;
}

.s360-header--public .s360-header__shell {
  max-width: min(1680px, 96vw);
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(7, 44, 60, 0.02);
  box-shadow: 0 16px 34px rgba(6, 30, 41, 0.14);
  gap: 16px;
}

.s360-header--public .s360-brand__mark {
  background: rgba(8, 44, 60, 0.08);
  border-color: rgba(8, 44, 60, 0.18);
  box-shadow: none;
}

.s360-header--public .s360-brand__text {
  color: rgba(8, 44, 60, 0.7);
}

.s360-header--public .s360-brand__top {
  color: #082c3c;
}

.s360-header--public .s360-brand__bot {
  color: rgba(8, 44, 60, 0.6);
}

.s360-header--public .s360-nav__rail {
  background: rgba(8, 44, 60, 0.08);
  border-color: rgba(8, 44, 60, 0.16);
  padding: 5px 8px;
}

.s360-header--public .s360-nav__link {
  color: #083245;
}

.s360-header--public .s360-nav__link i {
  display: none;
}

.s360-header--public .s360-nav__link .nav-ink {
  background: rgba(42, 108, 136, 0.14);
}

.s360-header--public .s360-nav__link.is-active {
  background: rgba(42, 108, 136, 0.16);
  color: #082c3c;
  border-color: rgba(42, 108, 136, 0.32);
  box-shadow: 0 10px 22px rgba(6, 30, 41, 0.12);
}

.s360-header--public .s360-nav__link.is-active i {
  color: #082c3c;
}

.s360-header--public .s360-nav__link.is-active .nav-ink {
  opacity: 0;
}

.s360-header--public .s360-btn {
  background: rgba(8, 44, 60, 0.08);
  color: #0d2c3a;
  border-color: rgba(8, 44, 60, 0.18);
  box-shadow: none;
}

.s360-header--public .s360-btn--ghost {
  background: linear-gradient(135deg, #2a6c88, #1f566b);
  color: #ffffff;
  border-color: rgba(12, 64, 86, 0.45);
  box-shadow: 0 12px 26px rgba(24, 96, 120, 0.24);
}

.s360-header--public .s360-btn--primary {
  background: linear-gradient(135deg, #2a6c88, #2ca536);
  color: #ffffff;
  border-color: rgba(12, 64, 86, 0.45);
  box-shadow: 0 14px 30px rgba(24, 96, 120, 0.28);
}

.s360-header--public .s360-btn--ghost:hover {
  background: linear-gradient(135deg, #255f78, #194b5d);
  border-color: rgba(12, 64, 86, 0.6);
  color: #ffffff;
}

.s360-header--public .s360-btn:hover {
  transform: none;
}

.s360-header--public .btn-ic {
  background: rgba(8, 44, 60, 0.12);
  border-color: rgba(8, 44, 60, 0.2);
}

html[data-s360-public-offset="on"] :is(.s360-public, .s360-contact-page, .login-container) {
  padding-top: max(var(--s360-public-header-offset), 72px);
}

html[data-s360-public-offset="on"] .s360-support__hero {
  padding-top: max(calc(var(--s360-public-header-offset) + 10px), 106px);
}

.s360-header--auth {
  background: transparent;
  border-bottom: none;
  padding: 0;
}

html[data-s360-layout="sidebar"] {
  --s360-sidebar-width: 226px;
  --s360-sidebar-width-collapsed: 70px;
  --s360-appbar-height: 66px;
  --s360-main-offset: calc(var(--s360-sidebar-width) + 16px);
  --s360-main-offset-collapsed: calc(var(--s360-sidebar-width-collapsed) + 16px);
}

.s360-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--s360-sidebar-width);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 8px;
  border-right: 1px solid var(--s360-border);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 8px 0 24px rgba(0, 0, 0, 0.06);
  z-index: 60;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
}

.s360-sidebar__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 4px 8px;
}

.s360-brand--sidebar .s360-brand__mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  box-shadow: none;
}

.s360-brand--sidebar .s360-brand__text {
  letter-spacing: 0.1em;
  font-size: 0.8rem;
}

.s360-sidebar__toggle {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid var(--s360-border);
  background: rgba(255, 255, 255, 0.9);
  color: var(--s360-ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color var(--s360-dur-fast) var(--s360-ease-out),
    background var(--s360-dur-fast) var(--s360-ease-out);
}

.s360-sidebar__toggle:hover {
  border-color: var(--s360-border-accent);
  background: rgba(42, 108, 136, 0.08);
}

.s360-sidebar__nav {
  display: grid;
  align-content: start;
  gap: 10px;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0;
}

.s360-sidebar__group {
  display: grid;
  gap: 4px;
}

.s360-sidebar__nest {
  display: grid;
  gap: 2px;
  font-size: 0.84rem;
}

.s360-sidebar__label {
  padding: 0 8px 4px;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--s360-muted);
}

.s360-sidebar__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--s360-ink);
  font-size: 0.83rem;
  border: 1px solid transparent;
  transition: border-color var(--s360-dur-fast) var(--s360-ease-out),
    background var(--s360-dur-fast) var(--s360-ease-out),
    color var(--s360-dur-fast) var(--s360-ease-out);
  min-height: 34px;
}

.s360-sidebar__link--group {
  width: 100%;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  font-weight: 500;
  line-height: 1.2;
  color: inherit;
  text-align: left;
}

.s360-sidebar__link i {
  width: 14px;
  font-size: 0.84rem;
  text-align: center;
  color: var(--s360-muted);
  transition: color 160ms ease;
}

/* ── Per-destination icon accent colors ─────────────────────────────────── */
.s360-sidebar__link[href="/Overview"] i                              { color: #0d9488; }
[data-group-key="analytics-sales"] .s360-sidebar__link--group i     { color: #7c3aed; }
[data-group-key="analytics-finance"] .s360-sidebar__link--group i   { color: #16a34a; }
[data-group-key="analytics-customer-success"] .s360-sidebar__link--group i { color: #2563eb; }
.s360-sidebar__link[href="/Reports"] i                               { color: #d97706; }
.s360-sidebar__link[href="/Notifications"] i                         { color: #e11d48; }
.s360-sidebar__link[href="/Settings"] i                              { color: #64748b; }
.s360-sidebar__link[href="/Support"] i                               { color: #0891b2; }

/* Active state keeps the same accent instead of going generic */
.s360-sidebar__link.is-active[href="/Overview"] i                    { color: #0d9488; }
[data-group-key="analytics-sales"] .s360-sidebar__link--group.is-active i     { color: #7c3aed; }
[data-group-key="analytics-finance"] .s360-sidebar__link--group.is-active i   { color: #16a34a; }
[data-group-key="analytics-customer-success"] .s360-sidebar__link--group.is-active i { color: #2563eb; }
.s360-sidebar__link.is-active[href="/Reports"] i                     { color: #d97706; }
.s360-sidebar__link.is-active[href="/Notifications"] i               { color: #e11d48; }
.s360-sidebar__link.is-active[href="/Support"] i                     { color: #0891b2; }

/* Dark mode */
[data-s360-theme="dark"] .s360-sidebar__link[href="/Overview"] i                { color: #2dd4bf; }
[data-s360-theme="dark"] [data-group-key="analytics-sales"] .s360-sidebar__link--group i     { color: #a78bfa; }
[data-s360-theme="dark"] [data-group-key="analytics-finance"] .s360-sidebar__link--group i   { color: #4ade80; }
[data-s360-theme="dark"] [data-group-key="analytics-customer-success"] .s360-sidebar__link--group i { color: #60a5fa; }
[data-s360-theme="dark"] .s360-sidebar__link[href="/Reports"] i                 { color: #fbbf24; }
[data-s360-theme="dark"] .s360-sidebar__link[href="/Notifications"] i           { color: #fb7185; }
[data-s360-theme="dark"] .s360-sidebar__link[href="/Support"] i                 { color: #38bdf8; }

.s360-sidebar__link .nav-badge {
  margin-left: auto;
}

.s360-sidebar__text {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.s360-sidebar__caret {
  margin-left: auto;
  font-size: 0.72rem;
  color: rgba(42, 108, 136, 0.88);
  transition: transform var(--s360-dur-fast) var(--s360-ease-out);
}

.s360-sidebar__subnav {
  display: grid;
  gap: 2px;
  margin-left: 15px;
  margin-right: 6px;
  border-left: 1px solid var(--s360-border-subtle);
  padding-left: 10px;
  padding-right: 4px;
  max-height: 0;
  opacity: 0;
  visibility: hidden;
  overflow: hidden;
  pointer-events: none;
  transition:
    max-height 180ms var(--s360-ease-out),
    opacity 140ms var(--s360-ease-out),
    visibility 0s linear 180ms;
}

.s360-sidebar__nest[data-open="true"] .s360-sidebar__subnav {
  max-height: 360px;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    max-height 180ms var(--s360-ease-out),
    opacity 140ms var(--s360-ease-out),
    visibility 0s;
}

.s360-sidebar__nest[data-open="true"] .s360-sidebar__caret {
  transform: rotate(180deg);
}

.s360-sidebar__sublink {
  position: relative;
  display: flex;
  width: 100%;
  box-sizing: border-box;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 6px 7px;
  border-radius: 9px;
  text-decoration: none;
  color: rgba(8, 44, 60, 0.86);
  font-size: 0.77rem;
  border: 1px solid transparent;
  transition: border-color var(--s360-dur-fast) var(--s360-ease-out),
    background var(--s360-dur-fast) var(--s360-ease-out),
    color var(--s360-dur-fast) var(--s360-ease-out);
}

.s360-sidebar__sublink .s360-sidebar__text {
  flex: 1 1 auto;
  min-width: 0;
}

.s360-sidebar__dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(42, 108, 136, 0.42);
  flex-shrink: 0;
}

.s360-sidebar__sublink:hover {
  border-color: var(--s360-border-accent);
  background: rgba(42, 108, 136, 0.08);
}

.s360-sidebar__sublink.is-active {
  border-color: var(--s360-border-accent-strong);
  background: rgba(42, 108, 136, 0.16);
  color: var(--s360-ink);
}

.s360-sidebar__sublink.is-active .s360-sidebar__dot {
  background: var(--s360-accent);
}

.s360-sidebar__link::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 50%;
  width: 2px;
  height: 58%;
  border-radius: 999px;
  background: var(--s360-accent);
  opacity: 0;
  transform: translateY(-50%) scaleY(0.6);
  transition: opacity var(--s360-dur-fast) var(--s360-ease-out),
    transform var(--s360-dur-fast) var(--s360-ease-out);
}

.s360-sidebar__ink {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(42, 108, 136, 0.12);
  opacity: 0;
  transition: opacity var(--s360-dur-fast) var(--s360-ease-out);
  z-index: 0;
}

.s360-sidebar__link > * {
  position: relative;
  z-index: 1;
}

.s360-sidebar__link:hover {
  border-color: var(--s360-border-accent);
  background: var(--s360-surface-1);
}

.s360-sidebar__link:hover .s360-sidebar__ink {
  opacity: 1;
}

.s360-sidebar__link.is-active {
  background: var(--s360-surface-1);
  border-color: var(--s360-border-accent-strong);
  box-shadow: inset 0 0 0 1px rgba(42, 108, 136, 0.06);
}

.s360-sidebar__link.is-active .s360-sidebar__ink {
  opacity: 1;
}

.s360-sidebar__link.is-active i {
  color: var(--s360-ink);
}

.s360-sidebar__link:hover::before,
.s360-sidebar__link.is-active::before {
  opacity: 1;
  transform: translateY(-50%) scaleY(1);
}

.s360-sidebar__bottom {
  display: grid;
  gap: 4px;
  padding: 8px 4px 4px;
  border-top: 1px solid var(--s360-border-subtle);
}

.s360-sidebar__footer {
  display: grid;
  gap: 8px;
  padding: 8px 4px 4px;
  border-top: 1px solid var(--s360-border-subtle);
}

.s360-sidebar__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid var(--s360-border);
  background: rgba(255, 255, 255, 0.9);
  color: var(--s360-ink);
  text-decoration: none;
  transition: border-color var(--s360-dur-fast) var(--s360-ease-out),
    background var(--s360-dur-fast) var(--s360-ease-out);
}

.s360-sidebar__cta .btn-ic {
  width: 28px;
  height: 28px;
  background: rgba(44, 165, 54, 0.12);
  border-color: rgba(44, 165, 54, 0.22);
}

.s360-sidebar__cta:hover {
  border-color: var(--s360-border-accent);
}

html[data-s360-layout="sidebar"] .s360-app {
  padding-left: var(--s360-main-offset);
  padding-top: calc(var(--s360-appbar-height) + 18px);
}

html[data-s360-layout="sidebar"][data-s360-sidebar="collapsed"] .s360-app {
  padding-left: var(--s360-main-offset-collapsed);
}

html[data-s360-sidebar="collapsed"] .s360-sidebar {
  width: var(--s360-sidebar-width-collapsed);
}

html[data-s360-sidebar="collapsed"] .s360-brand--sidebar .s360-brand__text,
html[data-s360-sidebar="collapsed"] .s360-sidebar__text,
html[data-s360-sidebar="collapsed"] .s360-sidebar__label,
html[data-s360-sidebar="collapsed"] .s360-sidebar__cta .s360-sidebar__text {
  display: none;
}

html[data-s360-sidebar="collapsed"] .s360-sidebar__subnav {
  display: none;
}

html[data-s360-sidebar="collapsed"] .s360-sidebar__caret {
  display: none;
}

html[data-s360-sidebar="collapsed"] .s360-sidebar__link {
  width: 38px;
  min-height: 34px;
  margin-inline: auto;
  padding: 0;
  justify-content: center;
}

html[data-s360-sidebar="collapsed"] .s360-sidebar__link::before {
  opacity: 0;
}

html[data-s360-sidebar="collapsed"] .s360-sidebar__ink {
  display: none;
}

html[data-s360-sidebar="collapsed"] .s360-sidebar__link .nav-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 10px;
  width: 10px;
  height: 10px;
  padding: 0;
  font-size: 0;
}

html[data-s360-sidebar="collapsed"] .s360-sidebar__top {
  flex-direction: column;
  gap: 6px;
}

html[data-s360-sidebar="collapsed"] .s360-sidebar__cta {
  width: 38px;
  padding: 5px;
  margin-inline: auto;
  justify-content: center;
}

html[data-s360-layout="sidebar"] .s360-footer {
  margin-left: var(--s360-sidebar-width);
}

html[data-s360-layout="sidebar"][data-s360-sidebar="collapsed"] .s360-footer {
  margin-left: var(--s360-sidebar-width-collapsed);
}

.s360-authbar {
  position: fixed;
  top: 0;
  left: var(--s360-sidebar-width);
  right: 0;
  height: var(--s360-appbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 22px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--s360-border);
  z-index: 55;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.05);
}

html[data-s360-sidebar="collapsed"] .s360-authbar {
  left: var(--s360-sidebar-width-collapsed);
}

.s360-authbar__left,
.s360-authbar__right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.s360-authbar__left {
  min-width: 0;
}

.s360-authbar__toggle {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--s360-border);
  background: rgba(255, 255, 255, 0.92);
  color: var(--s360-ink);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.s360-authbar__product {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(7, 44, 60, 0.86);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.s360-authbar__sep {
  width: 1px;
  height: 18px;
  background: var(--s360-border);
}

.s360-authbar__page {
  font-size: 1rem;
  font-weight: 600;
  color: var(--s360-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(42vw, 420px);
}

.s360-authbar__icon {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--s360-border);
  background: rgba(255, 255, 255, 0.92);
  color: rgba(8, 44, 60, 0.82);
  display: grid;
  place-items: center;
  text-decoration: none;
}

.s360-authbar__icon .nav-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 14px;
  height: 14px;
  font-size: 0.58rem;
  padding: 0 4px;
}

.s360-user--top .s360-userchip {
  padding: 6px 8px;
  border-radius: 10px;
  box-shadow: none;
}

.s360-user--top .s360-userchip:hover {
  transform: none;
}

.s360-user--top .userchip-ic {
  width: 22px;
  height: 22px;
  border-radius: 7px;
}

.s360-user--top .userchip-name {
  font-size: 0.82rem;
}

 .s360-actions {
  display: flex;
  align-items: center;
  gap: 12px;
 }

.s360-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.92rem;
  text-decoration: none;
  color: var(--s360-ink);
  border: 1px solid var(--s360-border-strong);
  background: var(--s360-surface-3);
  backdrop-filter: blur(8px);
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
  transition: transform var(--s360-dur-fast) var(--s360-ease-out),
    border var(--s360-dur-fast) var(--s360-ease-out),
    background var(--s360-dur-fast) var(--s360-ease-out);
}

.s360-btn--primary {
  background: linear-gradient(120deg, rgba(44, 165, 54, 0.95), rgba(31, 137, 42, 0.95));
  border-color: var(--s360-border-accent-strong);
  box-shadow: 0 16px 38px rgba(44, 165, 54, 0.28);
  color: #ffffff;
}

.s360-btn--ghost {
  background: var(--s360-surface-2);
}

.s360-btn:hover {
  transform: translateY(-2px);
  border-color: var(--s360-border-accent);
}

.s360-btn .btn-sheen {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.22) 50%, transparent 100%);
  transform: translateX(-120%);
  opacity: 0;
 }

 .s360-btn:hover .btn-sheen {
  animation: s360-sheen 1.4s var(--s360-ease-out) forwards;
 }

.btn-ic {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.s360-user {
  position: relative;
}

.s360-userchip {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--s360-border-strong);
  background: var(--s360-surface-3);
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
  transition: transform var(--s360-dur-fast) var(--s360-ease-out),
    border-color var(--s360-dur-fast) var(--s360-ease-out);
}

.s360-userchip::-webkit-details-marker {
  display: none;
}

.s360-userchip:hover {
  transform: translateY(-2px);
  border-color: var(--s360-border-accent);
}

.userchip-ic {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(42, 108, 136, 0.18);
  color: var(--s360-ink);
}

.userchip-avatar {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  display: block;
}

.userchip-name {
  font-weight: 600;
}

.userchip-caret {
  color: var(--s360-muted);
}

.userchip-ping {
  position: absolute;
  inset: -6px;
  border-radius: 999px;
  border: 1px solid rgba(42, 108, 136, 0.3);
  opacity: 0;
  animation: s360-ping 4.6s ease-out infinite;
}

.s360-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 200px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--s360-border-strong);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.14);
  display: grid;
  gap: 6px;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity var(--s360-dur-fast) var(--s360-ease-out),
    transform var(--s360-dur-fast) var(--s360-ease-out);
  z-index: 60;
 }

 .s360-user[open] .s360-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
 }

 .s360-menu__item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--s360-ink);
  text-decoration: none;
  background: transparent;
  transition: background var(--s360-dur-fast) var(--s360-ease-out);
 }

.s360-menu__item:hover {
  background: rgba(42, 108, 136, 0.12);
}

.s360-menu__item.danger:hover {
  background: rgba(0, 0, 0, 0.08);
}

.s360-menu__sep {
  height: 1px;
  background: var(--s360-border);
  margin: 6px 0;
}

 .s360-header__edge {
  position: relative;
  height: 1px;
 }

.s360-header__edge .edge-line {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(42, 108, 136, 0.55) 50%, transparent 100%);
}

.s360-header__edge .edge-glow {
  position: absolute;
  inset: -18px 0 auto 0;
  height: 36px;
  background: radial-gradient(circle at 50% 0%, rgba(42, 108, 136, 0.28), transparent 70%);
  opacity: 0.7;
}

 @keyframes s360-scan {
  0% {
    transform: translateX(-100%);
  }
  45% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(100%);
  }
 }

 @keyframes s360-ping {
  0% {
    opacity: 0.8;
    transform: scale(0.6);
  }
  70% {
    opacity: 0;
    transform: scale(1.3);
  }
  100% {
    opacity: 0;
    transform: scale(1.3);
  }
 }

@keyframes s360-sheen {
  0% {
    transform: translateX(-120%);
    opacity: 0;
  }
  40% {
    opacity: 0.6;
  }
  100% {
    transform: translateX(120%);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .s360-header__scan,
  .mark-ping {
    animation: none;
  }
}

/* ── Dark mode header overrides ──────────────────────────────────────── */
[data-s360-theme="dark"] {
  --s360-bg-950: #0d1828;
  --s360-bg-900: #111c2d;
  --s360-bg-850: #182336;
  --s360-ink: #dce8f2;
  --s360-muted: rgba(149, 196, 220, 0.75);
  --s360-border: rgba(255, 255, 255, 0.09);
  --s360-border-strong: rgba(255, 255, 255, 0.15);
  --s360-border-subtle: rgba(255, 255, 255, 0.05);
  --s360-border-accent: rgba(42, 108, 136, 0.45);
  --s360-border-accent-strong: rgba(42, 108, 136, 0.65);
  --s360-surface-1: rgba(18, 28, 44, 0.90);
  --s360-surface-2: rgba(13, 22, 36, 0.85);
  --s360-surface-3: rgba(22, 34, 52, 0.96);
  --s360-highlight: rgba(42, 108, 136, 0.30);
  --s360-chip-bg: rgba(42, 108, 136, 0.18);
  --s360-chip-bg-strong: rgba(42, 108, 136, 0.28);
}

[data-s360-theme="dark"] .s360-sidebar {
  background: rgba(10, 18, 30, 0.98);
  border-right-color: rgba(255, 255, 255, 0.07);
  box-shadow: 8px 0 24px rgba(0, 0, 0, 0.40);
}

/* ── Authbar: dark mode ───────────────────────────────────────────────────── */
[data-s360-theme="dark"] .s360-authbar {
  background: rgba(11, 22, 30, 0.97);
  border-bottom-color: rgba(255, 255, 255, 0.07);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22);
  --s360-text-strong: #e2e8f0;
  --s360-text-body:   #cbd5e1;
  --s360-text-muted:  #94a3b8;
  --s360-ink:         #e2e8f0;
  --s360-border:      rgba(255, 255, 255, 0.09);
}

[data-s360-theme="dark"] .s360-authbar__toggle,
[data-s360-theme="dark"] .s360-authbar__icon {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: #94a3b8;
}

[data-s360-theme="dark"] .s360-authbar__toggle:hover,
[data-s360-theme="dark"] .s360-authbar__icon:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.20);
  color: #e2e8f0;
}

[data-s360-theme="dark"] .s360-authbar__product {
  color: #64748b;
}

[data-s360-theme="dark"] .s360-authbar__page {
  color: #e2e8f0;
}

[data-s360-theme="dark"] .s360-sidebar__link,
[data-s360-theme="dark"] .s360-sidebar__sublink {
  color: rgba(180, 210, 235, 0.82);
}

[data-s360-theme="dark"] .s360-sidebar__link:hover,
[data-s360-theme="dark"] .s360-sidebar__link--group:hover,
[data-s360-theme="dark"] .s360-sidebar__sublink:hover {
  background: rgba(42, 108, 136, 0.16);
  color: #dce8f2;
}

[data-s360-theme="dark"] .s360-sidebar__link.is-active,
[data-s360-theme="dark"] .s360-sidebar__sublink.is-active {
  background: rgba(42, 108, 136, 0.22);
  color: #ffffff;
}

[data-s360-theme="dark"] .s360-sidebar__label {
  color: rgba(149, 196, 220, 0.70); /* raised from 0.50 — contrast 5.3:1 */
}

[data-s360-theme="dark"] .s360-sidebar__cta {
  background: rgba(42, 108, 136, 0.30);
  border-color: rgba(42, 108, 136, 0.45);
  color: #dce8f2;
}

[data-s360-theme="dark"] .s360-brand__mark {
  background: radial-gradient(circle at 30% 30%, rgba(42, 108, 136, 0.25), rgba(18, 28, 44, 0.95));
  border-color: rgba(42, 108, 136, 0.30);
}

[data-s360-theme="dark"] .s360-menu {
  background: rgba(13, 22, 38, 0.97);
  border-color: rgba(255, 255, 255, 0.10);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.50), 0 8px 18px rgba(0, 0, 0, 0.30);
}

[data-s360-theme="dark"] .s360-userchip {
  background: rgba(20, 32, 50, 0.88);
  border-color: rgba(255, 255, 255, 0.10);
}

[data-s360-theme="dark"] .s360-userchip:hover {
  border-color: rgba(42, 108, 136, 0.45);
}

/* Theme toggle button */
.s360-theme-toggle {
  cursor: pointer;
  font-size: 0.88rem;
  transition:
    background var(--s360-dur-fast) var(--s360-ease-out),
    border-color var(--s360-dur-fast) var(--s360-ease-out),
    color var(--s360-dur-fast) var(--s360-ease-out);
}

@media (max-width: 980px) {
  .s360-header__shell {
    flex-wrap: wrap;
    justify-content: center;
  }

  .s360-nav__rail {
    flex-wrap: wrap;
    justify-content: center;
  }

  .s360-header--public {
    padding: 12px;
  }

  .s360-header--public .s360-header__shell {
    border-radius: 28px;
  }

  html[data-s360-layout="sidebar"] {
    --s360-sidebar-width: 188px;
    --s360-sidebar-width-collapsed: 64px;
  }

  .s360-authbar__product {
    display: none;
  }

  .s360-authbar__sep {
    display: none;
  }
}

@media (max-width: 1360px) {
  html[data-s360-layout="sidebar"] {
    --s360-sidebar-width: 202px;
    --s360-main-offset: calc(var(--s360-sidebar-width) + 14px);
  }

  html[data-s360-layout="sidebar"] .s360-sidebar {
    width: var(--s360-sidebar-width);
  }

  html[data-s360-layout="sidebar"] .s360-authbar {
    left: var(--s360-sidebar-width);
  }
}

@media (max-width: 1120px) {
  html[data-s360-layout="sidebar"] {
    --s360-sidebar-width: 190px;
    --s360-main-offset: calc(var(--s360-sidebar-width) + 12px);
  }

  .s360-authbar__page {
    max-width: min(52vw, 420px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 720px) {
  .s360-actions {
    flex-wrap: wrap;
    justify-content: center;
  }

  html[data-s360-layout="sidebar"] {
    --s360-sidebar-width: 182px;
    --s360-main-offset: calc(var(--s360-sidebar-width) + 10px);
  }

  .s360-authbar {
    padding: 0 10px;
  }

  .s360-authbar__page {
    font-size: 0.9rem;
  }

  .s360-user--top .userchip-txt {
    display: none;
  }
}

/* ── Authenticated sidebar: persistent brand color ────────────────────────
   Only the sidebar gets a fixed deep-navy brand color — always, regardless
   of the current light/dark theme. The authbar (top bar) is intentionally
   NOT overridden here so it follows the user's theme like normal.
   ──────────────────────────────────────────────────────────────────── */

/* Scope token overrides to .s360-sidebar only — authbar is untouched */
.s360-header--auth .s360-sidebar {
  --s360-ink:                  #c8dde8;
  --s360-muted:                rgba(130, 185, 215, 0.60);
  --s360-border:               rgba(255, 255, 255, 0.07);
  --s360-border-strong:        rgba(255, 255, 255, 0.12);
  --s360-border-subtle:        rgba(255, 255, 255, 0.04);
  --s360-border-accent:        rgba(42, 108, 136, 0.52);
  --s360-border-accent-strong: rgba(42, 108, 136, 0.75);
  --s360-surface-1:            rgba(42, 108, 136, 0.28);
  --s360-surface-2:            rgba(42, 108, 136, 0.18);
  --s360-accent:               #4db8d4;

  background: #111c2e;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 8px 0 32px rgba(0, 0, 0, 0.28);
}

/* Ensure dark-mode rule doesn't override the brand color */
[data-s360-theme="dark"] .s360-sidebar {
  background: #111c2e;
  border-right-color: rgba(255, 255, 255, 0.06);
  box-shadow: 8px 0 32px rgba(0, 0, 0, 0.28);
}

/* Nav text */
.s360-header--auth .s360-sidebar__link,
.s360-header--auth .s360-sidebar__link--group {
  color: rgba(200, 221, 232, 0.88);
}

.s360-header--auth .s360-sidebar__sublink {
  color: rgba(175, 210, 228, 0.72);
}

.s360-header--auth .s360-sidebar__label {
  color: rgba(130, 185, 215, 0.72); /* raised from 0.45 — contrast 4.98:1 on #111c2e */
}

.s360-header--auth .s360-sidebar__caret {
  color: rgba(77, 184, 212, 0.75);
}

/* Hover */
.s360-header--auth .s360-sidebar__link:hover,
.s360-header--auth .s360-sidebar__link--group:hover,
.s360-header--auth .s360-sidebar__sublink:hover {
  background: rgba(42, 108, 136, 0.20);
  border-color: rgba(42, 108, 136, 0.42);
  color: #e4f0f6;
}

/* Active — clearly visible on dark navy */
.s360-header--auth .s360-sidebar__link.is-active,
.s360-header--auth .s360-sidebar__sublink.is-active {
  background: rgba(42, 108, 136, 0.32);
  border-color: rgba(42, 108, 136, 0.72);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(42, 108, 136, 0.14);
}

.s360-header--auth .s360-sidebar__link.is-active i {
  color: #4db8d4;
}

.s360-header--auth .s360-sidebar__sublink.is-active .s360-sidebar__dot {
  background: #4db8d4;
}

.s360-header--auth .s360-sidebar__ink {
  background: rgba(42, 108, 136, 0.20);
}

/* Subnav divider line */
.s360-header--auth .s360-sidebar__subnav {
  border-left-color: rgba(42, 108, 136, 0.28);
}

/* Brand mark */
.s360-header--auth .s360-brand--sidebar .s360-brand__mark {
  background: radial-gradient(circle at 30% 30%, rgba(42, 108, 136, 0.30), rgba(10, 18, 30, 0.92));
  border-color: rgba(42, 108, 136, 0.35);
}

.s360-header--auth .s360-brand--sidebar .s360-brand__text {
  color: #c8dde8;
}

/* Bottom account section + footer */
.s360-header--auth .s360-sidebar__bottom {
  border-top-color: rgba(255, 255, 255, 0.06);
}

.s360-header--auth .s360-sidebar__footer {
  border-top-color: rgba(255, 255, 255, 0.06);
}

.s360-header--auth .s360-sidebar__cta {
  background: rgba(42, 108, 136, 0.22);
  border-color: rgba(42, 108, 136, 0.40);
  color: #c8dde8;
}

.s360-header--auth .s360-sidebar__cta:hover {
  background: rgba(42, 108, 136, 0.34);
  border-color: rgba(42, 108, 136, 0.58);
}

/* ── Authenticated authbar: permanently dark — matches sidebar brand color ──
   Applied via .s360-header--auth so it is always on in the authenticated shell,
   overriding the default white. The [data-s360-theme="dark"] rules still exist
   but are now identical to these values so they are effectively no-ops.
   ──────────────────────────────────────────────────────────────────────────── */
.s360-header--auth .s360-authbar {
  background: #0d1624;
  border-bottom-color: rgba(255, 255, 255, 0.07);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.28);
  --s360-ink:   #dce8f2;
  --s360-muted: rgba(130, 185, 215, 0.60);
  --s360-border: rgba(255, 255, 255, 0.09);
}

.s360-header--auth .s360-authbar__product {
  color: rgba(130, 185, 215, 0.55);
}

.s360-header--auth .s360-authbar__page {
  color: #dce8f2;
}

.s360-header--auth .s360-authbar__sep {
  background: rgba(255, 255, 255, 0.09);
}

.s360-header--auth .s360-authbar__toggle,
.s360-header--auth .s360-authbar__icon {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.11);
  color: rgba(149, 196, 220, 0.80);
}

.s360-header--auth .s360-authbar__toggle:hover,
.s360-header--auth .s360-authbar__icon:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.20);
  color: #dce8f2;
}

.s360-header--auth .s360-user--top .s360-userchip {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.11);
  color: #dce8f2;
}

.s360-header--auth .s360-user--top .s360-userchip:hover {
  border-color: rgba(42, 108, 136, 0.50);
}

.s360-header--auth .userchip-ic {
  background: rgba(42, 108, 136, 0.30);
  color: #c8dde8;
}

.s360-header--auth .s360-menu {
  background: rgba(11, 20, 34, 0.98);
  border-color: rgba(255, 255, 255, 0.10);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.55), 0 8px 18px rgba(0, 0, 0, 0.30);
}

.s360-header--auth .s360-menu__item {
  color: #c8dde8;
}

.s360-header--auth .s360-menu__item:hover {
  background: rgba(42, 108, 136, 0.22);
  color: #e4f0f6;
}

.s360-header--auth .s360-menu__sep {
  background: rgba(255, 255, 255, 0.07);
}
