*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --accent-900: #1a1842;
  --accent-400: #433b9b;
  --bg-page: #f5f3f1;
  --white: #ffffff;
  --grey-300: #cccccc;
  --red-600: #b90000;
  --black: #000000;
  --sidebar-width: 250px;
  --topnav-height: 60px;
  --radius-lg: 12px;
  --spacing-sm: 8px;
  --spacing-md: 12px;
  --spacing-lg: 16px;
  --font-s: 14px;
  --font-xs: 12px;
  --line-height-s: 20px;
  --line-height-xs: 16px;
}

html, body {
  height: 100%;
  font-family: 'Manrope', sans-serif;
  font-size: var(--font-s);
  background: var(--bg-page);
  color: var(--white);
}

/* ── Layout ── */
.layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--accent-900);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  padding: var(--spacing-lg) var(--spacing-md);
  height: 100vh;
  overflow: hidden;
  transition: width 0.2s ease, min-width 0.2s ease;
}

.sidebar.collapsed {
  width: 64px;
  min-width: 64px;
  padding-top: 0;
}

.sidebar.collapsed .nav-item span,
.sidebar.collapsed .nav-chevron {
  display: none;
}

.sidebar.collapsed .nav-item {
  justify-content: center;
  gap: 0;
}

.sidebar.collapsed .logo-full { display: none; }
.sidebar:not(.collapsed) .logo-mark { display: none; }

.sidebar.collapsed .sidebar-logo {
  width: 40px;
  height: 40px;
  padding: 0;
  margin-top: 10px;
  align-self: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn-collapsed-only { display: none; }
.sidebar.collapsed .btn-expanded-only { display: none; }
.sidebar.collapsed .btn-collapsed-only { display: block; }

.sidebar-logo {
  height: 40px;
  display: flex;
  align-items: center;
  padding: 0 var(--spacing-sm);
}

.sidebar-logo .logo-full {
  height: 33px;
  width: auto;
}

.sidebar-logo .logo-mark {
  width: 40px;
  height: 18px;
}

.sidebar.collapsed .sidebar-logo {
  width: 40px;
  height: 40px;
  padding: 0;
  justify-content: center;
}

/* ── Sidebar Nav ── */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: var(--spacing-sm);
  border-radius: var(--radius-lg);
  color: var(--white);
  text-decoration: none;
  font-weight: 400;
  font-size: var(--font-s);
  line-height: var(--line-height-s);
  white-space: nowrap;
  transition: background 0.15s;
}

.nav-item:hover {
  background: #282464;
}

.sidebar.collapsed .nav-item:hover .nav-icon {
  filter: brightness(0) invert(1);
}

.nav-item:hover span {
  text-decoration: underline;
}

.nav-item:hover .nav-chevron {
  opacity: 1;
}

.nav-item.active {
  background: #433b9b;
}

/* Icon swap: filled on active/page-active, default otherwise */
.icon-filled { display: none; }
.nav-item.active .icon-default,
.nav-item.page-active .icon-default { display: none; }
.nav-item.active .icon-filled,
.nav-item.page-active .icon-filled { display: block; }

/* Page-active: current page nav item — accent-400 bg, chevron visible */
.nav-item.page-active {
  background: #433b9b;
  border-radius: var(--radius-lg);
}

.nav-item.page-active .nav-chevron {
  opacity: 1;
}

/* Page-active submenu item — accent-400 bg */
.submenu-item.page-active {
  background: #433b9b;
  border-radius: var(--radius-lg);
}

.nav-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  object-fit: contain;
}

.nav-chevron {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  margin-left: auto;
  opacity: 0;
  transition: opacity 0.15s;
  filter: brightness(0) invert(1);
}

.nav-divider {
  height: 1px;
  background: transparent;
  padding: 0;
  position: relative;
  margin: 0 12px;
}

.nav-divider::after {
  content: '';
  display: block;
  height: 1px;
  background: #433b9b;
}

/* ── Sidebar Footer ── */
.sidebar-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 8px;
}

.collapse-btn {
  background: none;
  border: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  flex-shrink: 0;
}

.collapse-btn img {
  width: 24px;
  height: 24px;
}

.collapse-btn:hover {
  background: #242059;
}

.collapse-btn img {
  filter: brightness(0) invert(0.8);
}

.collapse-btn:hover img,
.collapse-btn:active img {
  filter: brightness(0) invert(1);
}

.collapse-btn img {
  width: 24px;
  height: 24px;
}

/* ── Main Wrapper ── */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

/* ── Top Nav ── */
.top-nav {
  height: var(--topnav-height);
  background: var(--accent-900);
  display: flex;
  align-items: center;
  padding: 0 32px;
  gap: 40px;
  flex-shrink: 0;
}

.top-nav-left {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
  flex-shrink: 0;
}

.dealer-selector {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  border-radius: var(--radius-lg);
  padding: 4px 8px;
  transition: background 0.15s;
}

.dealer-selector:hover {
  background: #282464;
}

.dealer-selector:hover .dealer-name {
  text-decoration: underline;
}

.dealer-name {
  font-weight: 600;
  font-size: var(--font-s);
  line-height: var(--line-height-s);
  color: var(--white);
}

.chevron-icon {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1);
}

.change-btn {
  background: none;
  border: none;
  color: var(--white);
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: var(--font-s);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-lg);
  transition: background 0.15s;
}

.change-btn:hover {
  background: #282464;
  text-decoration: underline;
}

.top-nav-right {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  flex: 1;
  justify-content: flex-end;
  min-width: 0;
}

/* ── Search Bar ── */
.search-bar {
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
  height: 40px;
  background: var(--black);
  border: 1px solid var(--accent-400);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--spacing-md);
  cursor: text;
  transition: min-width 0.2s;
  position: relative;
}

/* Collapsed: icon only */
.search-bar.search-collapsed {
  flex: 0 0 40px;
  width: 40px;
  min-width: 0;
  background: none;
  border: none;
  padding: 0;
  justify-content: center;
  cursor: pointer;
}

.search-bar.search-collapsed .search-input {
  display: none;
}

.search-bar.search-collapsed .search-icon {
  width: 24px;
  height: 24px;
}


.search-input {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  outline: none;
  color: var(--white);
  font-family: 'Manrope', sans-serif;
  font-size: var(--font-s);
  line-height: var(--line-height-s);
  caret-color: var(--white);
}

.search-input::placeholder {
  color: var(--grey-300);
}

/* Focus panel — suggestions dropdown */
.search-focus-panel {
  display: none;
  position: fixed;
  background: var(--white);
  border: 1px solid #cccccc;
  border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  /* Only shadow on sides and bottom, not top */
  box-shadow: 4px 4px 20px rgba(0, 0, 0, 0.15), -4px 0 20px rgba(0,0,0,0.15);
  clip-path: inset(0 -20px -20px -20px);
  z-index: 300;
  padding: 8px 12px 10px;
  color: #212121;
}

.search-bar.focused .search-focus-panel {
  display: block;
}

/* When focused: white bg, grey border, round top only */
.search-bar.focused {
  background: var(--white);
  border-color: #cccccc;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  border-bottom-color: transparent;
  box-shadow: none;
}

.search-bar.focused .search-input {
  color: #212121;
  caret-color: #212121;
}

.search-bar.focused .search-input::placeholder {
  color: #808080;
}

/* Search icon: grey-700 when focused */
.search-bar.focused .search-icon {
  filter: brightness(0) invert(0.13);
}

.search-focus-divider {
  height: 1px;
  background: #cccccc;
  margin: 0 -12px 8px;
}

.search-prompts {
  padding: 8px 0;
}

.search-prompts-title {
  font-size: var(--font-s);
  font-weight: 600;
  color: #212121;
  margin-bottom: 8px;
}

.search-prompt-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 0;
  width: 100%;
  text-align: left;
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: var(--font-s);
  color: #0073e3;
  line-height: var(--line-height-s);
}

.search-prompt-item img {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.search-prompt-item:hover span {
  text-decoration: underline;
}

.search-disclaimer {
  font-size: 12px;
  line-height: 16px;
  color: #212121;
  margin-top: 8px;
}

.search-disclaimer a {
  color: #0073e3;
  font-weight: 600;
  text-decoration: none;
}

.search-disclaimer a:hover {
  text-decoration: underline;
}

/* Clear button — hidden until input has value */
.search-clear-btn {
  display: none;
  background: none;
  border: none;
  color: var(--grey-300);
  font-size: 14px;
  cursor: pointer;
  padding: 0 4px;
  flex-shrink: 0;
  line-height: 1;
}

.search-clear-btn:hover {
  color: var(--white);
}

.search-bar.has-value .search-clear-btn {
  display: block;
}

/* Search submit button */
.search-submit-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* Search results panel — fixed top-right */
.search-results-panel {
  display: none;
  position: fixed;
  top: 60px;
  right: 0;
  z-index: 400;
}

.search-results-panel.open {
  display: block;
}

.search-results-panel img {
  display: block;
  width: 851px;
  height: 951px;
}

.search-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  filter: brightness(0) invert(1);
}

/* ── Top Nav Items ── */
.top-nav-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm);
  color: var(--white);
  text-decoration: none;
  font-size: var(--font-s);
  line-height: var(--line-height-s);
  white-space: nowrap;
  border-radius: var(--radius-lg);
  transition: background 0.15s;
  flex-shrink: 0;
}

/* Icons always white in top nav */
.top-nav-item .nav-icon {
  filter: brightness(0) invert(1);
}

.top-nav-item:hover {
  background: #282464;
}

.top-nav-item:hover .tnav-label {
  text-decoration: underline;
}

/* ── Responsive label + item dropping ── */
/* Step 1: drop labels left to right */
@media (max-width: 1260px) { .tnav-add .tnav-label   { display: none; } }
@media (max-width: 1180px) { .tnav-help .tnav-label  { display: none; } }
@media (max-width: 1100px) { .tnav-news .tnav-label  { display: none; } }
@media (max-width: 1020px) { .tnav-cart .tnav-label  { display: none; } }

/* Step 2: drop whole items left to right */
@media (max-width: 940px)  { .tnav-add  { display: none; } }
@media (max-width: 860px)  { .tnav-help { display: none; } }
@media (max-width: 780px)  { .tnav-news { display: none; } }

/* Change CTA: hide on tablet and mobile */
@media (max-width: 1024px) {
  .change-btn { display: none; }
}

/* Dealer name: hide on mobile only */
@media (max-width: 575px) {
  .dealer-name { display: none; }
}

/* ── Badge ── */
.badge {
  background: var(--red-600);
  color: var(--white);
  font-weight: 600;
  font-size: var(--font-xs);
  line-height: var(--line-height-xs);
  min-width: 20px;
  height: 20px;
  border-radius: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

/* ── Avatar ── */
.avatar-wrapper {
  padding: var(--spacing-sm);
  cursor: pointer;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: block;
  object-fit: cover;
}

/* ── Content ── */
.content {
  flex: 1;
  background: var(--bg-page);
  overflow-y: auto;
  padding: 0;
  position: relative;
}

/* ── Page header ── */
.page-header {
  background: #2d2870;
  border-radius: 14px 0 0 0;
  padding: var(--spacing-lg) 32px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: inset 0 1px 0 0 #433b9b, inset 1px 0 0 0 #433b9b;
}

.page-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.page-header-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.page-header-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.page-title {
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: 24px;
  line-height: 30px;
  color: var(--white);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-subtitle {
  font-family: 'Manrope', sans-serif;
  font-weight: 400;
  font-size: var(--font-s);
  line-height: var(--line-height-s);
  color: #c9c6e7;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Breadcrumb (eyebrow) variant — sits above the title */
.page-breadcrumb {
  font-family: 'Manrope', sans-serif;
  font-weight: 400;
  font-size: var(--font-s);
  line-height: var(--line-height-s);
  color: #c9c6e7;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-header-right {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
  flex-shrink: 0;
}

.page-filter-btn {
  background: none;
  border: 1px solid var(--white);
  border-radius: var(--radius-lg);
  color: var(--white);
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 22px;
  padding: 0 24px;
  height: 48px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

.page-filter-btn:hover {
  background: rgba(255,255,255,0.1);
}

/* Tab bar */
.page-tab-bar {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
}

.page-tab {
  height: 40px;
  padding: var(--spacing-sm) var(--spacing-lg);
  background: none;
  border: none;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  color: var(--white);
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: var(--font-s);
  line-height: var(--line-height-s);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
  outline: none;
}

/* Hover: accent-400 bg, underline */
.page-tab:hover {
  background: #433b9b;
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

/* Focus: blue border */
.page-tab:focus-visible {
  border: 2px solid #1e90ff;
  text-decoration: none;
  background: none;
}

/* Selected/active: page bg, dark text — not interactive */
.page-tab--active {
  background: var(--bg-page);
  color: #212121;
  cursor: default;
  pointer-events: none;
}

/* Link bar */
.page-link-bar {
  display: flex;
  align-items: center;
  gap: 20px;
}

.page-header-link {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  height: 40px;
  padding: 0 var(--spacing-sm);
  color: var(--white);
  text-decoration: none;
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: var(--font-s);
  line-height: var(--line-height-s);
  white-space: nowrap;
  border-radius: var(--radius-lg);
}

.page-header-link span {
  padding-left: 4px;
}

.page-header-link:hover span {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.globe-icon {
  width: 20px;
  height: 20px;
}

/* Content body (below page header) */
.content-body {
  padding: 24px 32px;
}

.content-appendix {
  position: absolute;
  top: 0;
  left: 0;
  width: 14px;
  height: 14px;
  display: block;
  pointer-events: none;
}

@media (max-width: 575px) {
  .content-appendix { display: none; }
}

/* ── Collapsed nav item tooltip (Dashboard, Subscriptions) ── */
.collapsed-tooltip {
  display: none;
  position: fixed;
  align-items: center;
  z-index: 300;
  pointer-events: none;
}

.tooltip-arrow {
  width: 6px;
  height: 12px;
  flex-shrink: 0;
}

.tooltip-box {
  background: var(--black);
  color: var(--white);
  font-size: var(--font-s);
  line-height: var(--line-height-s);
  padding: var(--spacing-sm);
  border-radius: 4px;
  white-space: nowrap;
}

.sidebar.collapsed .has-collapsed-tooltip:hover .collapsed-tooltip {
  display: flex;
}

/* ── Submenu ── */
.submenu {
  display: none;
  position: fixed;
  background: var(--accent-900);
  border-radius: var(--radius-lg);
  box-shadow: 4px 4px 20px rgba(0, 0, 0, 0.25);
  padding: var(--spacing-md);
  gap: 4px;
  flex-direction: column;
  width: 250px;
  z-index: 200;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
}

.submenu::before {
  content: '';
  position: absolute;
  top: 0;
  left: -4px;
  width: 4px;
  height: 100%;
}

.submenu.open {
  display: flex;
}

#submenu-settings {
  gap: 0;
}

#dropdown-add {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.07);
}

/* Profile dropdown */
.profile-dropdown {
  width: 250px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.07);
}

.profile-blurb {
  padding: var(--spacing-sm) 8px var(--spacing-sm) var(--spacing-md);
  line-height: var(--line-height-s);
  color: var(--white);
}

.profile-name {
  font-weight: 700;
  font-size: var(--font-s);
}

.profile-title {
  font-weight: 400;
  font-size: var(--font-s);
}

.profile-signed-in {
  display: block;
  margin-top: var(--spacing-xs);
  font-weight: 400;
  font-size: 12px;
  color: #9d97d8;
}

.profile-signed-in strong {
  font-weight: 600;
  color: var(--white);
}

.profile-divider {
  height: 1px;
  background: #433b9b;
  margin: 0 12px;
}

.profile-no-bookmark {
  justify-content: flex-start;
}

/* Support mode toggle row */
.profile-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-sm) 8px var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-lg);
}

.profile-toggle-label {
  color: var(--white);
  font-size: var(--font-s);
  line-height: var(--line-height-s);
}

.profile-toggle {
  position: relative;
  width: 40px;
  height: 24px;
  border-radius: 25px;
  border: 1px solid #808080;
  background: #f5f5f5;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
}

.profile-toggle[aria-checked="true"] {
  background: #54bf30;
  border-color: #54bf30;
}

.toggle-handle {
  position: absolute;
  top: 50%;
  left: 3px;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #808080;
  transition: left 0.2s, background 0.2s;
}

.profile-toggle[aria-checked="true"] .toggle-handle {
  left: 19px;
  background: white;
}

/* Logout item: accent-200 in default state only */
.profile-logout .submenu-item-label {
  color: #9d97d8;
}

.logout-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: #9d97d8;
}

.profile-logout:hover .submenu-item-label {
  color: var(--white);
}

.profile-logout:hover .logout-icon {
  color: var(--white);
}

/* Dealership modal — centered overlay */
.dealer-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0, 0, 0, 0.4);
  align-items: center;
  justify-content: center;
}

.dealer-modal-overlay.open {
  display: flex;
}

.dealer-modal-img {
  display: block;
  width: 641px;
  height: 328px;
  box-shadow: 4px 4px 20px rgba(0, 0, 0, 0.25);
}

/* Account switcher dropdown (image) */
.acct-dropdown-img {
  display: none;
  position: fixed;
  z-index: 200;
  box-shadow: 4px 4px 20px rgba(0, 0, 0, 0.15);
  cursor: default;
}

.acct-dropdown-img.open {
  display: block;
}

.acct-dropdown-img img {
  display: block;
  width: 497px;
  height: auto;
}

.acct-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  color: var(--white);
  border-radius: var(--radius-lg);
  transition: background 0.15s;
  padding: var(--spacing-sm) 8px var(--spacing-sm) var(--spacing-md);
}

.acct-item:hover {
  background: #242059;
}

.acct-item:hover .submenu-item-label,
.acct-item:hover .acct-group-label {
  text-decoration: underline;
}

/* Group header title */
.acct-group-label {
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: 18px;
  line-height: 24px;
  color: var(--white);
}

/* Active (current) item */
.acct-active {
  background: #2d2870;
}

/* Inactive items */
.acct-inactive .submenu-item-label {
  color: #9d97d8;
}

.acct-inactive:hover .submenu-item-label {
  color: var(--white);
  text-decoration: underline;
}

.acct-child {
  padding-left: 32px;
}

.acct-tag {
  background: #f5f5f5;
  color: #404040;
  font-weight: 600;
  font-size: var(--font-xs);
  line-height: var(--line-height-xs);
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.acct-tag--inactive {
  background: #808080;
  color: var(--white);
}

.submenu-title {
  display: none;
  padding: var(--spacing-sm) 8px var(--spacing-sm) var(--spacing-md);
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 24px;
  color: var(--white);
}

.submenu.show-title .submenu-title {
  display: block;
}

.submenu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-sm) 8px var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-lg);
  font-size: var(--font-s);
  line-height: var(--line-height-s);
  white-space: nowrap;
  transition: background 0.15s;
  position: relative;
}

.submenu-item:hover {
  background: #242059;
}

.submenu-item.active {
  background: #2d2870;
}

.submenu-item-label {
  color: var(--white);
  text-decoration: none;
  flex: 1;
}

.submenu-item:hover .submenu-item-label {
  text-decoration: underline;
}

/* Ecosystem submenu — title always visible, blurb text */
.submenu--ecosystem .submenu-title {
  display: block;
}

.submenu-item-image {
  padding: var(--spacing-sm) 8px var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-lg);
  width: 226px;
  display: flex;
  justify-content: center;
}

.submenu-illustration {
  display: block;
  width: 211px;
  height: 101px;
  object-fit: contain;
}

.submenu-blurb {
  padding: var(--spacing-sm) 8px var(--spacing-sm) var(--spacing-md);
  font-size: var(--font-s);
  line-height: var(--line-height-s);
  color: var(--white);
  white-space: pre-wrap;
}


/* Link-type submenu item — external icon always visible */
.submenu-item--link {
  justify-content: space-between;
}

.submenu-item--support {
  justify-content: space-between;
}

.submenu-tag {
  flex-shrink: 0;
  background: #f5f5f5;
  color: #404040;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.external-link-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

/* Bookmark button */
.submenu-bookmark-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

.bookmark-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.15s;
  filter: brightness(0) invert(1);
}

.submenu-item:hover .bookmark-icon {
  opacity: 1;
}

/* Tooltip */
.submenu-tooltip {
  display: none;
  position: fixed;
  align-items: center;
  gap: 0;
  z-index: 300;
  pointer-events: none;
}

.submenu-bookmark-btn:hover .submenu-tooltip {
  display: flex;
}

.tooltip-arrow {
  width: 6px;
  height: 12px;
  flex-shrink: 0;
}

.tooltip-box {
  background: var(--black);
  color: var(--white);
  font-size: var(--font-s);
  line-height: var(--line-height-s);
  padding: var(--spacing-sm);
  border-radius: 4px;
  white-space: nowrap;
}

/* ── Responsive ── */

/* Mobile hamburger button — hidden by default */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-lg);
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.mobile-menu-btn:hover { background: #242059; }
.mobile-menu-btn img { width: 24px; height: 24px; }

/* Mobile hamburger overlay — hidden by default */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 64px;
  height: 100vh;
  background: var(--accent-900);
  z-index: 200;
  flex-direction: column;
  gap: var(--spacing-md);
  padding: var(--spacing-lg) var(--spacing-md);
  overflow-y: auto;
}

.mobile-nav-overlay.open {
  display: flex;
}

.mobile-nav-overlay .sidebar-logo {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
}

.mobile-nav-overlay .sidebar-logo .logo-full { display: none; }
.mobile-nav-overlay .sidebar-logo .logo-mark { display: block; }

.mobile-nav-overlay .sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

@media (max-width: 575px) {
  /* Default: sidebar hidden, content takes full width */
  .sidebar,
  .sidebar.collapsed {
    width: 0;
    min-width: 0;
    padding: 0;
    overflow: hidden;
    position: relative;
    z-index: 101;
    flex-direction: column;
    gap: 0;
    align-self: stretch;
  }

  .sidebar .sidebar-logo,
  .sidebar .sidebar-nav,
  .sidebar .sidebar-footer {
    display: none;
  }

  /* Hamburger in top nav */
  .mobile-menu-btn { display: flex; }
  .mobile-menu-btn .logo-mark-icon {
    display: none;
    width: 40px;
    height: 18px;
  }

  /* Open state: fixed overlay starting below top nav, content stays full width */
  .sidebar.mobile-open {
    position: fixed;
    top: var(--topnav-height);
    left: 0;
    width: 64px;
    min-width: 64px;
    height: calc(100vh - var(--topnav-height));
    padding: 16px var(--spacing-md);
    overflow-y: auto;
    z-index: 200;
    gap: var(--spacing-md);
    justify-content: flex-start;
  }

  .sidebar.mobile-open .sidebar-logo { display: none; }

  .sidebar.mobile-open .sidebar-nav {
    display: flex;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
  }

  .sidebar.mobile-open .sidebar-footer {
    display: flex;
    padding-top: 8px;
    height: auto;
    width: 100%;
    justify-content: center;
  }

  .sidebar.mobile-open .sidebar-footer .collapse-btn { display: flex; }
  .sidebar.mobile-open .sidebar-footer .mobile-menu-btn { display: none; }

  /* Swap hamburger → logo mark when sidebar is open */
  #sidebar.mobile-open ~ .main-wrapper .mobile-menu-btn .hamburger-icon { display: none; }
  #sidebar.mobile-open ~ .main-wrapper .mobile-menu-btn .logo-mark-icon { display: block; }

  .top-nav {
    padding: 0 16px;
    gap: 12px;
  }
}

.overlay.visible {
  display: block;
}
