/* Adawat admin shell --" sidebar + main content */

.shell {
  --shell-sidebar-width: 16.5rem;
  --shell-sidebar-rail-width: 3.75rem;
  --shell-topbar-height: 3.75rem;
  --shell-content-pad: 1.5rem;
  --shell-slide-sign: 1;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  display: flex;
  overflow: hidden;
  background: var(--neutral-50);
  color: var(--neutral-800);
  font-family: var(--font-body);
}

/* Dedicated Item database workspace window — no admin nav rail. */
.shell.is-workspace .shell-backdrop,
.shell.is-workspace .shell-edge-hotzone,
.shell.is-workspace .shell-sidebar {
  display: none !important;
}

.shell.is-workspace .shell-main {
  width: 100%;
  max-width: 100%;
  flex: 1 1 auto;
}

.shell.is-workspace .shell-content {
  --shell-content-pad: 1rem;
}

/* Lock document scroll while the admin shell is mounted --" one scroll surface only */
html:has(.shell),
body:has(.shell),
#root:has(.shell) {
  height: 100%;
  max-height: 100dvh;
  overflow: hidden;
}

.shell-backdrop {
  display: none;
}

.shell-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  width: var(--shell-sidebar-width);
  flex-shrink: 0;
  overflow: hidden;
  background: var(--neutral-0);
  border-inline-end: 1px solid var(--neutral-100);
  z-index: 30;
  transition: width 0.16s ease, border-color 0.12s ease;
}

.shell-sidebar-inner {
  display: flex;
  flex-direction: column;
  width: var(--shell-sidebar-width);
  min-width: var(--shell-sidebar-width);
  height: 100%;
  min-height: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Desktop collapsed: icon rail (labels/chevrons hidden; icons centered). */
@media (min-width: 901px) {
  .shell.is-sidebar-collapsed .shell-sidebar {
    width: var(--shell-sidebar-rail-width);
    border-inline-end-color: var(--neutral-100);
  }

  .shell.is-sidebar-collapsed:not(.is-sidebar-peek) .shell-sidebar-inner {
    width: var(--shell-sidebar-rail-width);
    min-width: var(--shell-sidebar-rail-width);
  }

  .shell.is-sidebar-collapsed:not(.is-sidebar-peek) .shell-brand {
    padding-inline: 0.35rem;
  }

  .shell.is-sidebar-collapsed:not(.is-sidebar-peek) .shell-logo {
    width: 2.15rem;
    max-height: 1.85rem;
  }

  .shell.is-sidebar-collapsed:not(.is-sidebar-peek) .shell-nav-link {
    justify-content: center;
    gap: 0;
    padding-inline: 0.45rem;
  }

  .shell.is-sidebar-collapsed:not(.is-sidebar-peek) .shell-nav-link > span,
  .shell.is-sidebar-collapsed:not(.is-sidebar-peek) .shell-nav-chevron {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .shell.is-sidebar-collapsed:not(.is-sidebar-peek) .shell-nav-children,
  .shell.is-sidebar-collapsed:not(.is-sidebar-peek) .shell-sidebar-footer {
    display: none;
  }

  /* Peek expands in-flow so main content shifts right (no overlay). */
  .shell.is-sidebar-collapsed.is-sidebar-peek .shell-sidebar {
    width: var(--shell-sidebar-width);
  }

  .shell.is-sidebar-collapsed.is-sidebar-peek .shell-sidebar-inner {
    width: var(--shell-sidebar-width);
    min-width: var(--shell-sidebar-width);
  }
}

/* Invisible left-edge strip --" hover reveals full labels while collapsed */
.shell-edge-hotzone {
  position: fixed;
  inset-inline-start: 0;
  top: 0;
  width: 0.55rem;
  height: 100vh;
  z-index: 45;
  pointer-events: none;
}

.shell.is-sidebar-collapsed .shell-edge-hotzone {
  pointer-events: auto;
}

.shell.is-sidebar-collapsed.is-sidebar-peek .shell-edge-hotzone {
  /* Keep a thin strip so leaving the sidebar can still hit the hotzone briefly */
  width: 0.35rem;
}

.shell-brand {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Match topbar height so logo sits on the same row as the page title */
  height: var(--shell-topbar-height);
  min-height: var(--shell-topbar-height);
  padding: 0 1rem;
  width: 100%;
  box-sizing: border-box;
  border-bottom: 1px solid var(--neutral-100);
}

.shell-logo {
  display: block;
  width: 3.6rem;
  max-height: 2.35rem;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  object-position: center;
  background: transparent;
}

.shell-sidebar-close {
  display: none;
  position: absolute;
  inset-inline-end: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
}

.shell-nav {
  display: grid;
  gap: 0.25rem;
  flex: 1 1 auto;
  min-height: 0;
  align-content: start;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: auto;
  /* Align first nav item with first content card below the topbar */
  padding-top: var(--shell-content-pad);
  padding-bottom: 0.5rem;
}

.shell-nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  padding: 0.7rem 1rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--neutral-600);
  text-align: start;
  text-decoration: none;
  font: inherit;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  /* Instant hover while scrubbing the sidebar (esp. dark mode) */
  transition: none;
}

.shell-nav-link::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: transparent;
  pointer-events: none;
}

.shell-nav-group {
  display: grid;
  gap: 0.15rem;
}

.shell-nav-group-toggle .shell-nav-chevron {
  width: 0.95rem;
  height: 0.95rem;
  margin-inline-start: auto;
  color: var(--neutral-400);
  transition: transform 0.16s cubic-bezier(0.22, 1, 0.36, 1), color 0.08s ease;
}

.shell-nav-group.is-open .shell-nav-group-toggle .shell-nav-chevron {
  transform: rotate(90deg);
  color: var(--primary-500);
}

.shell-nav-group-toggle.is-group-current {
  color: var(--primary-500);
  font-weight: 700;
}

.shell-nav-children {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition:
    grid-template-rows 0.18s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.12s ease;
}

.shell-nav-group.is-open .shell-nav-children {
  grid-template-rows: 1fr;
  opacity: 1;
}

.shell-nav-children-inner {
  display: grid;
  gap: 0.1rem;
  overflow: hidden;
  min-height: 0;
  padding: 0;
}

.shell-nav-group.is-open .shell-nav-children-inner {
  padding: 0.1rem 0 0.35rem;
}

.shell-nav-child {
  padding-inline-start: 1.85rem;
  font-size: 0.9rem;
  opacity: 0;
  transform: translateY(-0.2rem);
  transition:
    opacity 0.12s ease,
    transform 0.14s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: 0s;
}

.shell-nav-group.is-open .shell-nav-child {
  opacity: 1;
  transform: translateY(0);
  transition-delay: calc(var(--nav-child-index, 0) * 0.015s);
}

.shell-nav-link:focus-visible {
  outline: var(--focus-ring);
  outline-offset: -2px;
  background: var(--primary-50);
  color: var(--primary-600);
}

.shell-nav-link:hover {
  color: var(--primary-500);
  background: var(--primary-50);
}

.shell-nav-link:hover::before {
  background: var(--primary-400);
}

.shell-nav-link:hover .shell-icon {
  color: var(--primary-500);
}

.shell-nav-link.is-active {
  background: var(--primary-50);
  color: var(--primary-600);
  font-weight: 700;
}

.shell-nav-link.is-active::before {
  background: var(--primary-500);
}

.shell-nav-link.is-active .shell-icon {
  color: var(--primary-500);
}

.shell-nav-link.is-active:hover,
.shell-nav-group-toggle.is-group-current:hover {
  background: var(--primary-50);
  color: var(--primary-500);
}

.shell-nav-link.is-active:hover::before,
.shell-nav-group-toggle.is-group-current:hover::before {
  background: var(--primary-400);
}

.shell-nav-link.is-active:hover .shell-icon,
.shell-nav-group-toggle.is-group-current:hover .shell-icon {
  color: var(--primary-500);
}

.shell-icon {
  color: var(--primary-500);
}

.shell-nav-link.is-active {
  background: var(--primary-50);
  color: var(--primary-600);
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--primary-500);
}

.shell-nav-link.is-active .shell-icon {
  color: var(--primary-500);
}

.shell-nav-link.is-active:hover,
.shell-nav-group-toggle.is-group-current:hover {
  background: var(--primary-50);
  box-shadow: inset 3px 0 0 var(--primary-400);
  color: var(--primary-500);
}

.shell-nav-link.is-active:hover .shell-icon,
.shell-nav-group-toggle.is-group-current:hover .shell-icon {
  color: var(--primary-500);
}

.shell-icon {
  width: 1.2rem;
  height: 1.2rem;
  flex-shrink: 0;
  color: inherit;
}

.shell-sidebar-footer {
  flex-shrink: 0;
  margin-top: auto;
  padding: 1rem 0.85rem 1.15rem;
  border-top: 1px solid var(--neutral-100);
  display: grid;
  gap: 0.7rem;
  justify-items: stretch;
  background: var(--neutral-0);
}

.shell-credit {
  margin: 0;
  text-align: center;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--neutral-500);
}

.shell-credit-brand {
  color: var(--neutral-500);
  font-weight: 600;
}

.shell-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--neutral-100);
  background: var(--neutral-50);
  padding: 0.7rem 0.9rem;
  border-radius: 0.55rem;
  color: var(--neutral-700);
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  text-align: center;
  transition: none;
}

.shell-logout:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

.shell-logout:hover {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  color: var(--danger-text);
  box-shadow: 0 1px 2px color-mix(in srgb, var(--danger-text) 12%, transparent);
}

.shell-logout:hover .shell-icon {
  color: var(--danger-text);
}

.shell-main {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.shell-topbar {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  height: var(--shell-topbar-height);
  min-height: var(--shell-topbar-height);
  padding: 0 1.5rem;
  box-sizing: border-box;
  background: var(--neutral-0);
  border-bottom: 1px solid var(--neutral-100);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 25;
}

.shell-topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.shell-notify {
  position: relative;
  flex-shrink: 0;
}

.shell-notify-trigger {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  background: transparent;
  border-radius: 999px;
  color: var(--neutral-700);
  cursor: pointer;
}

.shell-notify-trigger:hover,
.shell-notify-trigger:focus-visible,
.shell-notify-trigger.is-open {
  background: var(--neutral-50);
  color: var(--neutral-900);
}

.shell-notify-trigger:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

.shell-notify-badge {
  position: absolute;
  top: 0.05rem;
  right: 0.05rem;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.28rem;
  border-radius: 999px;
  background: var(--danger-solid);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.15rem;
  text-align: center;
  letter-spacing: -0.02em;
  pointer-events: none;
}

.shell-notify-panel {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 40;
  width: min(22rem, calc(100vw - 1.5rem));
  border: 1px solid var(--neutral-100);
  border-radius: var(--radius-lg, 0.85rem);
  background: var(--neutral-0);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--neutral-900) 12%, transparent);
  overflow: hidden;
}

.shell-notify-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--neutral-100);
}

.shell-notify-panel-title {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--neutral-900);
}

.shell-notify-panel-count {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--neutral-500);
}

.shell-notify-list {
  max-height: 22rem;
  overflow: auto;
}

.shell-notify-empty {
  margin: 0;
  padding: 1.35rem 1rem;
  text-align: center;
  font-size: 0.88rem;
  color: var(--neutral-500);
}

.shell-notify-item {
  display: grid;
  gap: 0.2rem;
  width: 100%;
  margin: 0;
  padding: 0.75rem 1rem;
  border: 0;
  border-bottom: 1px solid var(--neutral-50);
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.shell-notify-item:hover,
.shell-notify-item:focus-visible {
  background: var(--neutral-50);
}

.shell-notify-item.is-unread {
  background: color-mix(in srgb, var(--primary-500) 6%, var(--neutral-0));
}

.shell-notify-item-title {
  font-size: 0.88rem;
  font-weight: 650;
  color: var(--neutral-900);
}

.shell-notify-item-body {
  font-size: 0.8rem;
  color: var(--neutral-500);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.shell-notify-item-when {
  font-size: 0.72rem;
  color: var(--neutral-400);
}

.shell-notify-panel-foot {
  border-top: 1px solid var(--neutral-100);
  padding: 0.55rem;
}

.shell-notify-view-all {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-md, 0.55rem);
  color: var(--primary-600);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 650;
  cursor: pointer;
  text-align: center;
}

.shell-notify-view-all:hover,
.shell-notify-view-all:focus-visible {
  background: color-mix(in srgb, var(--primary-500) 10%, var(--neutral-0));
}

/* Phones: the bell is not the last topbar icon, so anchoring to it pushes the
   panel off the left edge. Pin it to the viewport gutters instead. */
@media (max-width: 640px) {
  .shell-notify-panel {
    position: fixed;
    top: calc(var(--shell-topbar-height) + 0.4rem);
    left: 0.75rem;
    right: 0.75rem;
    width: auto;
  }

  .shell-notify-list {
    max-height: min(22rem, calc(100dvh - var(--shell-topbar-height) - 9rem));
  }
}

.shell-account-trigger {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  background: transparent;
  border-radius: 999px;
  color: var(--neutral-700);
  cursor: pointer;
  flex-shrink: 0;
}

.shell-account-trigger:hover,
.shell-account-trigger:focus-visible {
  background: var(--neutral-50);
  color: var(--neutral-900);
}

.shell-account-trigger.is-active {
  background: color-mix(in srgb, var(--primary-500) 12%, var(--neutral-0));
  color: var(--primary-600);
}

.shell-account-trigger:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

.shell-menu-toggle {
  display: inline-grid;
  place-items: center;
  border: 0;
  background: transparent;
  border-radius: 0.4rem;
  padding: 0.35rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  color: var(--neutral-700);
  cursor: pointer;
  flex-shrink: 0;
}

.shell-menu-toggle:hover,
.shell-menu-toggle:focus-visible {
  background: var(--neutral-50);
  color: var(--neutral-900);
}

.shell-menu-toggle:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

.shell-topbar-text {
  min-width: 0;
}

.shell-page-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--neutral-900);
}

.shell-user-email {
  margin: 0.15rem 0 0;
  font-size: 0.85rem;
  color: var(--neutral-400);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shell-content {
  padding: var(--shell-content-pad);
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
}

.shell-page {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  animation: shell-page-in 0.28s ease;
}

/* Orders / Catalog / Reviews fill-viewport pages: no page scroll --" table scrolls */
.shell-content:has(.orders-page),
.shell-content:has(.catalog-page--items),
.shell-content:has(.item-db),
.shell-content:has(.reviews-page),
.shell-content:has(.questions-page),
.shell-content:has(.marketing-page),
.shell-content:has(.reports-page),
.shell-content:has(.admin-people-page),
.shell-content:has(.admin-panel),
.shell-content:has(.loyalty-page),
.shell-content:has(.inventory-page),
.shell-content:has(.carrier-page) {
  overflow: hidden;
}

/* Carrier: on phone let the page scroll (map must not trap the viewport). */
@media (max-width: 1099px) {
  .shell-content:has(.carrier-page) {
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@keyframes shell-page-in {
  from {
    opacity: 0;
    transform: translateY(0.35rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.shell-panel {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  background: var(--neutral-0);
  border: 1px solid var(--neutral-100);
  border-radius: 0.85rem;
  padding: 1.5rem 1.6rem;
  box-shadow: 0 1px 2px rgba(7, 12, 28, 0.04);
}

.shell-panel-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--neutral-900);
}

.shell-panel-title + .shell-panel-copy {
  margin-top: 0.5rem;
}

.shell-panel-copy {
  margin: 0;
  color: var(--neutral-500);
  line-height: 1.55;
  font-size: 0.98rem;
}

.shell-panel--greeting .shell-panel-title {
  margin-bottom: 0.35rem;
}

.shell-greeting-date {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--neutral-600);
}

.shell-greeting-meta {
  margin: 0.45rem 0 0;
  font-size: 0.85rem;
  color: var(--neutral-500);
  line-height: 1.4;
}

.shell-greeting-sep {
  color: var(--neutral-400);
}

.shell-emphasis {
  color: var(--primary-600);
  font-weight: 600;
}

@media (max-width: 900px) {
  .shell-edge-hotzone {
    display: none;
  }

  .shell.is-sidebar-collapsed .shell-sidebar {
    width: min(18rem, 86vw);
    border-inline-end-color: var(--neutral-100);
  }

  .shell-sidebar-close {
    display: inline-grid;
    place-items: center;
    border: 0;
    background: transparent;
    padding: 0.35rem;
    color: var(--neutral-500);
    cursor: pointer;
    border-radius: 0.4rem;
  }

  .shell-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(7, 12, 28, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 40;
  }

  .shell-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  .shell-sidebar {
    position: fixed;
    inset-inline-start: 0;
    top: 0;
    width: min(18rem, 86vw);
    transform: translateX(calc(-105% * var(--shell-slide-sign, 1)));
    transition: transform 0.22s ease;
    box-shadow: 8px 0 28px rgba(7, 12, 28, 0.12);
    z-index: 50;
  }

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

  .shell-sidebar-inner {
    width: 100%;
    min-width: 0;
  }

  .shell {
    --shell-content-pad: 1.15rem;
  }
}

/* ------------------------------------------------------------------ */
/* Sidebar nav icon motions (hover + subtle active loop)              */
/* Contract: apps/admin_ui/VIEW.md -- Sidebar nav icon animations      */
/* ------------------------------------------------------------------ */

.shell-icon[data-nav-icon] {
  overflow: visible;
}

.shell-icon[data-nav-icon] .nav-ico-tile,
.shell-icon[data-nav-icon] .nav-ico-bar,
.shell-icon[data-nav-icon] .nav-ico-wheel,
.shell-icon[data-nav-icon] .nav-ico-figure,
.shell-icon[data-nav-icon] .nav-ico-truck {
  transform-box: fill-box;
  transform-origin: center;
}

.shell-icon[data-nav-icon="carrier"] .nav-ico-wheel {
  transform-box: fill-box;
  transform-origin: center;
}

.shell-icon[data-nav-icon="reports"] .nav-ico-bar {
  transform-origin: center bottom;
}

.shell-icon[data-nav-icon="listings"] {
  transform-origin: 34% 34%;
}

@keyframes nav-ico-tile-pop {
  0% {
    opacity: 0.35;
    transform: scale(0.72);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes nav-ico-package-pop {
  0%,
  100% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.1);
  }
}

@keyframes nav-ico-drive {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(2px);
  }
}

@keyframes nav-ico-wheel-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes nav-ico-figure-bounce {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  40% {
    transform: translateY(-1.5px) scale(1.06);
  }
}

@keyframes nav-ico-tag-swing {
  0%,
  100% {
    transform: rotate(0deg);
  }
  30% {
    transform: rotate(-7deg);
  }
  70% {
    transform: rotate(5deg);
  }
}

@keyframes nav-ico-settle {
  0% {
    transform: translateY(-2px);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes nav-ico-bar-grow {
  0% {
    transform: scaleY(0.15);
  }
  100% {
    transform: scaleY(1);
  }
}

@keyframes nav-ico-shield-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.08);
  }
}

@keyframes nav-ico-gear-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Hover --" short, ease-in-out (0.4--"0.8s) */
.shell-nav-link:hover .shell-icon[data-nav-icon="dashboard"] .nav-ico-tile {
  animation: nav-ico-tile-pop 0.55s ease-in-out both;
}

.shell-nav-link:hover .shell-icon[data-nav-icon="dashboard"] .nav-ico-tile:nth-child(1) {
  animation-delay: 0s;
}
.shell-nav-link:hover .shell-icon[data-nav-icon="dashboard"] .nav-ico-tile:nth-child(2) {
  animation-delay: 0.07s;
}
.shell-nav-link:hover .shell-icon[data-nav-icon="dashboard"] .nav-ico-tile:nth-child(3) {
  animation-delay: 0.14s;
}
.shell-nav-link:hover .shell-icon[data-nav-icon="dashboard"] .nav-ico-tile:nth-child(4) {
  animation-delay: 0.21s;
}

.shell-nav-link:hover .shell-icon[data-nav-icon="orders"] {
  animation: nav-ico-package-pop 0.5s ease-in-out;
}

.shell-nav-link:hover .shell-icon[data-nav-icon="carrier"] .nav-ico-truck {
  animation: nav-ico-drive 0.7s ease-in-out infinite;
}

.shell-nav-link:hover .shell-icon[data-nav-icon="carrier"] .nav-ico-wheel {
  animation: nav-ico-wheel-spin 0.7s linear infinite;
}

.shell-nav-link:hover .shell-icon[data-nav-icon="people"] .nav-ico-figure--a {
  animation: nav-ico-figure-bounce 0.55s ease-in-out;
}

.shell-nav-link:hover .shell-icon[data-nav-icon="people"] .nav-ico-figure--b {
  animation: nav-ico-figure-bounce 0.55s ease-in-out 0.12s;
}

.shell-nav-link:hover .shell-icon[data-nav-icon="listings"] {
  animation: nav-ico-tag-swing 0.65s ease-in-out;
}

.shell-nav-link:hover .shell-icon[data-nav-icon="store"] {
  animation: nav-ico-settle 0.45s ease-out;
}

.shell-nav-link:hover .shell-icon[data-nav-icon="reports"] .nav-ico-bar {
  animation: nav-ico-bar-grow 0.55s ease-in-out both;
}

.shell-nav-link:hover .shell-icon[data-nav-icon="reports"] .nav-ico-bar:nth-of-type(2) {
  animation-delay: 0s;
}
.shell-nav-link:hover .shell-icon[data-nav-icon="reports"] .nav-ico-bar:nth-of-type(3) {
  animation-delay: 0.08s;
}
.shell-nav-link:hover .shell-icon[data-nav-icon="reports"] .nav-ico-bar:nth-of-type(4) {
  animation-delay: 0.16s;
}

.shell-nav-link:hover .shell-icon[data-nav-icon="admin"] {
  animation: nav-ico-shield-pulse 0.5s ease-in-out;
}

.shell-nav-link:hover .shell-icon[data-nav-icon="settings"] {
  animation: nav-ico-gear-spin 2.8s linear infinite;
}

/* Active / current group --" quieter looping presence */
.shell-nav-link.is-active .shell-icon[data-nav-icon="dashboard"] .nav-ico-tile:nth-child(1),
.shell-nav-group-toggle.is-group-current .shell-icon[data-nav-icon="dashboard"] .nav-ico-tile:nth-child(1) {
  animation: nav-ico-tile-pop 2.8s ease-in-out infinite;
}
.shell-nav-link.is-active .shell-icon[data-nav-icon="dashboard"] .nav-ico-tile:nth-child(2),
.shell-nav-group-toggle.is-group-current .shell-icon[data-nav-icon="dashboard"] .nav-ico-tile:nth-child(2) {
  animation: nav-ico-tile-pop 2.8s ease-in-out 0.12s infinite;
}
.shell-nav-link.is-active .shell-icon[data-nav-icon="dashboard"] .nav-ico-tile:nth-child(3),
.shell-nav-group-toggle.is-group-current .shell-icon[data-nav-icon="dashboard"] .nav-ico-tile:nth-child(3) {
  animation: nav-ico-tile-pop 2.8s ease-in-out 0.24s infinite;
}
.shell-nav-link.is-active .shell-icon[data-nav-icon="dashboard"] .nav-ico-tile:nth-child(4),
.shell-nav-group-toggle.is-group-current .shell-icon[data-nav-icon="dashboard"] .nav-ico-tile:nth-child(4) {
  animation: nav-ico-tile-pop 2.8s ease-in-out 0.36s infinite;
}

.shell-nav-link.is-active .shell-icon[data-nav-icon="orders"],
.shell-nav-group-toggle.is-group-current .shell-icon[data-nav-icon="orders"] {
  animation: nav-ico-package-pop 2.4s ease-in-out infinite;
}

.shell-nav-link.is-active .shell-icon[data-nav-icon="carrier"] .nav-ico-truck,
.shell-nav-group-toggle.is-group-current .shell-icon[data-nav-icon="carrier"] .nav-ico-truck {
  animation: nav-ico-drive 2.2s ease-in-out infinite;
}

.shell-nav-link.is-active .shell-icon[data-nav-icon="carrier"] .nav-ico-wheel,
.shell-nav-group-toggle.is-group-current .shell-icon[data-nav-icon="carrier"] .nav-ico-wheel {
  animation: nav-ico-wheel-spin 2.2s linear infinite;
}

.shell-nav-link.is-active .shell-icon[data-nav-icon="people"] .nav-ico-figure--a,
.shell-nav-group-toggle.is-group-current .shell-icon[data-nav-icon="people"] .nav-ico-figure--a {
  animation: nav-ico-figure-bounce 2.4s ease-in-out infinite;
}

.shell-nav-link.is-active .shell-icon[data-nav-icon="people"] .nav-ico-figure--b,
.shell-nav-group-toggle.is-group-current .shell-icon[data-nav-icon="people"] .nav-ico-figure--b {
  animation: nav-ico-figure-bounce 2.4s ease-in-out 0.2s infinite;
}

.shell-nav-link.is-active .shell-icon[data-nav-icon="listings"],
.shell-nav-group-toggle.is-group-current .shell-icon[data-nav-icon="listings"] {
  animation: nav-ico-tag-swing 2.6s ease-in-out infinite;
}

.shell-nav-link.is-active .shell-icon[data-nav-icon="store"],
.shell-nav-group-toggle.is-group-current .shell-icon[data-nav-icon="store"] {
  animation: nav-ico-settle 2.2s ease-out infinite;
}

.shell-nav-link.is-active .shell-icon[data-nav-icon="reports"] .nav-ico-bar:nth-of-type(2),
.shell-nav-group-toggle.is-group-current .shell-icon[data-nav-icon="reports"] .nav-ico-bar:nth-of-type(2) {
  animation: nav-ico-bar-grow 2.4s ease-in-out infinite;
}
.shell-nav-link.is-active .shell-icon[data-nav-icon="reports"] .nav-ico-bar:nth-of-type(3),
.shell-nav-group-toggle.is-group-current .shell-icon[data-nav-icon="reports"] .nav-ico-bar:nth-of-type(3) {
  animation: nav-ico-bar-grow 2.4s ease-in-out 0.12s infinite;
}
.shell-nav-link.is-active .shell-icon[data-nav-icon="reports"] .nav-ico-bar:nth-of-type(4),
.shell-nav-group-toggle.is-group-current .shell-icon[data-nav-icon="reports"] .nav-ico-bar:nth-of-type(4) {
  animation: nav-ico-bar-grow 2.4s ease-in-out 0.24s infinite;
}

.shell-nav-link.is-active .shell-icon[data-nav-icon="admin"],
.shell-nav-group-toggle.is-group-current .shell-icon[data-nav-icon="admin"] {
  animation: nav-ico-shield-pulse 2.4s ease-in-out infinite;
}

.shell-nav-link.is-active .shell-icon[data-nav-icon="settings"],
.shell-nav-group-toggle.is-group-current .shell-icon[data-nav-icon="settings"] {
  animation: nav-ico-gear-spin 12s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .shell-sidebar,
  .shell-backdrop,
  .shell-nav-link,
  .shell-logout {
    transition: none !important;
  }

  .shell.is-sidebar-collapsed .shell-sidebar {
    transition: none !important;
  }

  .shell-page {
    animation: none !important;
  }

  .shell-nav-link.is-active {
    animation: none !important;
    color: var(--primary-600);
    text-shadow: none;
    filter: none;
  }

  .shell-nav-link .shell-icon[data-nav-icon],
  .shell-nav-link .shell-icon[data-nav-icon] .nav-ico-tile,
  .shell-nav-link .shell-icon[data-nav-icon] .nav-ico-bar,
  .shell-nav-link .shell-icon[data-nav-icon] .nav-ico-wheel,
  .shell-nav-link .shell-icon[data-nav-icon] .nav-ico-figure,
  .shell-nav-link .shell-icon[data-nav-icon] .nav-ico-truck {
    animation: none !important;
  }
}

[dir="rtl"] .shell {
  --shell-slide-sign: -1;
}

[dir="rtl"] .shell-nav-link::before {
  inset-inline-start: auto;
  inset-inline-end: 0;
}

@media (max-width: 900px) {
  [dir="rtl"] .shell-sidebar {
    box-shadow: -8px 0 28px rgba(7, 12, 28, 0.12);
  }
}

/* Viewport-fixed toast (portaled to body) ---- shared with login Toast component */
.ui-toast-host {
  position: fixed;
  inset: auto 1.25rem 1.25rem auto;
  z-index: 10050;
  display: grid;
  gap: 0.5rem;
  max-width: min(22rem, calc(100vw - 2rem));
  pointer-events: none;
}

.ui-toast {
  pointer-events: auto;
  display: block;
  width: 100%;
  margin: 0;
  border-radius: 0.5rem;
  padding: 0.85rem 1rem;
  text-align: start;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
  animation: ui-toast-in 0.28s ease-out both;
}

.ui-toast--error {
  border: 1px solid var(--danger-border);
  background: var(--danger-bg);
  color: var(--danger-text);
}

.ui-toast--info {
  border: 1px solid var(--info-border);
  background: var(--info-bg);
  color: var(--info-text);
}

.ui-toast--success {
  border: 1px solid var(--success-border);
  background: var(--success-bg);
  color: var(--success-text);
}

.ui-toast__text {
  display: block;
}

@keyframes ui-toast-in {
  from {
    opacity: 0;
    transform: translateY(0.6rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Agent carrier immersive -- hide admin chrome for driver PWA */
body.carrier-agent-immersive .shell-sidebar,
body.carrier-agent-immersive .shell-backdrop,
body.carrier-agent-immersive .shell-edge-hotzone {
  display: none !important;
}

body.carrier-agent-immersive .shell-topbar {
  display: none !important;
}

body.carrier-agent-immersive .shell {
  display: block;
  background: var(--neutral-0);
}

body.carrier-agent-immersive .shell-main {
  height: 100%;
  max-height: 100dvh;
}

body.carrier-agent-immersive .shell-content {
  padding: 0;
  height: 100%;
  max-height: 100dvh;
  overflow: hidden;
}

body.carrier-agent-immersive .shell-page {
  height: 100%;
  min-height: 100%;
}

body.carrier-agent-immersive .shell-content:has(.carrier-page) {
  overflow: hidden;
}
