html,
body {
  min-height: 100%;
}

body {
  position: relative;
  background: var(--color-bg);
  color: var(--color-text);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  z-index: -2;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.8;
}

body::before {
  width: 320px;
  height: 320px;
  top: -100px;
  left: -80px;
  background: rgba(13, 34, 71, 0.1);
}

body::after {
  width: 260px;
  height: 260px;
  right: -60px;
  bottom: 12%;
  background: rgba(245, 179, 14, 0.12);
}

#app {
  min-height: 100vh;
  min-height: 100dvh;
}

.app-layout {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
}

.app-layout.auth-layout {
  align-items: stretch;
  justify-content: center;
  padding: clamp(1rem, 3vw, 2rem);
}

.sidebar {
  position: fixed;
  top: 18px;
  bottom: 18px;
  left: 18px;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  background: #ffffff;
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid rgba(255, 248, 214, 0.9);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  overflow: hidden;
  z-index: 140;
  transition: transform var(--transition-base), opacity var(--transition-base);
}

.sidebar.collapsed {
  transform: translateX(calc(-100% - 24px));
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-4);
  min-height: 88px;
  padding: var(--spacing-6) var(--spacing-6) var(--spacing-5);
  border-bottom: 1px solid rgba(245, 179, 14, 0.12);
}

.sidebar-logo-img {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  object-fit: contain;
  box-shadow:
    0 14px 28px rgba(13, 34, 71, 0.16),
    0 6px 14px rgba(13, 34, 71, 0.08);
}

.sidebar-brand {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.sidebar-brand-title {
  font-size: clamp(1rem, 1vw, 1.12rem);
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #0D2247;
}

.sidebar-brand-subtitle {
  font-size: var(--font-size-xs);
  color: transparent;
}

.sidebar-nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.35rem;
  padding: var(--spacing-3) var(--spacing-4) var(--spacing-6);
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.sidebar-nav::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--spacing-3);
  min-height: 52px;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-lg);
  color: var(--color-text-soft);
  font-size: var(--font-size-sm);
  font-weight: 700;
  letter-spacing: -0.01em;
  transition:
    transform var(--transition-fast),
    background var(--transition-fast),
    color var(--transition-fast),
    box-shadow var(--transition-fast);
  cursor: pointer;
}

.nav-item::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid transparent;
  transition: border-color var(--transition-fast);
}

.nav-item:hover {
  transform: translateY(-1px);
  background: rgba(255, 249, 217, 0.84);
  color: var(--color-text);
}

.nav-item.active {
  background: #ffffff;
  color: var(--color-text);
  box-shadow: var(--shadow-sm), 0 0 0 1px rgba(13, 34, 71, 0.12);
}

.nav-item.active::before {
  border-color: rgba(13, 34, 71, 0.12);
}

.nav-icon,
.ui-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.2rem;
  height: 1.2rem;
  flex-shrink: 0;
}

.ui-icon svg,
.nav-icon svg {
  width: 100%;
  height: 100%;
}

.sidebar-footer {
  padding: var(--spacing-5);
  border-top: 1px solid rgba(245, 179, 14, 0.12);
}

.main-content {
  position: relative;
  flex: 1;
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: visible;
  display: flex;
  flex-direction: column;
  padding:
    calc(var(--navbar-height) + var(--spacing-5) + env(safe-area-inset-top))
    var(--page-padding)
    calc(var(--spacing-16) + env(safe-area-inset-bottom))
    var(--page-padding);
}

#page-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

@media (min-width: 1024px) {
  body[data-route="home"] .main-content,
  body[data-route="employee-dashboard"] .main-content,
  body[data-route="products"] .main-content {
    padding-bottom: 0;
  }
}

body[data-route="home"] .main-content,
body[data-route="employee-dashboard"] .main-content {
  --home-wave-band: 56dvh;
  --home-wave-height: clamp(96px, 10vw, 150px);
  --home-wave-rise: clamp(30px, 3vw, 50px);
  --home-wave-arc-extra: clamp(64px, 7vw, 96px);
  --home-wave-span: clamp(1500px, 158vw, 3400px);
  background: #ffffff;
  isolation: isolate;
}

body[data-route="home"] .main-content::before,
body[data-route="employee-dashboard"] .main-content::before,
body[data-route="home"] .main-content::after,
body[data-route="employee-dashboard"] .main-content::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
  z-index: 0;
}

body[data-route="home"] .main-content::before,
body[data-route="employee-dashboard"] .main-content::before {
  bottom: 0;
  top: var(--home-wave-band);
  background: var(--color-accent);
  box-shadow: none;
}

body[data-route="home"] .main-content::after,
body[data-route="employee-dashboard"] .main-content::after {
  left: 50%;
  right: auto;
  width: var(--home-wave-span);
  transform: translateX(-50%);
  top: calc(var(--home-wave-band) - (var(--home-wave-height) + var(--home-wave-arc-extra)) / 2);
  height: calc(var(--home-wave-height) + var(--home-wave-arc-extra));
  background: #ffffff;
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
  box-shadow: none;
}

.page-content {
  width: min(100%, var(--content-max-width));
  margin: 0 auto;
}

.page-shell {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-8);
  flex: 1;
}

.top-bar {
  position: fixed;
  top: calc(18px + env(safe-area-inset-top));
  left: 18px;
  right: 18px;
  display: flex;
  align-items: center;
  gap: var(--spacing-3);
  min-height: 0;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  z-index: 120;
  transition:
    transform var(--transition-base),
    opacity var(--transition-fast);
}

body[data-route="home"] .top-bar,
body[data-route="employee-dashboard"] .top-bar {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

@media (min-width: 1024px) {
  body[data-route="home"] .top-bar,
  body[data-route="employee-dashboard"] .top-bar {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    z-index: 110;
    isolation: isolate;
  }

  body[data-route="home"] .top-bar::before,
  body[data-route="employee-dashboard"] .top-bar::before {
    content: none;
  }

  body[data-route="home"] .top-bar::after,
  body[data-route="employee-dashboard"] .top-bar::after {
    content: "";
    position: absolute;
    z-index: 0;
    top: calc(-18px - env(safe-area-inset-top));
    left: -18px;
    right: -18px;
    height: calc((100% + 2.9rem + env(safe-area-inset-top)) * 0.8);
    background: var(--color-accent);
    pointer-events: none;
  }

  body.home-search-is-docked[data-route="home"] .top-bar::after,
  body.home-search-is-docked[data-route="employee-dashboard"] .top-bar::after {
    z-index: -1;
  }

  body.home-search-in-header[data-route="home"] .top-bar::after,
  body.home-search-in-header[data-route="employee-dashboard"] .top-bar::after {
    z-index: -1;
  }

  body[data-route="home"] .top-bar > *,
  body[data-route="employee-dashboard"] .top-bar > * {
    position: relative;
    z-index: 1;
  }
}

.top-bar.scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  box-shadow:
    0 10px 24px rgba(13, 34, 71, 0.08),
    0 2px 8px rgba(245, 179, 14, 0.08);
  border-radius: 0 0 20px 20px;
}

body[data-route="home"] .top-bar.scrolled,
body[data-route="employee-dashboard"] .top-bar.scrolled {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  border-radius: 0;
}

.top-bar.hidden {
  transform: translateY(calc(-100% - 18px));
}

.top-bar-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
  min-width: 0;
}

.top-bar-brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(13, 34, 71, 0.08);
  box-shadow: var(--shadow-xs);
}

.top-bar-brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.top-bar-brand-copy {
  min-width: 0;
}

.top-bar-brand-title {
  font-size: var(--font-size-sm);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.top-bar-brand-subtitle {
  font-size: var(--font-size-xs);
  color: var(--color-text-soft);
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-3);
  flex: 1;
  min-width: 0;
}

.desktop-header-menu {
  display: none;
  position: relative;
  flex: 0 0 auto;
}

.desktop-header-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 42px;
  padding: 0.62rem 0.8rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(13, 34, 71, 0.08);
  box-shadow: var(--shadow-xs), inset 0 1px 0 rgba(255, 255, 255, 0.94);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  font-weight: 800;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast),
    color var(--transition-fast);
}

.desktop-header-menu-btn:hover {
  transform: translateY(-1px);
  background: rgba(248, 250, 252, 0.96);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.desktop-header-menu-btn:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus), var(--shadow-sm);
}

.desktop-header-menu-btn[aria-expanded="true"] {
  background: #ffffff;
}

.desktop-header-menu-icon,
.desktop-header-menu-icon .ui-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.08rem;
  height: 1.08rem;
  color: var(--role-accent, var(--color-primary));
}

.desktop-header-menu-label {
  line-height: 1;
}

.desktop-header-menu-panel {
  position: absolute;
  top: calc(100% + 0.7rem);
  left: 0;
  min-width: 260px;
  max-width: min(320px, 72vw);
  max-height: calc(100dvh - 7.5rem);
  overflow-y: auto;
  padding: 0.25rem 0;
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(13, 34, 71, 0.08);
  box-shadow:
    0 18px 40px rgba(13, 34, 71, 0.14),
    0 6px 18px rgba(13, 34, 71, 0.08);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  z-index: 180;
}

.desktop-header-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.85rem 1rem;
  border-radius: 0;
  border-top: 1px solid rgba(13, 34, 71, 0.06);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  font-weight: 700;
  text-align: left;
  transition:
    background var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast);
}

.desktop-header-menu-item:first-child {
  border-top: none;
}

.desktop-header-menu-item:hover {
  background: rgba(245, 179, 14, 0.1);
}

.desktop-header-menu-item.active {
  background: rgba(245, 179, 14, 0.14);
  color: var(--color-primary-strong);
}

.desktop-header-menu-item-icon,
.desktop-header-menu-item-icon .ui-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.05rem;
  height: 1.05rem;
  color: var(--role-accent, var(--color-primary));
}

.desktop-header-menu-item-logout {
  color: #c2410c;
}

.desktop-header-menu-item-logout:hover {
  background: rgba(194, 65, 12, 0.1);
}

.desktop-header-menu-item-logout .desktop-header-menu-item-icon,
.desktop-header-menu-item-logout .desktop-header-menu-item-icon .ui-icon {
  color: #c2410c;
}

.home-search-header-slot {
  display: none;
  flex: 0 1 clamp(320px, 34vw, 580px);
  min-width: 0;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 3;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(0.96);
  transition:
    opacity 220ms ease,
    transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

body.home-search-in-header .home-search-header-slot {
  display: flex;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

@media (min-width: 1024px) {
  .top-bar {
    --desktop-header-pill-height: 52px;
    --desktop-header-location-width: clamp(240px, 18vw, 308px);
    --desktop-header-search-width: clamp(360px, 30vw, 560px);
  }

  .desktop-header-menu {
    display: inline-flex;
  }

  .top-bar {
    gap: clamp(0.7rem, 1vw, 1rem);
  }

  .top-bar-actions {
    gap: clamp(0.6rem, 0.95vw, 0.9rem);
    flex: 1 1 auto;
    justify-content: flex-start;
  }

  .desktop-header-menu,
  .dashboard-menu-btn {
    flex: 0 0 auto;
  }

  .desktop-header-menu-btn,
  .dashboard-menu-btn,
  .top-location,
  .premium-search {
    min-height: var(--desktop-header-pill-height);
  }

  .top-location {
    flex: 0 0 var(--desktop-header-location-width);
    width: var(--desktop-header-location-width);
    max-width: var(--desktop-header-location-width);
    padding: 0 0.95rem;
    margin-right: clamp(0.1rem, 0.35vw, 0.35rem);
  }

  .top-search-wrap {
    flex: 0 1 var(--desktop-header-search-width);
    width: min(100%, var(--desktop-header-search-width));
    max-width: var(--desktop-header-search-width);
    margin-left: auto;
  }

  .desktop-header-menu-btn,
  .dashboard-menu-btn {
    min-width: 132px;
    justify-content: center;
    padding: 0 1.05rem;
  }

  .desktop-header-menu-btn {
    min-width: 98px;
    padding: 0 0.8rem;
  }

  .premium-search {
    min-height: var(--desktop-header-pill-height);
    padding: 0 0.85rem 0 1rem;
    border-radius: 999px;
  }

  body.home-search-in-header[data-route="home"] .top-bar-home-location-only,
  body.home-search-in-header[data-route="employee-dashboard"] .top-bar-home-location-only {
    justify-content: space-between;
    gap: clamp(0.85rem, 1.4vw, 1.35rem);
  }

  body.home-search-in-header[data-route="home"] .top-bar-home-location-only .top-bar-actions,
  body.home-search-in-header[data-route="employee-dashboard"] .top-bar-home-location-only .top-bar-actions {
    order: 2;
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
    margin-left: 0;
    justify-content: flex-start;
    gap: clamp(0.75rem, 1.2vw, 1.1rem);
    overflow: visible;
  }

  body.home-search-in-header[data-route="home"] .top-bar-home-location-only .top-bar-brand-hero,
  body.home-search-in-header[data-route="employee-dashboard"] .top-bar-home-location-only .top-bar-brand-hero {
    order: 0;
    margin-right: 0;
    flex: 0 0 clamp(187px, 16.85vw, 250px);
    width: clamp(187px, 16.85vw, 250px);
    justify-content: center;
  }

  body.home-search-in-header[data-route="home"] .home-search-header-slot,
  body.home-search-in-header[data-route="employee-dashboard"] .home-search-header-slot {
    order: 1;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    flex: 0 0 auto;
    width: min(100%, 560px);
    min-width: 0;
    max-width: 560px;
    margin: 0;
    justify-content: center;
  }
}

.top-bar-brand-hero {
  display: none;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-start;
  width: clamp(187px, 16.85vw, 250px);
  height: 58px;
  min-width: 0;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: visible;
  pointer-events: none;
  user-select: none;
  color: var(--color-primary-strong);
  font-family: "Gotham", "Gotham Bold", "Gotham Medium", "Montserrat", "Avenir Next", "Segoe UI", sans-serif;
  font-size: clamp(1.9rem, 2vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
  white-space: nowrap;
  text-rendering: geometricPrecision;
}

.top-bar-brand-hero .brand-accent {
  color: var(--color-accent);
}

.top-bar-brand-hero .brand-cart-icon {
  width: clamp(2.55rem, 2.85vw, 3.525rem);
  height: clamp(2.55rem, 2.85vw, 3.525rem);
  margin-right: 0.42rem;
  object-fit: contain;
  vertical-align: middle;
  flex: 0 0 auto;
}

.top-bar-brand-hero::before {
  content: none;
}

.top-bar-brand-hero::after {
  content: none;
}

.dashboard-menu-btn {
  display: none;
  align-items: center;
  gap: 0.7rem;
  min-height: 46px;
  padding: 0.78rem 1rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(13, 34, 71, 0.08);
  box-shadow: var(--shadow-xs), inset 0 1px 0 rgba(255, 255, 255, 0.94);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  font-weight: 800;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast),
    color var(--transition-fast);
}

.dashboard-menu-btn:hover {
  transform: translateY(-1px);
  background: rgba(248, 250, 252, 0.96);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.dashboard-menu-btn:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus), var(--shadow-sm);
}

.dashboard-menu-btn[aria-expanded="true"] {
  background: #ffffff;
  color: var(--color-text);
}

.dashboard-menu-btn-icon,
.dashboard-menu-btn-icon .ui-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.08rem;
  height: 1.08rem;
  color: var(--role-accent, var(--color-primary));
}

.dashboard-menu-btn-label {
  line-height: 1;
}

.top-profile-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(13, 34, 71, 0.08);
  box-shadow: var(--shadow-xs), inset 0 1px 0 rgba(255, 255, 255, 0.94);
  color: var(--color-text);
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast),
    color var(--transition-fast);
}

.top-profile-btn:hover {
  transform: translateY(-1px);
  background: rgba(248, 250, 252, 0.96);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.top-profile-btn:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus), var(--shadow-sm);
}

.top-profile-icon,
.top-profile-icon .ui-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.08rem;
  height: 1.08rem;
  color: var(--role-accent, var(--color-primary));
}

.mobile-menu-btn {
  display: none;
}

.top-location {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  max-width: 240px;
  padding: 0.6rem 0.76rem;
  border-radius: var(--radius-full);
  background: var(--color-accent);
  border: 1px solid var(--color-accent-strong);
  box-shadow: var(--shadow-xs);
  color: var(--color-text-soft);
  font-size: var(--font-size-xs);
  font-weight: 700;
  white-space: nowrap;
  text-align: left;
}

.top-location.show {
  display: inline-flex;
}

.top-location-copy {
  display: grid;
  min-width: 0;
  gap: 0.08rem;
  text-align: left;
}

.top-location-label {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.top-location-address {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--color-text);
}

.top-location-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.95rem;
  height: 0.95rem;
  margin-left: auto;
  color: var(--color-text-muted);
}

.top-location-map {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-full);
  background: var(--color-accent);
  border: 1px solid var(--color-accent-strong);
  box-shadow: var(--shadow-xs);
  font-weight: 700;
  color: var(--color-text);
}

.top-location-map .top-location-address {
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-location-map .top-location-label {
  color: var(--color-text-muted);
}

.top-location-home-only {
  width: 100%;
  max-width: none;
}

.top-location-home-only .top-location-copy {
  flex: 1;
}

body[data-route="home"] .top-location-home-only {
  gap: 0.72rem;
  background: var(--color-accent);
  border: 1px solid var(--color-accent-strong);
  box-shadow: var(--shadow-xs);
  color: var(--color-primary-strong);
}

body[data-route="home"] .top-location-home-only:hover {
  box-shadow: var(--shadow-sm);
}

body[data-route="home"] .top-location-home-only .top-location-label,
body[data-route="employee-dashboard"] .top-location-home-only .top-location-label {
  font-family: var(--font-family-display);
  font-weight: 900;
  letter-spacing: 0.1em;
  color: var(--color-primary-strong);
}

body[data-route="home"] .top-location-home-only .top-location-address,
body[data-route="employee-dashboard"] .top-location-home-only .top-location-address {
  font-family: var(--font-family-display);
  font-size: clamp(1.1rem, 1.84vw, 1.17rem);
  font-weight: 900;
  color: var(--color-secondary);
  letter-spacing: -0.01em;
  line-height: 1.02;
}

body[data-route="home"] .top-location-home-only .top-location-arrow,
body[data-route="employee-dashboard"] .top-location-home-only .top-location-arrow,
body[data-route="home"] .top-location-home-only .ui-icon,
body[data-route="employee-dashboard"] .top-location-home-only .ui-icon {
  width: 1.34rem;
  height: 1.34rem;
  color: var(--color-primary);
}

.top-search-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
  z-index: 220;
}

body[data-route="home"] .top-search-wrap,
body[data-route="employee-dashboard"] .top-search-wrap {
  display: none;
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 28, 61, 0.35);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
  z-index: 130;
}

.sidebar-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.bottom-nav {
  position: fixed;
  left: var(--page-padding);
  right: var(--page-padding);
  bottom: calc(14px + env(safe-area-inset-bottom));
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  padding: 0.6rem;
  background: #ffffff;
  border: 1px solid rgba(13, 34, 71, 0.08);
  border-radius: var(--radius-2xl);
  box-shadow: 0 18px 34px rgba(13, 34, 71, 0.1), 0 6px 16px rgba(13, 34, 71, 0.04);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  z-index: 150;
}

.bottom-nav-item {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-height: 54px;
  padding: 0.65rem 0.35rem;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(13, 34, 71, 0.2);
  background: #ffffff;
  color: var(--color-text-muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 6px 14px rgba(13, 34, 71, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.88);
  transition:
    transform var(--transition-fast),
    background var(--transition-fast),
    color var(--transition-fast),
    box-shadow var(--transition-fast),
    border-color var(--transition-fast);
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
  background: #ffffff;
  color: var(--color-primary-strong);
  border-color: rgba(13, 34, 71, 0.42);
  box-shadow: 0 10px 20px rgba(13, 34, 71, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.bottom-nav-icon {
  display: inline-flex;
  width: 1.2rem;
  height: 1.2rem;
}

.bottom-nav-label {
  line-height: 1;
}

body.floating-cart-open .main-content {
  padding-bottom: calc(var(--spacing-20) + env(safe-area-inset-bottom));
}

.top-bar-home-location-only {
  justify-content: stretch;
  padding-left: 0.8rem;
  padding-right: 0.8rem;
}

.top-bar-home-location-only .top-bar-actions {
  width: 100%;
  gap: var(--spacing-3);
}

.top-bar-home-location-only .top-location-home-only {
  flex: 1;
  width: auto;
}

@media (min-width: 1024px) {
  .dashboard-menu-btn {
    display: none;
  }

  body[data-role="supplier"] .dashboard-menu-btn,
  body[data-role="dispatch"] .dashboard-menu-btn,
  body[data-role="hr"] .dashboard-menu-btn,
  body[data-role="superadmin"] .dashboard-menu-btn {
    display: inline-flex;
  }

  .top-profile-btn {
    display: inline-flex;
  }

  .sidebar {
    display: none;
  }

  body[data-role="supplier"] .sidebar.open,
  body[data-role="dispatch"] .sidebar.open,
  body[data-role="hr"] .sidebar.open,
  body[data-role="superadmin"] .sidebar.open {
    display: flex;
  }

  .top-bar-home-location-only {
    justify-content: space-between;
    gap: clamp(0.85rem, 1.8vw, 1.5rem);
    padding-left: 0.05rem;
    padding-right: 0;
  }

  .top-bar-home-location-only .top-bar-actions {
    flex: 0 1 auto;
    width: auto;
    margin-left: 0;
    justify-content: flex-end;
    order: 1;
  }

  body[data-route="home"] .top-bar-home-location-only .top-location-home-only,
  .top-bar-home-location-only .top-location-home-only {
    flex: 0 1 clamp(187px, 16.85vw, 250px);
    width: clamp(187px, 16.85vw, 250px);
    max-width: clamp(187px, 16.85vw, 250px);
    height: 58px;
    min-height: 58px;
    padding: 0 1rem;
    background: #ffffff;
    border: 1px solid rgba(13, 34, 71, 0.08);
    box-shadow:
      0 10px 22px rgba(13, 34, 71, 0.08),
      0 2px 8px rgba(13, 34, 71, 0.04);
  }

  .top-bar-home-location-only .top-bar-brand-hero {
    display: flex;
    order: 0;
    margin-right: auto;
    margin-left: 0;
    justify-content: center;
    width: clamp(187px, 16.85vw, 250px);
    height: 58px;
    padding: 0 1rem;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid rgba(13, 34, 71, 0.08);
    box-shadow:
      0 10px 22px rgba(13, 34, 71, 0.08),
      0 2px 8px rgba(13, 34, 71, 0.04);
    pointer-events: none;
  }

  .top-bar-home-location-only:not(.top-bar-home-search-slot) .top-search-wrap {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: min(100%, 560px);
    max-width: 560px;
    min-width: 0;
    margin: 0;
    flex: 0 0 auto;
  }
}

@media (min-width: 1440px) {
  .top-bar {
    --desktop-header-location-width: clamp(252px, 16vw, 322px);
    --desktop-header-search-width: clamp(420px, 28vw, 640px);
  }

  .top-bar-actions {
    gap: clamp(0.7rem, 0.85vw, 1rem);
  }

  .top-location {
    flex-basis: var(--desktop-header-location-width);
    width: var(--desktop-header-location-width);
    max-width: var(--desktop-header-location-width);
  }

  .top-search-wrap {
    flex-basis: var(--desktop-header-search-width);
    width: min(100%, var(--desktop-header-search-width));
    max-width: var(--desktop-header-search-width);
  }

  .top-bar-home-location-only {
    gap: clamp(1rem, 1.5vw, 1.8rem);
    padding-left: 0.2rem;
  }

  .top-bar-home-location-only .top-location-home-only {
    flex-basis: clamp(220px, 15vw, 290px);
    width: clamp(220px, 15vw, 290px);
    max-width: clamp(220px, 15vw, 290px);
  }

  .top-bar-home-location-only .top-bar-brand-hero {
    width: clamp(220px, 15vw, 290px);
  }
}

@media (min-width: 1920px) {
  .top-bar {
    --desktop-header-location-width: clamp(270px, 14vw, 340px);
    --desktop-header-search-width: clamp(500px, 24vw, 720px);
    gap: 0.95rem;
  }

  .top-bar-actions {
    gap: 0.85rem;
  }

  .top-location {
    flex-basis: var(--desktop-header-location-width);
    width: var(--desktop-header-location-width);
    max-width: var(--desktop-header-location-width);
  }

  .top-search-wrap {
    flex-basis: var(--desktop-header-search-width);
    width: min(100%, var(--desktop-header-search-width));
    max-width: var(--desktop-header-search-width);
  }

  .top-bar-home-location-only {
    gap: clamp(1.2rem, 1.35vw, 2rem);
    padding-left: 0.35rem;
  }

  .top-bar-home-location-only .top-location-home-only {
    flex-basis: clamp(240px, 13vw, 320px);
    width: clamp(240px, 13vw, 320px);
    max-width: clamp(240px, 13vw, 320px);
  }

  .top-bar-home-location-only .top-bar-brand-hero {
    width: clamp(240px, 13vw, 320px);
  }
}

@media (min-width: 2560px) {
  .top-bar-home-location-only {
    gap: 1.8rem;
    padding-left: 0.5rem;
  }

  .top-bar-home-location-only .top-location-home-only {
    flex-basis: clamp(270px, 11vw, 360px);
    width: clamp(270px, 11vw, 360px);
    max-width: clamp(270px, 11vw, 360px);
  }

  .top-bar-home-location-only .top-bar-brand-hero {
    width: clamp(270px, 11vw, 360px);
  }
}

@media (max-width: 768px) {
  body[data-route="home"],
  body[data-route="employee-dashboard"] {
    overflow-x: clip;
    overflow-y: auto;
    overscroll-behavior-y: auto;
    min-height: 100dvh;
    height: auto;
    width: 100%;
  }

  body[data-route="home"] .main-content,
  body[data-route="employee-dashboard"] .main-content {
    overflow-x: clip;
    overflow-y: visible;
    min-height: 100dvh;
    height: auto;
    padding-bottom: calc(86px + env(safe-area-inset-bottom));
  }

  body[data-route="home"] .home-shell,
  body[data-route="employee-dashboard"] .home-shell {
    overflow: visible;
    min-height: 100%;
    height: auto;
  }

  body[data-route="home"] .home-hero-rail,
  body[data-route="employee-dashboard"] .home-hero-rail {
    flex: 0 0 auto;
  }

  body[data-route="home"] .home-trust-section,
  body[data-route="employee-dashboard"] .home-trust-section {
    flex: 0 0 auto;
  }

  body[data-route="home"] .home-categories-section,
  body[data-route="employee-dashboard"] .home-categories-section {
    flex: 0 0 auto;
    min-height: auto;
    overflow: visible;
  }
}

@media (max-width: 1023px) {
  .desktop-header-menu {
    display: none !important;
  }

  body {
    background: #ffffff;
  }

  body::before,
  body::after {
    display: none;
  }

  #app,
  .app-layout {
    width: 100%;
    min-height: 100dvh;
    background: #ffffff;
  }

  .app-layout {
    position: relative;
    overflow: hidden;
  }

  body[data-route="home"] .main-content,
  body[data-route="employee-dashboard"] .main-content {
    --home-wave-band: 50dvh;
    --home-wave-height: clamp(86px, 10vw, 132px);
    --home-wave-rise: clamp(28px, 2.8vw, 46px);
    --home-wave-arc-extra: clamp(52px, 8vw, 80px);
    --home-wave-span: clamp(1400px, 150vw, 2800px);
  }

  .mobile-menu-btn {
    display: inline-flex;
  }

  .dashboard-menu-btn {
    display: none;
  }

  body[data-role="supplier"] .dashboard-menu-btn,
  body[data-role="dispatch"] .dashboard-menu-btn,
  body[data-role="hr"] .dashboard-menu-btn,
  body[data-role="superadmin"] .dashboard-menu-btn {
    display: inline-flex;
  }

  body[data-role="supplier"] .bottom-nav,
  body[data-role="dispatch"] .bottom-nav,
  body[data-role="hr"] .bottom-nav,
  body[data-role="superadmin"] .bottom-nav {
    display: none;
  }

  .top-profile-btn {
    display: none !important;
  }

  .sidebar {
    top: 0;
    bottom: 0;
    left: 0;
    border-radius: 0 var(--radius-2xl) var(--radius-2xl) 0;
    max-width: min(88vw, 320px);
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .top-bar {
    top: 0;
    left: 0;
    right: 0;
    min-height: 0;
    padding: max(0.4rem, env(safe-area-inset-top)) 0 0;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    box-shadow: 0 6px 18px rgba(13, 34, 71, 0.08);
  }

  .main-content {
    min-height: 100dvh;
    padding-top: calc(var(--navbar-height) + env(safe-area-inset-top));
    padding-bottom: calc(92px + env(safe-area-inset-bottom));
    padding-left: 0;
    padding-right: 0;
    background: #ffffff;
    overscroll-behavior-y: none;
  }

  .bottom-nav {
    display: flex;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 0;
    padding-left: max(0.55rem, env(safe-area-inset-left));
    padding-right: max(0.55rem, env(safe-area-inset-right));
    padding-bottom: max(0.35rem, env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    box-shadow: 0 -6px 18px rgba(13, 34, 71, 0.08);
  }

  .top-bar-mobile-location-only {
    justify-content: stretch;
    min-height: 68px;
    padding: 0.5rem 0.6rem;
  }

  .top-bar-mobile-location-only .top-bar-actions {
    width: 100%;
    gap: 0;
  }

  .top-bar-brand-hero {
    display: none !important;
  }

  .top-location-home-mobile {
    display: inline-flex;
    align-items: center;
    width: 100%;
    max-width: none;
    min-height: 56px;
    padding: 0.85rem 0.95rem;
    border-radius: 20px;
    background: var(--color-accent);
    border: 1px solid var(--color-accent-strong);
    box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  }

  .top-location-home-mobile .top-location-copy {
    flex: 1;
  }

  .top-location-home-mobile .top-location-address {
    font-size: var(--font-size-sm);
    font-weight: 800;
  }
}

@media (max-width: 767px) {
  body[data-route="home"] .main-content,
  body[data-route="employee-dashboard"] .main-content {
    --home-wave-band: clamp(300px, 51dvh, 560px);
    --home-wave-height: clamp(74px, 21vw, 126px);
    --home-wave-rise: clamp(22px, 5vw, 42px);
    --home-wave-arc-extra: clamp(42px, 10vw, 68px);
  }

  body[data-route="home"] .main-content::before,
  body[data-route="employee-dashboard"] .main-content::before,
  body[data-route="home"] .main-content::after,
  body[data-route="employee-dashboard"] .main-content::after {
    display: none;
  }

  .top-bar {
    gap: 0.65rem;
  }

  .top-bar-brand-copy {
    display: none;
  }

  .page-content {
    width: 100%;
    max-width: none;
  }

  body[data-route="products"] .top-bar {
    min-height: 0;
    padding: 0;
  }

  body[data-route="products"] .top-bar-actions {
    width: 100%;
    gap: 0.55rem;
  }

  body[data-route="products"] .top-search-wrap {
    width: 100%;
    min-width: 0;
  }

  body[data-route="products"] .desktop-header-menu {
    display: none !important;
  }
}

@media (max-width: 480px) {
  body[data-route="products"] .top-bar {
    padding: 0;
  }

  body[data-route="products"] .top-search-wrap {
    flex: 1 1 auto;
  }
}
