:root {
  --bg-0: #eef4fb;
  --bg-1: #f7fbff;
  --panel: rgba(255, 255, 255, 0.88);
  --panel-border: rgba(9, 31, 58, 0.1);
  --text-0: #0f2036;
  --text-1: #4d5f77;
  --accent: #0f6ddf;
  --accent-2: #24a1ff;
  --danger: #c53838;
  --warning: #d4790f;
  --success: #1a8f5b;
  --shadow: 0 16px 40px rgba(9, 30, 60, 0.12);
  --radius-xl: 24px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

[data-theme='dark'] {
  --bg-0: #111822;
  --bg-1: #1a2431;
  --panel: rgba(17, 26, 39, 0.86);
  --panel-border: rgba(186, 206, 233, 0.18);
  --text-0: #e7f0ff;
  --text-1: #9db0ca;
  --accent: #58a9ff;
  --accent-2: #93c5fd;
  --danger: #ff7a7a;
  --warning: #ffbb66;
  --success: #5ed4a0;
  --shadow: 0 16px 44px rgba(0, 0, 0, 0.35);
}

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

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

body {
  font-family: 'SF Pro Display', 'Avenir Next', 'Segoe UI', sans-serif;
  color: var(--text-0);
  background: radial-gradient(120% 70% at 20% -10%, var(--bg-1), transparent 60%),
              radial-gradient(120% 90% at 100% 0%, rgba(21, 154, 255, 0.17), transparent 64%),
              linear-gradient(160deg, var(--bg-0), var(--bg-1));
}

.app-shell {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 1rem 0.9rem 6rem;
}

.glass {
  backdrop-filter: blur(14px) saturate(130%);
  border: 1px solid var(--panel-border);
  background: var(--panel);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.topbar {
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  animation: drop-in 420ms ease-out both;
}

.title {
  margin: 0;
  font-size: clamp(1.2rem, 4vw, 1.8rem);
  letter-spacing: 0.01em;
}

.subtitle {
  margin: 0.25rem 0 0;
  color: var(--text-1);
  font-size: 0.95rem;
}

.button,
button,
input,
select {
  font: inherit;
}

.button {
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: 999px;
  padding: 0.62rem 0.95rem;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--text-0);
  cursor: pointer;
  min-height: 44px;
  transition: transform 140ms ease, background-color 140ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0);
}

.button[disabled],
.button.is-busy {
  opacity: 0.72;
  cursor: default;
  pointer-events: none;
  transform: none;
}

.button.is-busy .icon {
  animation: spin 1s linear infinite;
}

.button-quiet {
  background: transparent;
}

.button-danger {
  border-color: color-mix(in srgb, var(--danger) 30%, transparent);
  background: color-mix(in srgb, var(--danger) 15%, transparent);
  color: var(--danger);
}

.button-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
}

.notif-btn {
  position: relative;
}

.notif-btn[data-count]:not([data-count='0'])::after {
  content: attr(data-count);
  position: absolute;
  top: -0.2rem;
  right: -0.2rem;
  min-width: 1.12rem;
  height: 1.12rem;
  padding: 0 0.22rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--danger);
  color: #fff;
  font-size: 0.68rem;
  line-height: 1;
  border: 2px solid color-mix(in srgb, var(--panel) 92%, transparent);
}

.button-with-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-only {
  width: 44px;
  min-width: 44px;
  padding-inline: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon,
.icon-sm {
  width: 1rem;
  height: 1rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.icon-sm {
  width: 0.92rem;
  height: 0.92rem;
}

.layout {
  margin-top: 1rem;
  display: grid;
  gap: 1rem;
}

.card {
  padding: 1rem;
}

.hidden {
  display: none !important;
}

.hidden-input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}

.form-grid {
  display: grid;
  gap: 0.75rem;
}

.compact-search {
  grid-template-columns: 1fr auto;
}

.inventory-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.5rem;
  align-items: center;
}

.inventory-toolbar input[type='search'] {
  min-width: 0;
}

.inventory-toolbar .button {
  min-height: 44px;
  padding-inline: 0.55rem;
}

.inventory-toolbar .button .button-inline {
  gap: 0.28rem;
}

.inventory-toolbar .button .button-inline span:last-child {
  white-space: nowrap;
}

.grid-2 {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: 1fr 1fr;
}

.label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  color: var(--text-1);
}

input,
select {
  width: 100%;
  min-height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--panel-border);
  padding: 0.65rem 0.75rem;
  background: rgba(255, 255, 255, 0.66);
  color: var(--text-0);
}

input[type='checkbox'] {
  width: 18px;
  min-height: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  accent-color: var(--accent);
}

[data-theme='dark'] input,
[data-theme='dark'] select {
  background: rgba(11, 19, 30, 0.72);
}

.error {
  color: var(--danger);
  font-size: 0.9rem;
}

.hint {
  color: var(--text-1);
  font-size: 0.9rem;
}

.loading-line {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.spinning {
  animation: spin 1s linear infinite;
}

#user-role {
  margin-left: 0.4rem;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
  border: 1px solid var(--panel-border);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  min-width: 0;
  overflow-wrap: anywhere;
  align-items: center;
  gap: 0.35rem;
}

.products-toast {
  margin-top: 0.7rem;
  margin-bottom: 0.2rem;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  border: 1px solid #9ed3b4;
  background: #e8f7ef;
  color: var(--text-0);
  font-size: 0.9rem;
}

.products-toast.is-error {
  border-color: #e3a3a3;
  background: #fdecec;
}

.action-toast {
  position: sticky;
  top: 0.75rem;
  z-index: 60;
  margin-top: 0.7rem;
  margin-bottom: 0.2rem;
  padding: 0.6rem 0.8rem;
  border-radius: 12px;
  border: 1px solid #90cbae;
  background: #e4f5eb;
  color: var(--text-0);
  font-size: 0.9rem;
  box-shadow: var(--shadow);
}

.action-toast.is-error {
  border-color: #de9f9f;
  background: #fce9e9;
}

.list-tools {
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 0.45rem;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  backdrop-filter: blur(8px);
}

.list-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 0.45rem 0.55rem;
  background: color-mix(in srgb, var(--panel) 90%, transparent);
}

.list-pagination-left,
.list-pagination-right {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.list-pagination select {
  min-width: 76px;
  max-width: 92px;
  min-height: 34px;
  border-radius: 10px;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  color: var(--text-0);
  padding: 0.2rem 0.48rem;
}

.list-pagination .button {
  min-height: 34px;
  padding: 0.36rem 0.66rem;
}

.list-pagination .hint {
  white-space: nowrap;
}

.quick-actions {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.quick-actions .button {
  border-radius: 12px;
  justify-content: flex-start;
}

.chip-row {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.stock-categories-row {
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 0.35rem;
  padding-bottom: 0.12rem;
  scrollbar-width: none;
}

.stock-categories-row::-webkit-scrollbar {
  display: none;
}

.stock-categories-row .chip-btn {
  flex: 0 0 auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  min-height: 34px;
  padding: 0.3rem 0.5rem;
  color: var(--text-2);
  border-bottom: 2px solid transparent;
}

.stock-categories-row .chip-btn.is-active {
  background: transparent;
  color: var(--accent-ink);
  border-bottom-color: var(--accent);
}

.chip-btn {
  border: 1px solid var(--panel-border);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  color: var(--text-0);
  border-radius: 999px;
  padding: 0.4rem 0.72rem;
  min-height: 36px;
  font-size: 0.84rem;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.chip-btn:hover {
  transform: translateY(-1px);
}

.chip-btn.is-active {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  background: color-mix(in srgb, var(--accent) 27%, transparent);
}

.notifications-tools {
  display: grid;
  gap: 0.45rem;
}

#notifications-filters .chip-btn {
  min-height: 34px;
  padding: 0.34rem 0.64rem;
}

.notifications-snooze-row {
  gap: 0.45rem;
}

.notifications-bulk-row {
  gap: 0.45rem;
}

.notifications-bulk-row .button {
  min-height: 34px;
}

.notifications-bulk-row .button.is-active {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  background: color-mix(in srgb, var(--accent) 27%, transparent);
}

.label-inline {
  margin: 0;
  white-space: nowrap;
}

#notifications-snooze-duration {
  width: auto;
  min-width: 7.2rem;
}

#notifications-meta {
  min-height: 1.2em;
}

.ops-quick-nav {
  position: sticky;
  top: 0.55rem;
  z-index: 35;
  display: flex;
  gap: 0.45rem;
  padding: 0.45rem;
  border-radius: 12px;
  border: 1px solid var(--panel-border);
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  backdrop-filter: blur(10px);
  overflow-x: auto;
  scrollbar-width: thin;
}

.ops-nav-btn {
  flex: 0 0 auto;
  border: 1px solid var(--panel-border);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  color: var(--text-0);
  border-radius: 999px;
  padding: 0.42rem 0.72rem;
  min-height: 36px;
  font-size: 0.84rem;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.ops-nav-btn:hover {
  transform: translateY(-1px);
}

.ops-nav-btn.is-active {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  background: color-mix(in srgb, var(--accent) 27%, transparent);
}

#panel-ops {
  overflow-x: clip;
}

#panel-ops .form-grid,
#panel-ops .grid-2,
#panel-ops .row-inline,
#panel-ops .row-between {
  min-width: 0;
}

.ops-pane {
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  background: color-mix(in srgb, var(--panel) 86%, transparent);
}

.ops-pane > h4:first-child {
  margin-top: 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.stat {
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 0.75rem;
}

.stat-label {
  color: var(--text-1);
  font-size: 0.86rem;
}

.stat-value {
  margin-top: 0.25rem;
  font-weight: 650;
  font-size: 1.2rem;
}

.list {
  display: grid;
  gap: 0.6rem;
}

.list-item {
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 0.7rem 0.8rem;
}

.product-list-item {
  padding: 0;
  overflow: visible;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.product-list-item.is-selected {
  border-color: color-mix(in srgb, var(--accent) 36%, transparent);
}

.product-list-item.is-focused {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent);
}

.product-card-btn {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 0.55rem;
  border-radius: var(--radius-md);
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 0.75rem;
  align-items: stretch;
  cursor: pointer;
}

.product-card-btn:hover {
  background: color-mix(in srgb, var(--accent) 7%, transparent);
}

.product-card-btn:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent);
  outline-offset: 1px;
}

.product-thumb-wrap {
  width: 74px;
  height: 74px;
  border-radius: 12px;
  border: 1px solid var(--panel-border);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-thumb-fallback {
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--text-1);
}

.product-card-content {
  min-width: 0;
  display: grid;
  gap: 0.25rem;
}

.stock-structure-filters select {
  flex: 1 1 170px;
}

.stock-structure-filters .button.is-active {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  background: color-mix(in srgb, var(--accent) 27%, transparent);
}

#stock-filters-panel {
  border-top: 1px solid #e8edf3;
  padding-top: 0.55rem;
}

.stock-item-main {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 0.72rem;
  align-items: flex-start;
}

.inventory-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 86px 56px 104px 34px;
  grid-template-rows: auto auto;
  column-gap: 0.5rem;
  row-gap: 0.2rem;
  align-items: center;
}

.inventory-row .stock-thumb-wrap {
  width: 56px;
  height: 56px;
}

.inventory-main {
  min-width: 0;
  grid-column: 2;
  grid-row: 1 / span 2;
  display: grid;
  gap: 0.16rem;
}

.inventory-title {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.inventory-title-btn {
  appearance: none;
  border: 0;
  padding: 0;
  text-align: left;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.inventory-title-btn:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 62%, white 38%);
  outline-offset: 2px;
  border-radius: 6px;
}

.inventory-brand {
  color: var(--text-2);
  min-height: 1.02em;
}

.inventory-location-line {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.inventory-desktop-shell {
  display: block;
}

.inventory-desktop-sidebar,
.inventory-desktop-table-head {
  display: none;
}

.inventory-page-head {
  display: grid;
  gap: 0.6rem;
}

.inventory-page-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.inventory-category-col,
.inventory-place-col {
  display: none;
}

.expiry-desktop-shell {
  display: none;
}

.notifications-legacy {
  display: block;
}

.inventory-location-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.14rem 0.52rem;
  border: 1px solid #f0d8a2;
  background: #fff7e8;
  color: #b26a00;
  font-size: 0.8rem;
  font-weight: 600;
}

.inventory-location-meta {
  color: var(--text-2);
  font-size: 0.82rem;
}

.inventory-expiry,
.inventory-qty {
  min-width: 0;
  text-align: right;
}

.inventory-expiry {
  grid-column: 3;
  grid-row: 1 / span 2;
  display: grid;
  align-content: center;
  gap: 0.08rem;
}

.inventory-expiry-date {
  margin: 0;
  font-weight: 600;
  font-size: 0.96rem;
  line-height: 1.1;
}

.inventory-expiry-relative {
  color: var(--text-2);
  font-size: 0.8rem;
}

.inventory-expiry.expiry-danger .inventory-expiry-date {
  color: #e24343;
}

.inventory-expiry.expiry-warn .inventory-expiry-date {
  color: #e48a00;
}

.inventory-expiry.expiry-ok .inventory-expiry-date {
  color: #188647;
}

.inventory-expiry.expiry-none .inventory-expiry-date,
.inventory-expiry.expiry-none .inventory-expiry-relative {
  color: var(--text-3);
}

.inventory-qty {
  grid-column: 4;
  grid-row: 1 / span 2;
  display: grid;
  align-content: center;
  justify-items: end;
  gap: 0.08rem;
}

.inventory-qty-value {
  margin: 0;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.1;
}

.inventory-qty-unit {
  color: var(--text-2);
  font-size: 0.8rem;
}

.inventory-quick {
  grid-column: 5;
  grid-row: 1 / span 2;
  display: inline-grid;
  grid-template-columns: 28px auto 28px;
  align-items: center;
  gap: 0.18rem;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  padding: 0.2rem 0.28rem;
  min-height: 34px;
  justify-self: end;
}

.inventory-quick-btn {
  border: 0;
  background: transparent;
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  cursor: pointer;
}

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

.inventory-quick-btn:focus-visible,
.item-menu-trigger:focus-visible,
.cart-check-row input[type='checkbox']:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 72%, #ffffff 28%);
  outline-offset: 1px;
}

.inventory-quick-btn:disabled {
  opacity: 0.45;
  cursor: wait;
}

.inventory-quick-value {
  min-width: 1.5rem;
  text-align: center;
  font-weight: 700;
  color: var(--accent-ink);
  font-size: 1rem;
}

.item-menu {
  position: relative;
}

.inventory-row > .item-menu {
  grid-column: 6;
  grid-row: 1 / span 2;
  align-self: center;
}

.item-menu-trigger {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  background: #fff;
  color: var(--text-2);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  user-select: none;
}

.item-menu-trigger::-webkit-details-marker {
  display: none;
}

.item-menu[open] .item-menu-trigger {
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  color: var(--accent-ink);
}

.item-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.3rem);
  min-width: 178px;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(14, 25, 38, 0.12);
  padding: 0.3rem;
  display: grid;
  gap: 0.22rem;
  z-index: 22;
}

.item-menu-btn {
  border: 0;
  border-radius: 10px;
  background: transparent;
  padding: 0.48rem 0.56rem;
  text-align: left;
  font-size: 0.88rem;
  color: var(--text-1);
  cursor: pointer;
}

.item-menu-btn:hover {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.item-menu-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.product-item-menu {
  margin: 0.66rem 0.62rem 0 0;
}

.stock-list-item {
  transition: background-color 220ms ease, box-shadow 220ms ease;
}

.stock-list-item.is-busy {
  opacity: 0.74;
}

.stock-list-item.is-busy .item-menu-trigger[aria-disabled='true'] {
  pointer-events: none;
}

.stock-list-item.row-flash-success {
  background: color-mix(in srgb, #33c17a 16%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #33c17a 34%, transparent);
}

.stock-list-item.row-flash-error {
  background: color-mix(in srgb, #e24343 14%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #e24343 32%, transparent);
}

@media (max-width: 760px) {
  .inventory-row {
    grid-template-columns: 56px minmax(0, 1fr) auto;
    grid-template-rows: auto auto auto auto;
    align-items: start;
  }

  .inventory-main {
    grid-row: 1 / span 4;
    align-self: start;
  }

  .inventory-expiry {
    grid-column: 3;
    grid-row: 1;
  }

  .inventory-qty {
    grid-column: 3;
    grid-row: 2;
  }

  .inventory-quick {
    grid-column: 3;
    grid-row: 3;
  }

  .inventory-row > .item-menu {
    grid-column: 3;
    grid-row: 4;
    justify-self: end;
  }

  .item-menu-panel {
    right: 0;
  }

  .cart-filters-row {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .cart-sort-wrap {
    width: 100%;
    justify-content: space-between;
  }

  .cart-sort-wrap select {
    flex: 1 1 auto;
    min-width: 0;
  }

  .cart-row-main {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .cart-row-side {
    justify-content: space-between;
    width: 100%;
  }

  .cart-page-title {
    font-size: 1.42rem;
  }
}

@media (max-width: 979px) {
  .desktop-pagination {
    display: none !important;
  }
}

.stock-item-content {
  min-width: 0;
  display: grid;
  gap: 0.22rem;
}

.stock-thumb-wrap {
  width: 62px;
  height: 62px;
  border-radius: 11px;
  border: 1px solid var(--panel-border);
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.stock-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.stock-thumb-open-btn {
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  margin: 0;
  border-radius: inherit;
  overflow: hidden;
  background: transparent;
  cursor: pointer;
}

.inventory-image-modal-card {
  width: min(92vw, 720px);
}

.inventory-image-modal-body {
  margin-top: 0.7rem;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.inventory-image-modal-img {
  display: block;
  width: 100%;
  max-height: min(72vh, 760px);
  object-fit: contain;
}

.stock-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: color-mix(in srgb, #0a111c 52%, transparent);
  backdrop-filter: blur(3px);
}

.stock-modal-card {
  width: min(420px, 100%);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--panel) 95%, transparent);
  padding: 0.9rem;
  display: grid;
  gap: 0.35rem;
}

.inventory-product-modal-card {
  width: min(760px, 100%);
  max-height: min(86dvh, 760px);
  overflow: hidden;
}

.inventory-product-modal-body {
  overflow: auto;
  display: grid;
  gap: 0.6rem;
  padding-right: 0.1rem;
}

.inventory-info-block {
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 0.62rem;
  display: grid;
  gap: 0.35rem;
  background: color-mix(in srgb, var(--panel) 90%, transparent);
}

.inventory-info-list {
  display: grid;
  gap: 0.35rem;
}

.inventory-info-row {
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 0.45rem 0.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem;
  align-items: center;
}

.inventory-info-main {
  min-width: 0;
  display: grid;
  gap: 0.18rem;
}

.inventory-info-side {
  text-align: right;
  display: grid;
  gap: 0.08rem;
}

.inventory-info-name {
  font-weight: 620;
  line-height: 1.2;
}

.inventory-info-qty {
  font-weight: 650;
  line-height: 1.2;
}

.stock-qty-stepper {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  gap: 0.45rem;
  align-items: center;
}

.stock-qty-stepper .button {
  min-height: 42px;
  padding: 0;
  justify-content: center;
}

.stock-qty-stepper input[readonly] {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: color-mix(in srgb, var(--panel) 72%, transparent);
}

.stock-expiry-quick-presets .button {
  min-width: 68px;
  justify-content: center;
}

.product-card-content .list-item-head {
  align-items: flex-start;
}

.product-title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 650;
}

.list-item h4 {
  margin: 0 0 0.25rem;
  font-size: 0.98rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.list-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}

.list-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.alert-item {
  display: grid;
  gap: 0.35rem;
}

.alert-item.unread {
  border-color: color-mix(in srgb, var(--accent) 42%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.alert-item.is-selected {
  border-color: color-mix(in srgb, var(--accent) 58%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent);
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.23rem 0.62rem;
  font-size: 0.8rem;
}

.badge.warn {
  background: color-mix(in srgb, var(--warning) 22%, transparent);
  color: var(--warning);
}

.badge.danger {
  background: color-mix(in srgb, var(--danger) 22%, transparent);
  color: var(--danger);
}

.badge.ok {
  background: color-mix(in srgb, var(--success) 22%, transparent);
  color: var(--success);
}

.row-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

#movements-filter-form .row-inline .button {
  min-width: 0;
}

.row-inline input[type='text'],
.row-inline input[type='search'],
.row-inline input[type='email'],
.row-inline input[type='url'] {
  flex: 1 1 220px;
}

.row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}

.manage-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.manage-switch .button {
  border-radius: 12px;
}

.manage-switch .button.is-active {
  background: color-mix(in srgb, var(--accent) 30%, transparent);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
}

.space-item-main {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 0.75rem;
  align-items: flex-start;
}

.space-thumb-wrap {
  width: 58px;
  height: 58px;
  border-radius: 11px;
  border: 1px solid var(--panel-border);
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--text-1);
}

.space-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.space-item-content {
  min-width: 0;
  display: grid;
  gap: 0.25rem;
}

.cart-item {
  padding: 0.6rem 0.7rem;
}

.cart-check-row {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 0.6rem;
  align-items: flex-start;
  cursor: pointer;
}

.cart-check-row input[type='checkbox'] {
  width: 20px;
  height: 20px;
  min-height: 20px;
  margin-top: 0.2rem;
  accent-color: var(--accent);
}

.cart-check-body {
  min-width: 0;
  display: grid;
  gap: 0.22rem;
}

.cart-title {
  font-weight: 650;
  line-height: 1.2;
}

.cart-item-done .cart-title {
  text-decoration: line-through;
  opacity: 0.75;
}

.cart-item.row-flash-success {
  animation: rowFlashSuccess 640ms ease;
}

.cart-item.row-flash-error {
  animation: rowFlashError 640ms ease;
}

.cart-tools {
  align-items: center;
  gap: 0.45rem;
}

.cart-tools select {
  min-width: 11.5rem;
}

[data-density='compact'] .cart-tools select {
  min-width: 10.25rem;
}

.badge.info {
  background: #eaf3ff;
  border-color: #cfe1ff;
  color: #2370dc;
}

.cart-desktop-shell {
  display: block;
}

.cart-desktop-sidebar,
.cart-desktop-rail {
  display: none;
}

.cart-desktop-main {
  display: grid;
  gap: 0.8rem;
}

.cart-page-head {
  display: grid;
  gap: 0.7rem;
}

.cart-page-title-wrap {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 0.7rem;
  align-items: center;
}

.cart-page-title-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1px solid #d6e9da;
  background: #edf9f0;
  color: #26974f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cart-page-title {
  font-size: 1.65rem;
  letter-spacing: -0.02em;
}

.cart-view-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  border-bottom: 1px solid #e7edf4;
  padding-bottom: 0.55rem;
}

.cart-view-tabs .chip-btn {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #667387;
  padding: 0.52rem 1rem 0.62rem;
  font-weight: 560;
}

.cart-view-tabs .chip-btn.is-active {
  color: #228f4c;
  border-bottom: 3px solid #2aa758;
  font-weight: 650;
}

.cart-current-card {
  border: 1px solid #e6ecf4;
  border-radius: 18px;
  background: #fff;
  padding: 1rem;
  display: grid;
  gap: 0.72rem;
}

.cart-quick-add-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.46rem;
  align-items: center;
}

.cart-quick-add-field {
  position: relative;
  min-width: 0;
}

.cart-quick-add-form input[type='search'] {
  min-height: 48px;
  border-radius: 12px;
}

.cart-quick-add-suggestions {
  position: absolute;
  top: calc(100% + 0.38rem);
  left: 0;
  right: 0;
  z-index: 40;
  border: 1px solid #dbe5ef;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 16px 28px rgba(16, 24, 40, 0.14);
  overflow: hidden;
  max-height: 16.5rem;
  overflow-y: auto;
}

.cart-quick-add-suggestion {
  width: 100%;
  border: 0;
  border-top: 1px solid #eef2f7;
  background: transparent;
  text-align: left;
  padding: 0.62rem 0.75rem;
  display: grid;
  gap: 0.16rem;
  cursor: pointer;
}

.cart-quick-add-suggestion:first-child {
  border-top: 0;
}

.cart-quick-add-suggestion:hover,
.cart-quick-add-suggestion.is-active {
  background: #eef9f1;
}

.cart-quick-add-suggestion-name {
  font-weight: 620;
  color: #11233a;
}

.cart-quick-add-suggestion-meta {
  font-size: 0.84rem;
  color: #6b7890;
}

.cart-quick-add-suggestion-flags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.28rem;
}

.cart-quick-add-suggestion-flag {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  border-radius: 999px;
  padding: 0 0.45rem;
  font-size: 0.73rem;
  font-weight: 620;
  color: #2f4967;
  background: #edf3fb;
}

.cart-quick-add-suggestion-flag.is-in-list {
  color: #16653a;
  background: #e6f7ec;
}

.cart-quick-add-form .button {
  min-height: 48px;
  min-width: 48px;
  border-radius: 12px;
  padding: 0;
  justify-content: center;
}

[data-theme='dark'] .cart-quick-add-suggestions {
  border-color: #27425f;
  background: #13253a;
  box-shadow: 0 16px 28px rgba(2, 8, 20, 0.55);
}

[data-theme='dark'] .cart-quick-add-suggestion {
  border-top-color: #243a55;
}

[data-theme='dark'] .cart-quick-add-suggestion:hover,
[data-theme='dark'] .cart-quick-add-suggestion.is-active {
  background: #1b334d;
}

[data-theme='dark'] .cart-quick-add-suggestion-name {
  color: #e8f1ff;
}

[data-theme='dark'] .cart-quick-add-suggestion-meta {
  color: #a7b6cd;
}

[data-theme='dark'] .cart-quick-add-suggestion-flag {
  color: #c2d3ea;
  background: #1d3752;
}

[data-theme='dark'] .cart-quick-add-suggestion-flag.is-in-list {
  color: #8ee6b2;
  background: #19402f;
}

.cart-filters-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.7rem;
  align-items: center;
}

.cart-status-chips {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.cart-status-chips .chip-btn {
  min-height: 42px;
  border-radius: 999px;
  padding-inline: 0.88rem;
}

.cart-sort-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.56rem;
  padding-left: 0.56rem;
  border-left: 1px solid #e8eef5;
}

.cart-sort-wrap .hint {
  white-space: nowrap;
}

.cart-sort-wrap select {
  min-width: 16rem;
  min-height: 42px;
  border-radius: 12px;
}

.cart-list-footer-actions {
  justify-content: flex-start;
}

.cart-search-hidden,
.cart-hide-checked-hidden {
  display: none !important;
}

.cart-groups-list {
  display: grid;
  gap: 0.72rem;
}

.cart-group-card {
  border: 1px solid #e6edf5;
  border-radius: 16px;
  background: #fff;
  overflow: visible;
  position: relative;
  isolation: isolate;
  z-index: 0;
}

.cart-group-card.menu-open {
  z-index: 40;
}

.cart-group-head {
  width: 100%;
  border: 0;
  background: #fbfcfe;
  border-bottom: 1px solid #edf2f8;
  padding: 0.78rem 0.92rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  cursor: pointer;
}

.cart-group-head-main {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.cart-group-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  padding: 0.38rem 0.74rem 0.48rem;
  border-bottom: 1px solid #edf2f8;
  background: #fbfcfe;
}

.cart-group-tool-btn {
  min-height: 32px;
  padding: 0.22rem 0.66rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 560;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.cart-group-tool-btn .icon-sm {
  width: 0.88rem;
  height: 0.88rem;
}

.cart-group-tool-btn:disabled {
  opacity: 0.52;
}

.cart-group-icon {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  background: #eef6f0;
  color: #24954d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cart-group-title {
  font-weight: 650;
}

.cart-group-count {
  min-width: 1.8rem;
  min-height: 1.55rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eff5ff;
  color: #376fbf;
  font-weight: 650;
  font-size: 0.84rem;
  padding: 0 0.35rem;
}

.cart-group-caret {
  width: 0.54rem;
  height: 0.54rem;
  border-right: 1.8px solid #627287;
  border-bottom: 1.8px solid #627287;
  transform: rotate(45deg);
  transition: transform 140ms ease;
}

.cart-group-caret.is-collapsed {
  transform: rotate(-45deg);
}

.cart-group-body {
  display: grid;
  overflow: visible;
}

.cart-group-card .item-menu-panel {
  z-index: 60;
}

#panel-cart .cart-group-card .list-item {
  overflow: visible;
  position: relative;
  z-index: 1;
}

#panel-cart .cart-group-card .list-item.menu-open {
  z-index: 90;
}

#panel-cart .cart-group-card .list-item .item-menu[open] {
  z-index: 80;
}

.cart-row-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: center;
}

.cart-row-side {
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  justify-content: flex-end;
}

.cart-brand-line {
  min-height: 1.05em;
}

.cart-qty-text {
  color: var(--text-2);
  font-size: 0.85rem;
  white-space: nowrap;
}

.cart-qty-quick {
  display: inline-grid;
  grid-template-columns: 28px auto 28px;
  align-items: center;
  gap: 0.15rem;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  padding: 0.15rem 0.22rem;
  min-height: 32px;
}

.cart-qty-btn {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--accent-ink);
  font-size: 1.06rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.cart-qty-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.cart-qty-quick-value {
  min-width: 1.35rem;
  text-align: center;
  font-weight: 700;
  color: var(--accent-ink);
  font-size: 0.95rem;
}

.cart-rail-summary {
  display: grid;
  gap: 0.42rem;
}

.cart-rail-row,
.cart-rail-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 34px;
  gap: 0.5rem;
}

.cart-rail-total {
  border-top: 1px solid #e8eef4;
  padding-top: 0.7rem;
}

.cart-categories-list {
  display: grid;
  gap: 0.45rem;
}

.cart-category-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 30px;
}

.cart-category-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.cart-category-icon {
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef4f9;
  color: #4a5f76;
}

.cart-rail-highlight {
  background: #f3faf5;
  border-color: #dbeee0;
}

.cart-rail-link-btn {
  border: 0;
  padding-left: 0;
  justify-content: flex-start;
  color: #1d924d;
  font-weight: 620;
  background: transparent;
}

.cart-rail-link-btn [data-dashboard-icon='back'] .icon-sm {
  transform: rotate(180deg);
}

[data-density='compact'] .card {
  padding: 0.8rem;
}

[data-density='compact'] .list {
  gap: 0.45rem;
}

[data-density='compact'] .list-item {
  padding: 0.56rem 0.62rem;
}

[data-density='compact'] .ops-pane {
  padding: 0.7rem;
}

[data-density='compact'] .list-item h4,
[data-density='compact'] .product-title {
  font-size: 0.93rem;
}

[data-density='compact'] .hint,
[data-density='compact'] .badge {
  font-size: 0.8rem;
}

[data-density='compact'] .product-card-btn {
  grid-template-columns: 62px 1fr;
  gap: 0.58rem;
  padding: 0.45rem;
}

[data-density='compact'] .product-thumb-wrap {
  width: 62px;
  height: 62px;
  border-radius: 10px;
}

[data-density='compact'] .stock-item-main {
  grid-template-columns: 54px 1fr;
  gap: 0.56rem;
}

[data-density='compact'] .stock-thumb-wrap {
  width: 54px;
  height: 54px;
}

[data-density='compact'] .meta-line {
  gap: 0.28rem;
}

.m0 {
  margin: 0;
}

.mb-04 {
  margin-bottom: 0.4rem;
}

.mt-06 {
  margin-top: 0.6rem;
}

.mt-08 {
  margin-top: 0.8rem;
}

.mt-10 {
  margin-top: 1rem;
}

.sep {
  margin: 1rem 0;
  border: 0;
  border-top: 1px solid var(--panel-border);
}

.scan-panel {
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 0.6rem;
  display: grid;
  gap: 0.5rem;
  background: color-mix(in srgb, var(--accent) 6%, transparent);
  position: relative;
  overflow: hidden;
}

.scan-panel video {
  width: 100%;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: #0c121b;
}

.restock-camera-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 6;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--panel-border));
  background: #0a111c;
}

.restock-camera-frame video {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  border-radius: 0;
}

.restock-camera-guide {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: grid;
  place-items: center;
}

.restock-camera-guide::before {
  content: "";
  width: min(84%, 460px);
  height: 44%;
  border-radius: 8px;
  border: 2px solid rgba(210, 236, 255, 0.9);
  box-shadow: 0 0 0 9999px rgba(4, 10, 18, 0.36);
}

.restock-camera-guide-label {
  position: absolute;
  bottom: 0.48rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.78rem;
  color: #f4f8ff;
  background: rgba(8, 18, 30, 0.68);
  border: 1px solid rgba(210, 236, 255, 0.36);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  white-space: nowrap;
}

.scan-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 180ms ease;
  border-radius: inherit;
}

.scan-panel.scan-success::after {
  opacity: 1;
  background: color-mix(in srgb, #36d997 34%, transparent);
}

.scan-panel.scan-error::after {
  opacity: 1;
  background: color-mix(in srgb, #ff6a6a 30%, transparent);
}

.scan-panel-hint {
  padding: 0 0.15rem 0.1rem;
}

.restock-fs-overlay {
  display: grid;
  gap: 0.5rem;
  padding: 0.15rem 0 0;
}

.restock-fs-overlay select,
.restock-fs-overlay input,
.restock-fs-overlay .button,
.restock-fs-overlay p {
  pointer-events: auto;
}

.restock-fs-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
  align-items: stretch;
}

.restock-fs-top select,
.restock-fs-top input {
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  color: var(--text-0);
  border-color: var(--panel-border);
}

.restock-fs-bottom {
  display: grid;
  gap: 0.45rem;
}

.restock-expiry-panel {
  display: grid;
  gap: 0.4rem;
  padding: 0.5rem;
  border-radius: 12px;
  border: 1px solid var(--panel-border);
  background: color-mix(in srgb, var(--panel) 92%, transparent);
}

.restock-expiry-panel.is-busy {
  opacity: 0.86;
}

.restock-expiry-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.4rem;
}

.restock-expiry-grid input {
  min-width: 0;
}

.restock-expiry-grid .button {
  min-height: 40px;
}

.restock-expiry-panel .row-inline {
  justify-content: flex-end;
  gap: 0.4rem;
}

.restock-expiry-candidates {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
}

.restock-expiry-candidate-btn {
  min-height: 34px;
  padding: 0.26rem 0.56rem;
  border-radius: 999px;
}

.restock-expiry-candidate-btn.is-active {
  border-color: color-mix(in srgb, var(--accent) 56%, var(--panel-border));
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent-ink);
}

.restock-fs-bottom .restock-expiry-panel .row-inline {
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
}

.restock-fs-feedback {
  margin: 0;
  text-align: center;
  padding: 0.34rem 0.55rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 650;
  font-size: 0.84rem;
}

.restock-fs-feedback.is-success {
  color: #dafbe9;
  border-color: rgba(136, 249, 196, 0.5);
  background: rgba(17, 74, 45, 0.66);
}

.restock-fs-feedback.is-error {
  color: #ffe3e3;
  border-color: rgba(255, 160, 160, 0.5);
  background: rgba(105, 25, 25, 0.66);
}

.restock-fs-session-meta {
  text-align: center;
  padding: 0.1rem 0.2rem;
}

.restock-fs-bottom .row-inline {
  justify-content: center;
  gap: 0.42rem;
  flex-wrap: wrap;
}

.restock-fs-bottom .button {
  min-height: 42px;
  border-color: var(--panel-border);
  background: color-mix(in srgb, var(--panel) 86%, transparent);
  color: var(--text-0);
}

.restock-fs-bottom .button.button-danger {
  background: color-mix(in srgb, var(--danger) 16%, transparent);
  border-color: color-mix(in srgb, var(--danger) 42%, transparent);
  color: color-mix(in srgb, var(--danger) 70%, #ffffff 30%);
}

#restock-fs-torch-btn.is-active {
  border-color: color-mix(in srgb, var(--accent) 52%, var(--panel-border));
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--accent-ink);
}

#restock-fs-last-barcode {
  text-align: center;
  padding: 0.3rem 0.5rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 11%, transparent);
  color: var(--text-0);
}

.restock-page-card .scan-panel video {
  max-height: none;
}

body.restock-page-mode .topbar,
body.restock-page-mode #action-toast,
body.restock-page-mode #main-nav,
body.restock-page-mode #app-area > article:not(#panel-restock-scan) {
  display: none !important;
}

body.restock-page-mode .app-shell {
  width: min(900px, 100%);
  max-width: none;
  padding: 0.5rem 0.45rem 0.6rem;
}

body.restock-page-mode #app-area {
  margin-top: 0;
  gap: 0;
}

body.restock-page-mode #panel-restock-scan {
  display: block !important;
  border-radius: 16px;
  min-height: calc(100dvh - 1rem);
}

body.restock-page-mode #panel-restock-scan .form-grid.mt-08 {
  display: flex;
  flex-direction: column;
}

body.restock-page-mode #panel-restock-scan .form-grid.mt-08 > .label,
body.restock-page-mode #panel-restock-scan .form-grid.mt-08 > #restock-space-id,
body.restock-page-mode #panel-restock-scan .form-grid.mt-08 > .grid-2 {
  display: none !important;
}

body.restock-page-mode #panel-restock-scan #restock-scan-panel {
  order: -1;
}

body.restock-page-mode #panel-restock-scan .restock-fs-bottom .row-inline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

body.restock-page-mode #panel-restock-scan .restock-expiry-panel .row-inline {
  display: flex;
}

body.restock-page-mode #panel-restock-scan .restock-expiry-panel .row-inline .button {
  width: auto;
}

body.restock-page-mode #panel-restock-scan .restock-fs-bottom .row-inline .button {
  width: 100%;
  justify-content: center;
}

body.restock-page-mode #panel-restock-scan .scan-panel-hint {
  display: block !important;
}

@media (max-width: 680px) {
  body.restock-page-mode .app-shell {
    padding: 0;
  }

  body.restock-page-mode #panel-restock-scan {
    border-radius: 0;
    min-height: 100dvh;
    border: 0;
    box-shadow: none;
  }

  body.restock-page-mode .restock-page-card .scan-panel video {
    max-height: none;
  }
}

body.restock-scanner-mode {
  overflow: hidden;
  background: #000;
}

body.restock-scanner-mode #restock-scan-panel {
  position: fixed;
  inset: 0;
  z-index: 240;
  display: block !important;
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: #000;
  overflow: hidden;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.restock-scanner-mode #restock-scan-panel video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  border-radius: 0;
  object-fit: cover;
  background: #000;
}

body.restock-scanner-mode .scan-panel-hint {
  display: none !important;
}

.restock-session {
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 0.62rem;
  background: color-mix(in srgb, var(--panel) 82%, transparent);
}

#restock-last-barcode[readonly] {
  background: color-mix(in srgb, var(--panel) 65%, transparent);
  color: var(--text-1);
}

.restock-list-item {
  padding: 0.62rem 0.7rem;
}

.restock-manual {
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 0.62rem;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.restock-summary {
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 0.62rem;
  background: color-mix(in srgb, var(--success) 12%, transparent);
}

.photo-preview {
  width: 100%;
  max-width: 320px;
  max-height: 220px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--panel-border);
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88rem;
}

.bottom-nav {
  position: fixed;
  left: 0.45rem;
  right: 0.45rem;
  bottom: 0.55rem;
  padding: 0.44rem;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.4rem;
  z-index: 50;
  overflow: visible;
}

.bottom-nav .tab-btn {
  border-radius: 12px;
  min-height: 46px;
  padding-inline: 0.4rem;
}

.tab-btn-icon .tab-btn-inner {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  font-size: 0.75rem;
  line-height: 1.1;
}

.tab-btn-icon .icon {
  width: 1.05rem;
  height: 1.05rem;
}

.tab-btn.is-active {
  background: color-mix(in srgb, var(--accent) 30%, transparent);
}

@media (max-width: 680px) {
  .grid-2,
  .compact-search {
    grid-template-columns: 1fr;
  }

  .quick-actions {
    grid-template-columns: 1fr;
  }

  .list-tools {
    position: sticky;
    top: 0.35rem;
    z-index: 30;
  }

  .row-between {
    flex-wrap: wrap;
  }

  .ops-quick-nav {
    top: 0.35rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow-x: visible;
  }

  .ops-nav-btn {
    width: 100%;
    padding: 0.36rem 0.56rem;
    min-height: 34px;
    font-size: 0.8rem;
  }

  .ops-nav-btn .button-inline {
    justify-content: center;
    width: 100%;
    gap: 0.28rem;
  }

  .ops-nav-btn .button-inline span:last-child {
    white-space: nowrap;
  }

  .stock-structure-filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }

  .stock-structure-filters .button {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: center;
  }

  .cart-tools {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }

  .cart-tools input[type='search'] {
    grid-column: 1 / -1;
  }

  .cart-tools select {
    min-width: 0;
  }

  .cart-tools label {
    justify-content: flex-start;
  }

  .cart-tools .button {
    width: 100%;
    justify-content: center;
  }

  #panel-cart,
  #panel-cart .cart-desktop-shell,
  #panel-cart .cart-desktop-main,
  #panel-cart .cart-current-card,
  #panel-cart .cart-filters-row,
  #panel-cart .cart-quick-add-form {
    min-width: 0;
    max-width: 100%;
  }

  #panel-cart .cart-page-head {
    min-width: 0;
  }

  #panel-cart .cart-page-head .inventory-page-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 46px 46px;
    width: 100%;
    min-width: 0;
    align-items: stretch;
  }

  #panel-cart .cart-page-head .inventory-page-actions .dashboard-hero-add-btn {
    min-width: 0;
    padding-inline: 0.7rem;
  }

  #panel-cart .cart-page-head .inventory-page-actions .dashboard-hero-icon-btn {
    width: 46px;
    min-width: 46px;
  }

  #panel-cart .cart-view-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
    min-width: 0;
    padding-bottom: 0.35rem;
    scrollbar-width: none;
  }

  #panel-cart .cart-view-tabs::-webkit-scrollbar {
    display: none;
  }

  #panel-cart .cart-view-tabs .chip-btn {
    flex: 0 0 auto;
    white-space: nowrap;
    padding-inline: 0.72rem;
  }

  #panel-cart .cart-current-card > .row-between {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    min-width: 0;
  }

  #panel-cart .cart-current-card > .row-between > .row-inline {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    width: 100%;
    min-width: 0;
    align-items: center;
  }

  #panel-cart #cart-current-status {
    justify-self: start;
    max-width: 100%;
  }

  #panel-cart .cart-quick-add-form {
    grid-template-columns: minmax(0, 1fr) 48px 48px;
    width: 100%;
  }

  #panel-cart .cart-quick-add-field,
  #panel-cart .cart-quick-add-form input[type='search'] {
    min-width: 0;
  }

  #panel-cart .cart-filters-row {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  #panel-cart .cart-status-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
    scrollbar-width: none;
  }

  #panel-cart .cart-status-chips::-webkit-scrollbar {
    display: none;
  }

  #panel-cart .cart-status-chips .chip-btn {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  #panel-cart .cart-sort-wrap {
    width: 100%;
    min-width: 0;
    padding-left: 0;
    border-left: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
  }

  #panel-cart .cart-sort-wrap select {
    width: 100%;
    min-width: 0;
  }

  #panel-cart #cart-filters-reset-btn {
    width: 100%;
    justify-content: center;
  }

  #movements-filter-form .row-inline {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }

  #movements-filter-form .row-inline .button {
    width: 100%;
    justify-content: center;
  }

  #movements-filter-form .row-inline .button:last-child {
    grid-column: 1 / -1;
  }

  #stock-create-section .row-inline .button {
    flex: 1 1 calc(50% - 0.5rem);
    justify-content: center;
  }

  .restock-fs-top {
    grid-template-columns: 1fr;
  }

  .restock-fs-bottom .row-inline {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }

  .restock-fs-bottom .row-inline .button {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 430px) {
  .app-shell {
    padding: 0.75rem 0.6rem 6rem;
  }

  .card {
    padding: 0.8rem;
  }

  [data-density='compact'] .card {
    padding: 0.68rem;
  }

  .ops-quick-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem;
    padding: 0.35rem;
  }

  #movements-filter-form .row-inline {
    grid-template-columns: 1fr;
  }

  #movements-filter-form .row-inline .button:last-child {
    grid-column: auto;
  }

  #stock-create-section .row-inline .button {
    flex-basis: 100%;
  }

  .restock-fs-top {
    grid-template-columns: 1fr;
  }

  .stock-structure-filters {
    grid-template-columns: 1fr;
  }

  .inventory-toolbar .button {
    padding-inline: 0.42rem;
    font-size: 0.82rem;
  }

  .inventory-toolbar {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }

  .inventory-toolbar input[type='search'] {
    grid-column: 1 / -1;
  }

  .inventory-toolbar .button {
    width: 100%;
    justify-content: center;
  }

  .inventory-row {
    grid-template-columns: 52px minmax(0, 1fr) 98px;
    column-gap: 0.4rem;
  }

  .inventory-row .stock-thumb-wrap {
    width: 52px;
    height: 52px;
  }

  .inventory-expiry-date {
    font-size: 0.88rem;
  }

  .inventory-expiry-relative,
  .inventory-qty-unit {
    font-size: 0.75rem;
  }

  .inventory-quick {
    grid-template-columns: 24px auto 24px;
    min-height: 30px;
    padding: 0.14rem 0.2rem;
    gap: 0.12rem;
  }

  .inventory-quick-btn {
    width: 24px;
    height: 24px;
    font-size: 1.05rem;
  }

  .inventory-quick-value {
    min-width: 1.2rem;
    font-size: 0.92rem;
  }

  .inventory-row > .item-menu .item-menu-trigger {
    width: 30px;
    height: 30px;
  }

  .stock-structure-filters .button {
    grid-column: auto;
  }

  .notifications-snooze-row {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .notifications-snooze-row #notifications-snooze-duration,
  .notifications-snooze-row .button {
    width: 100%;
  }

  .notifications-bulk-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }

  .notifications-bulk-row .button {
    width: 100%;
    justify-content: center;
  }

  #notifications-bulk-count {
    grid-column: 1 / -1;
  }

  #panel-cart .cart-quick-add-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #panel-cart .cart-quick-add-field {
    grid-column: 1 / -1;
  }

  #panel-cart .cart-quick-add-form .button {
    width: 100%;
  }

  #panel-cart .cart-current-card > .row-between > .row-inline {
    grid-template-columns: 1fr auto;
  }

  #panel-cart #cart-current-status,
  #panel-cart #cart-share-btn {
    grid-column: 1 / -1;
  }

  #panel-cart #cart-share-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (min-width: 820px) {
  .app-shell {
    padding: 1.2rem 1.1rem 2rem;
  }

  .stats {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .bottom-nav {
    position: static;
    width: 100%;
    max-width: none;
    margin: 0;
  }
}

/* iOS-like visual refresh */
:root {
  --bg-0: #f4f5f7;
  --bg-1: #fafbfc;
  --panel: #ffffff;
  --panel-border: #e5e9ef;
  --text-0: #1b2430;
  --text-1: #647083;
  --accent: #2ea963;
  --accent-2: #4cc87f;
  --danger: #e24848;
  --warning: #d58b22;
  --success: #2ea963;
  --shadow: 0 6px 18px rgba(22, 31, 44, 0.06);
}

[data-theme='dark'] {
  --bg-0: #15171c;
  --bg-1: #1b1f27;
  --panel: #20252f;
  --panel-border: #343c4a;
  --text-0: #e8f0fb;
  --text-1: #a8b0bf;
  --accent: #44bf79;
  --accent-2: #6dd79a;
  --danger: #ff7b7b;
  --warning: #efb765;
  --success: #5ac98b;
  --shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

body {
  background: radial-gradient(130% 100% at 0% -30%, #ffffff, #f4f6f9 56%, #f2f4f7 100%);
}

[data-theme='dark'] body {
  background: radial-gradient(130% 100% at 0% -30%, #222733, #171b23 56%, #12151c 100%);
}

[data-theme='dark'] .brand-mark {
  border-color: #2f455f;
  background: linear-gradient(180deg, #1f3045, #1a2a3c);
  color: #64d691;
}

[data-theme='dark'] .subtitle,
[data-theme='dark'] .hint {
  color: #9fb1c8;
}

[data-theme='dark'] #login-card,
[data-theme='dark'] #app-area > article,
[data-theme='dark'] .stock-modal-card {
  background: #1b2636;
  border-color: #2d3e53;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}

[data-theme='dark'] #app-area > article:first-child {
  background: linear-gradient(180deg, #1e2b3d, #1b2636);
}

[data-theme='dark'] input,
[data-theme='dark'] select,
[data-theme='dark'] textarea {
  background: #223246;
  color: #e8f0fb;
  border-color: #344b65;
}

[data-theme='dark'] input::placeholder,
[data-theme='dark'] textarea::placeholder {
  color: #8ea2ba;
}

[data-theme='dark'] #panel-stock .list,
[data-theme='dark'] #panel-products .list,
[data-theme='dark'] #panel-dashboard .list,
[data-theme='dark'] #panel-notifications .list,
[data-theme='dark'] #panel-cart .list {
  background: #1b2636;
  border-color: #2d3e53;
}

[data-theme='dark'] #panel-stock .list-item,
[data-theme='dark'] #panel-products .list-item,
[data-theme='dark'] #panel-dashboard .list-item,
[data-theme='dark'] #panel-notifications .list-item,
[data-theme='dark'] #panel-cart .list-item {
  border-top-color: #2a3a4f;
}

[data-theme='dark'] .inventory-list .inventory-row,
[data-theme='dark'] .stock-item,
[data-theme='dark'] .product-card-btn,
[data-theme='dark'] .cart-item {
  background: #1b2636;
}

[data-theme='dark'] #app-area,
[data-theme='dark'] #login-card,
[data-theme='dark'] .stock-modal-card {
  color: #e8f0fb;
}

[data-theme='dark'] .inventory-brand,
[data-theme='dark'] .product-brand,
[data-theme='dark'] .meta-line,
[data-theme='dark'] .stat-label {
  color: #9fb1c8;
}

[data-theme='dark'] .badge {
  background: #2b3443;
  border-color: #4b5a71;
  color: #e5eefb;
}

[data-theme='dark'] .inventory-location-badge {
  background: #3a3120;
  border-color: #7b6440;
  color: #ffd89a;
}

[data-theme='dark'] .inventory-toolbar,
[data-theme='dark'] .stock-structure-filters,
[data-theme='dark'] .compact-search,
[data-theme='dark'] .ops-quick-nav {
  background: #202f42;
  border-color: #334a63;
}

[data-theme='dark'] .button,
[data-theme='dark'] .button.button-quiet {
  border-color: #355577;
  color: #e8f0fb;
  background: color-mix(in srgb, #2f8cff 14%, transparent);
}

[data-theme='dark'] .button:hover {
  background: color-mix(in srgb, #2f8cff 22%, transparent);
}

[data-theme='dark'] .topbar-actions .button.icon-only {
  background: #2a313d;
  border-color: #475367;
  color: #eef4ff;
}

[data-theme='dark'] #manage-btn.icon-only {
  background: #2ea963;
  border-color: #2ea963;
  color: #fff;
}

[data-theme='dark'] .bottom-nav {
  background: rgba(22, 31, 44, 0.96);
  border-color: #2c3f56;
}

[data-theme='dark'] .bottom-nav .tab-btn {
  color: #9fb1c8;
}

[data-theme='dark'] .bottom-nav .tab-btn.is-active {
  color: #64d691;
}

.app-shell {
  width: min(470px, 100%);
  padding: 1rem 0.65rem 7.4rem;
}

.glass {
  backdrop-filter: none;
  box-shadow: var(--shadow);
}

.topbar {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0.4rem 0.2rem 0.55rem;
  position: relative;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 0.72rem;
}

.brand-logo-img {
  display: block;
  width: auto;
  height: clamp(38px, 7vw, 58px);
  max-width: min(68vw, 360px);
  object-fit: contain;
}

.brand-mark {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  border: 1px solid #dcefe3;
  background: linear-gradient(180deg, #eef9f2, #e8f4ec);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #2ea963;
}

.brand-mark svg {
  width: 27px;
  height: 27px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.title {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.subtitle {
  margin-top: 0.12rem;
  font-size: 1.03rem;
}

.topbar-actions {
  gap: 0.5rem;
}

.topbar-menu-panel {
  position: absolute;
  right: 0.75rem;
  top: 4.1rem;
  z-index: 30;
  min-width: 210px;
  border: 1px solid #dbe3ec;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(13, 26, 43, 0.16);
  padding: 0.35rem;
  display: grid;
  gap: 0.2rem;
}

[data-theme='dark'] .topbar-menu-panel {
  background: #252c37;
  border-color: #465266;
}

[data-theme='dark'] .topbar-menu-item {
  color: #e8f0fb;
}

[data-theme='dark'] .topbar-menu-item:active,
[data-theme='dark'] .topbar-menu-item:hover {
  background: #333d4c;
}

.topbar-menu-item {
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #1d2a39;
  text-align: left;
  padding: 0.68rem 0.72rem;
  min-height: 42px;
  font: inherit;
}

.topbar-menu-item:active,
.topbar-menu-item:hover {
  background: #f3f6fa;
}

.topbar-actions .button.icon-only {
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  border-radius: 999px;
  border-color: #dbe3ec;
  background: #fff;
  color: #1d2a39;
}

#manage-btn.icon-only {
  background: #2ea963;
  color: #fff;
  border-color: #2ea963;
}

#login-card,
#app-area > article {
  border-radius: 22px;
}

#app-area {
  gap: 0.78rem;
}

#app-area > article {
  background: #fff;
  border-color: #e6eaf0;
  box-shadow: 0 5px 14px rgba(16, 33, 54, 0.04);
}

#app-area > article:first-child {
  background: linear-gradient(180deg, #ffffff, #fbfcfd);
}

#panel-dashboard .stats {
  gap: 0.62rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#panel-dashboard .stat {
  border-radius: 18px;
  border: 1px solid #e7ebf1;
  padding: 0.84rem 0.9rem;
  background: #f8fafc;
}

#panel-dashboard .stats .stat:nth-child(1) {
  background: linear-gradient(145deg, #edf8f1, #f8fcf9);
  border-color: #dceede;
}

#panel-dashboard .stats .stat:nth-child(2) {
  background: linear-gradient(145deg, #fff7eb, #fffdf8);
  border-color: #f4e3c8;
}

#panel-dashboard .stats .stat:nth-child(3) {
  background: linear-gradient(145deg, #fff2f2, #fffafb);
  border-color: #f2d9d9;
}

#panel-dashboard .stats .stat:nth-child(4) {
  background: linear-gradient(145deg, #eff5ff, #f9fbff);
  border-color: #d9e6fb;
}

#panel-dashboard .stat .stat-value {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

#panel-dashboard .stat-reorder {
  border-radius: 16px;
  background: #f8fbff;
}

.quick-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.quick-actions .button {
  border-radius: 14px;
  justify-content: center;
  padding-inline: 0.4rem;
  font-size: 0.84rem;
  min-height: 40px;
}

#panel-stock .list,
#panel-products .list,
#panel-dashboard .list,
#panel-notifications .list,
#panel-cart .list {
  gap: 0;
  border: 1px solid #e8edf3;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}

/* Consente ai menu contestuali delle ultime righe di uscire dal contenitore lista. */
#panel-stock .list,
#panel-products .list {
  overflow: visible;
}

#panel-stock .list-item,
#panel-products .list-item,
#panel-dashboard .list-item,
#panel-notifications .list-item,
#panel-cart .list-item {
  border: 0;
  border-top: 1px solid #eef2f6;
  border-radius: 0;
}

#panel-stock .list-item:first-child,
#panel-products .list-item:first-child,
#panel-dashboard .list-item:first-child,
#panel-notifications .list-item:first-child,
#panel-cart .list-item:first-child {
  border-top: 0;
}

.product-card-btn {
  padding: 0.7rem 0.72rem;
  grid-template-columns: 56px 1fr;
  gap: 0.6rem;
  align-items: start;
}

.product-card-content {
  min-width: 0;
  overflow: hidden;
}

.product-thumb-wrap,
.stock-thumb-wrap,
.space-thumb-wrap {
  border-radius: 12px;
  background: #f3f6f9;
}

.product-thumb-wrap {
  width: 56px;
  height: 56px;
}

.stock-item-main {
  grid-template-columns: 56px 1fr;
  gap: 0.65rem;
}

.badge {
  border: 1px solid #e5e9ef;
  background: #f6f8fb;
}

.bottom-nav {
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.46rem 0.5rem calc(0.46rem + env(safe-area-inset-bottom, 0px));
  border-radius: 24px 24px 0 0;
  border: 1px solid #e5e9ef;
  border-bottom: 0;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 -8px 22px rgba(10, 20, 32, 0.08);
  gap: 0.2rem;
}

.bottom-nav .tab-btn {
  border: 0;
  background: transparent;
  min-height: 56px;
  min-width: 0;
  padding-inline: 0.18rem;
  color: #667383;
}

.bottom-nav .tab-btn .tab-btn-inner {
  gap: 0.18rem;
  width: 100%;
}

.bottom-nav .tab-btn .tab-btn-inner span:last-child {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bottom-nav .tab-btn.is-active {
  background: transparent;
  color: #2ea963;
}

.bottom-nav .tab-btn[data-tab='restock_scan'] .tab-btn-inner .icon {
  width: 1.38rem;
  height: 1.38rem;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  box-shadow: none;
}

.bottom-nav .tab-btn[data-tab='restock_scan'] {
  transform: translateY(-12px);
  min-height: 68px;
}

.bottom-nav .tab-btn[data-tab='restock_scan'] .tab-btn-inner {
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 999px;
  background: #2ea963;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  box-shadow: 0 8px 14px rgba(46, 169, 99, 0.35);
}

.bottom-nav .tab-btn[data-tab='restock_scan'] .tab-btn-inner span:last-child {
  display: none;
}

.bottom-nav .tab-btn[data-tab='restock_scan'].is-active .tab-btn-inner .icon {
  color: #fff;
}

.bottom-nav-scan-fab {
  position: absolute;
  right: 0.9rem;
  top: -4.05rem;
  transform: none;
  width: 3.3rem;
  min-width: 3.3rem;
  height: 3.3rem;
  min-height: 3.3rem;
  border-radius: 999px;
  border: 0;
  padding: 0;
  background: #2ea963;
  color: #fff;
  box-shadow: 0 10px 18px rgba(46, 169, 99, 0.38);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
}

.bottom-nav-scan-fab:hover {
  transform: translateY(-1px);
}

.bottom-nav-scan-fab .scan-fab-inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bottom-nav-scan-fab .icon {
  width: 1.38rem;
  height: 1.38rem;
  stroke-width: 2;
}

@media (max-width: 760px) {
  #topbar-menu-btn {
    display: inline-flex !important;
  }

  #density-btn,
  #theme-btn,
  #logout-btn,
  #manage-btn {
    display: none !important;
  }

  .quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 761px) {
  #topbar-menu-btn,
  .topbar-menu-panel {
    display: none !important;
  }
}

@media (min-width: 900px) {
  .app-shell {
    width: min(1040px, 100%);
    padding-bottom: 2rem;
  }

  .bottom-nav {
    position: static;
    width: 100%;
    max-width: none;
    margin: 0;
    border-radius: 22px;
    border-bottom: 1px solid #e5e9ef;
  }
}

@keyframes drop-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* Dark-mode final overrides (must stay at end to beat iOS-like light rules) */
[data-theme='dark'] #panel-dashboard .stat,
[data-theme='dark'] #panel-dashboard .stat-reorder {
  background: #2a313d !important;
  border-color: #434d5f !important;
}

[data-theme='dark'] #panel-dashboard .stats .stat:nth-child(1),
[data-theme='dark'] #panel-dashboard .stats .stat:nth-child(2),
[data-theme='dark'] #panel-dashboard .stats .stat:nth-child(3),
[data-theme='dark'] #panel-dashboard .stats .stat:nth-child(4) {
  background: #2a313d !important;
  border-color: #434d5f !important;
}

[data-theme='dark'] #panel-dashboard .stat .stat-label,
[data-theme='dark'] #panel-dashboard .stat .stat-value,
[data-theme='dark'] #panel-dashboard .stat-reorder .stat-label,
[data-theme='dark'] #panel-dashboard .stat-reorder .stat-value {
  color: #e8f0fb !important;
  opacity: 1 !important;
}

[data-theme='dark'] .inventory-row,
[data-theme='dark'] .stock-item-main {
  color: #e8f0fb !important;
}

[data-theme='dark'] .inventory-title,
[data-theme='dark'] .inventory-brand,
[data-theme='dark'] .inventory-qty-value,
[data-theme='dark'] .inventory-qty-unit,
[data-theme='dark'] .inventory-expiry-relative {
  color: #dbe8f7 !important;
  opacity: 1 !important;
}

[data-theme='dark'] .inventory-expiry.expiry-danger .inventory-expiry-date {
  color: #ff6d6d !important;
}

[data-theme='dark'] .inventory-expiry.expiry-warn .inventory-expiry-date {
  color: #ffb454 !important;
}

[data-theme='dark'] .inventory-expiry.expiry-ok .inventory-expiry-date {
  color: #56d487 !important;
}

[data-theme='dark'] .inventory-quick {
  border-color: #4a566a !important;
  background: #252d3a !important;
}

[data-theme='dark'] .inventory-quick-btn,
[data-theme='dark'] .inventory-quick-value {
  color: #e8f0fb !important;
}

[data-theme='dark'] .item-menu-trigger {
  border-color: #4a566a !important;
  background: #2c3441 !important;
  color: #e8f0fb !important;
}

[data-theme='dark'] #panel-dashboard .stat-label,
[data-theme='dark'] #panel-dashboard .stat-value,
[data-theme='dark'] #panel-dashboard .stat-reorder .stat-label,
[data-theme='dark'] #panel-dashboard .stat-reorder .stat-value {
  color: #eaf3ff !important;
  text-shadow: none !important;
}

[data-theme='dark'] .inventory-brand,
[data-theme='dark'] .inventory-qty-value,
[data-theme='dark'] .inventory-qty-unit,
[data-theme='dark'] .inventory-expiry-relative {
  color: #dce9f8 !important;
}

[data-theme='dark'] .inventory-quick-btn,
[data-theme='dark'] .inventory-quick-value {
  color: #f3f8ff !important;
  opacity: 1 !important;
}

[data-theme='dark'] .item-menu-trigger,
[data-theme='dark'] .item-menu-btn {
  opacity: 1 !important;
}

[data-theme='dark'] #panel-dashboard .stat-value {
  opacity: 1 !important;
}

[data-theme='dark'] .inventory-row .item-menu-trigger,
[data-theme='dark'] summary.item-menu-trigger {
  background-color: #2c3441 !important;
  border-color: #4a566a !important;
  color: #eef4ff !important;
}

[data-theme='dark'] .inventory-row .item-menu-panel {
  background: #252d39 !important;
  border-color: #455267 !important;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.38) !important;
}

[data-theme='dark'] .inventory-row .item-menu-btn {
  color: #e3ecf9 !important;
}

[data-theme='dark'] .inventory-row .item-menu-btn:hover {
  background: #343f4f !important;
}

[data-theme='dark'] .cart-tools input,
[data-theme='dark'] .cart-tools select {
  background: #202734 !important;
  border-color: #3f4b60 !important;
  color: #e8f0fb !important;
}

[data-theme='dark'] .cart-tools .hint {
  color: #d2deed !important;
}

[data-theme='dark'] .cart-qty-quick {
  border-color: #3f5066;
  background: #1f2c3d;
}

[data-theme='dark'] .cart-qty-btn,
[data-theme='dark'] .cart-qty-quick-value {
  color: #e8f2ff;
}

[data-theme='dark'] .button[disabled] {
  border-color: #4a566a !important;
  color: #cfd8e7 !important;
  background: #2c3441 !important;
  opacity: 0.58;
}

[data-theme='dark'] .products-toast {
  border-color: #3f6e57;
  background: #1f3b2d;
  color: #e8f6ee;
}

[data-theme='dark'] .products-toast.is-error {
  border-color: #7a4343;
  background: #4a2525;
  color: #ffe8e8;
}

[data-theme='dark'] .action-toast {
  border-color: #3f6e57;
  background: #1f3b2d;
  color: #e8f6ee;
}

[data-theme='dark'] .action-toast.is-error {
  border-color: #7a4343;
  background: #4a2525;
  color: #ffe8e8;
}

/* Dashboard desktop redesign (pixel-like reference) */
.dashboard-desktop-shell {
  display: grid;
  gap: 0.95rem;
}

.dashboard-desktop-sidebar,
.dashboard-desktop-rail {
  display: none;
}

.dashboard-hero-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.dashboard-hero-title {
  font-size: clamp(1.32rem, 2.2vw, 2rem);
  letter-spacing: -0.012em;
}

.dashboard-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
}

.dashboard-hero-actions > .button {
  min-height: 40px;
}

#panel-dashboard .dashboard-hero-add-btn .button-inline {
  gap: 0.44rem;
}

#panel-dashboard .dashboard-hero-add-btn [data-dashboard-icon] .icon-sm {
  width: 1.02rem;
  height: 1.02rem;
}

#panel-dashboard .dashboard-hero-icon-btn {
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  border-radius: 999px;
  padding: 0;
  position: relative;
}

#panel-dashboard .dashboard-hero-icon-btn [data-dashboard-icon] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#panel-dashboard .dashboard-hero-icon-btn [data-dashboard-icon] .icon-sm {
  width: 1.05rem;
  height: 1.05rem;
}

#panel-dashboard .dashboard-hero-notif-count {
  position: absolute;
  top: -5px;
  right: -3px;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  padding: 0 0.32rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: #1f9c55;
  border: 2px solid #fff;
}

#panel-dashboard .dashboard-hero-hidden-action {
  display: none;
}

#panel-dashboard .dashboard-hero-actions #qa-add-stock {
  background: #24944f;
  border-color: #22884a;
  color: #fff;
}

#panel-dashboard .stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-stat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.dashboard-stat-icon {
  width: 1.5rem;
  height: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #2da65a;
}

#panel-dashboard .stats .stat:nth-child(2) .dashboard-stat-icon {
  color: #e49b14;
}

#panel-dashboard .stats .stat:nth-child(3) .dashboard-stat-icon {
  color: #e25353;
}

#panel-dashboard .stats .stat:nth-child(4) .dashboard-stat-icon {
  color: #2a7cd8;
}

#panel-dashboard .dashboard-preview-card {
  border: 1px solid #e8edf3;
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
}

.dashboard-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.82rem 0.92rem 0.58rem;
}

.dashboard-preview-tabs {
  padding: 0 0.92rem 0.58rem;
  border-bottom: 1px solid #edf2f7;
}

.dashboard-preview-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.45rem;
  padding: 0.78rem 0.92rem 0.62rem;
}

.dashboard-preview-tools input[type='search'] {
  min-height: 42px;
  background: #fff;
}

.dashboard-preview-list {
  border-top: 1px solid #edf2f7;
}

.dashboard-preview-table-head,
.dashboard-preview-row {
  display: grid;
  grid-template-columns: minmax(220px, 2.1fr) 1fr 1fr 1fr 0.8fr;
  column-gap: 0.6rem;
  align-items: center;
}

.dashboard-preview-table-head {
  padding: 0.62rem 0.92rem;
  color: #667383;
  font-size: 0.82rem;
  border-bottom: 1px solid #eef3f8;
}

.dashboard-preview-row {
  padding: 0.58rem 0.92rem;
  border-top: 1px solid #f1f5f9;
}

.dashboard-preview-row:first-of-type {
  border-top: 0;
}

.dashboard-preview-col.product {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.dashboard-preview-thumb {
  width: 42px !important;
  height: 42px !important;
  border-radius: 10px !important;
}

.dashboard-preview-name {
  font-weight: 620;
  line-height: 1.2;
}

.dashboard-preview-col.expiry-danger p:first-child,
.dashboard-preview-col.expiry-warn p:first-child,
.dashboard-preview-col.expiry-ok p:first-child {
  font-weight: 620;
}

.dashboard-preview-col.expiry-danger p:first-child {
  color: #db3d3d;
}

.dashboard-preview-col.expiry-warn p:first-child {
  color: #d98200;
}

.dashboard-preview-col.expiry-ok p:first-child {
  color: #1f8d53;
}

.dashboard-preview-qty p:first-child {
  font-weight: 620;
}

@media (max-width: 1199px) {
  .dashboard-hero-actions > .button:not(#qa-add-stock):not(#refresh-dashboard-btn) {
    display: none;
  }

  .dashboard-preview-table-head {
    display: none;
  }

  .dashboard-preview-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
    align-items: start;
  }

  .dashboard-preview-col:not(.product) {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
  }
}

@media (min-width: 1200px) {
  .dashboard-desktop-shell {
    grid-template-columns: 258px minmax(0, 1fr) 320px;
    align-items: start;
    gap: 1.05rem;
  }

  .dashboard-desktop-sidebar,
  .dashboard-desktop-rail {
    display: block;
    border: 1px solid #e8edf3;
    border-radius: 18px;
    background: #fff;
    padding: 0.85rem 0.72rem;
  }

  .dashboard-brand-block {
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 0.62rem;
    align-items: center;
    padding: 0.24rem 0.2rem 0.72rem;
    border-bottom: 1px solid #eff3f8;
    margin-bottom: 0.72rem;
  }

  .dashboard-brand-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    border: 1px solid #d4e8da;
    background: #eef9f1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #2aa154;
  }

.dashboard-brand-text h3 {
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.dashboard-brand-block.dashboard-brand-block-logo {
  display: block;
  grid-template-columns: 1fr;
  gap: 0;
}

.dashboard-brand-logo-img {
  display: block;
  width: min(100%, 230px);
  height: auto;
  object-fit: contain;
}

  .dashboard-side-nav {
    display: grid;
    gap: 0.34rem;
  }

  .dashboard-side-link {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    border-radius: 12px;
    border: 0;
    min-height: 44px;
    justify-content: flex-start;
    padding: 0.5rem 0.6rem;
    background: transparent;
    color: #2a3544;
  }

  .dashboard-side-link span:last-child {
    font-size: 1rem;
  }

  .dashboard-side-link .dashboard-side-link-icon .icon-sm {
    width: 1.02rem;
    height: 1.02rem;
    color: #4f5f71;
  }

  .dashboard-side-link.is-active {
    background: #eef7f1;
    color: #1f8a4a;
  }

  .dashboard-side-link.is-active .dashboard-side-link-icon .icon-sm {
    color: #1f8a4a;
  }

  #panel-dashboard .dashboard-desktop-main {
    display: grid;
    gap: 0.9rem;
    min-width: 0;
  }

  #panel-dashboard .dashboard-hero-actions {
    flex-wrap: nowrap;
  }

  #panel-dashboard .dashboard-hero-actions #qa-scan,
  #panel-dashboard .dashboard-hero-actions #qa-transfer,
  #panel-dashboard .dashboard-hero-actions #qa-cart {
    display: none;
  }

  #panel-dashboard .dashboard-hero-hidden-action {
    display: none !important;
  }

  #panel-dashboard .stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  #panel-dashboard .stat {
    min-height: 152px;
  }

  #panel-dashboard .stat .stat-value {
    font-size: clamp(2rem, 2vw, 2.35rem);
  }

  .dashboard-desktop-rail {
    display: grid;
    gap: 0.75rem;
  }

  .dashboard-rail-card {
    border: 1px solid #e8edf3;
    border-radius: 16px;
    background: #fff;
    padding: 0.76rem;
  }

  .dashboard-rail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.42rem;
  }

  .dashboard-alerts-list {
    display: grid;
    gap: 0.46rem;
  }

  .dashboard-alert-row {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 0.55rem;
    align-items: start;
    padding: 0.4rem 0.1rem;
    border-top: 1px solid #f0f4f8;
  }

  .dashboard-alert-row:first-child {
    border-top: 0;
  }

  .dashboard-alert-icon {
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 999px;
    border: 1px solid #e7edf4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ea980f;
    background: #fffaf0;
  }

  .dashboard-alert-title {
    font-weight: 620;
    line-height: 1.2;
  }
}

[data-theme='dark'] #panel-dashboard .dashboard-preview-card,
[data-theme='dark'] #panel-dashboard .dashboard-desktop-sidebar,
[data-theme='dark'] #panel-dashboard .dashboard-desktop-rail,
[data-theme='dark'] #panel-dashboard .dashboard-rail-card {
  background: #1f2733;
  border-color: #38475d;
}

[data-theme='dark'] #panel-dashboard .dashboard-preview-table-head,
[data-theme='dark'] #panel-dashboard .dashboard-preview-row,
[data-theme='dark'] #panel-dashboard .dashboard-brand-block,
[data-theme='dark'] #panel-dashboard .dashboard-alert-row {
  border-color: #2f3b4d;
}

[data-theme='dark'] #panel-dashboard .dashboard-side-link {
  color: #e3ecf8;
}

[data-theme='dark'] #panel-dashboard .dashboard-side-link .dashboard-side-link-icon .icon-sm {
  color: #b9c9de;
}

[data-theme='dark'] #panel-dashboard .dashboard-side-link.is-active {
  background: #204531;
  color: #d7f2e2;
}

[data-theme='dark'] #panel-dashboard .dashboard-side-link.is-active .dashboard-side-link-icon .icon-sm {
  color: #8de0ad;
}

[data-theme='dark'] #panel-dashboard .dashboard-preview-tools input[type='search'] {
  background: #1a2230;
  border-color: #3a4a61;
  color: #e9f2ff;
}

[data-theme='dark'] #panel-dashboard .dashboard-alert-icon {
  background: #2b3340;
  border-color: #3d4c60;
  color: #ffd081;
}

[data-theme='dark'] #panel-dashboard .dashboard-hero-notif-count {
  border-color: #1f2733;
}

/* Desktop panorama mode: remove duplicated chrome and go wide/full */
@media (min-width: 1200px) {
  body.desktop-dashboard-mode .topbar,
  body.desktop-dashboard-mode #app-user-card,
  body.desktop-dashboard-mode #app-house-card,
  body.desktop-dashboard-mode #main-nav {
    display: none !important;
  }

  body.desktop-dashboard-mode {
    background: #f3f5f8;
  }

  body.desktop-dashboard-mode .app-shell {
    width: min(1560px, 100%);
    max-width: none;
    padding: 0.85rem 0.95rem 1rem;
  }

  body.desktop-dashboard-mode #app-area {
    gap: 0;
  }

  body.desktop-dashboard-mode #panel-dashboard {
    border: 1px solid #dfe6ef !important;
    background: #fff !important;
    box-shadow: 0 18px 38px rgba(21, 32, 49, 0.08) !important;
    border-radius: 28px !important;
    padding: 0 !important;
    overflow: hidden;
  }

  body.desktop-dashboard-mode #panel-dashboard .dashboard-desktop-shell {
    grid-template-columns: 302px minmax(0, 1fr) 356px;
    gap: 0;
  }

  body.desktop-dashboard-mode #panel-dashboard .dashboard-desktop-sidebar {
    border: 0;
    border-right: 1px solid #e7edf4;
    border-radius: 0;
    background: transparent;
    padding: 1.45rem 1.2rem 1.1rem;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 2.7rem);
    gap: 0.95rem;
  }

  body.desktop-dashboard-mode #panel-dashboard .dashboard-brand-block {
    padding: 0 0.18rem 1.05rem;
    border-bottom: 0;
    margin-bottom: 0;
  }

  body.desktop-dashboard-mode #panel-dashboard .dashboard-brand-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 15px;
  }

  body.desktop-dashboard-mode #panel-dashboard .dashboard-brand-text h3 {
    font-size: 2.02rem;
    font-weight: 750;
    letter-spacing: -0.03em;
    line-height: 1.02;
  }

  body.desktop-dashboard-mode #panel-dashboard .dashboard-brand-text p {
    font-size: 1.02rem;
    margin-top: 0.2rem;
  }

  body.desktop-dashboard-mode #panel-dashboard .dashboard-side-nav {
    gap: 0.3rem;
  }

  body.desktop-dashboard-mode #panel-dashboard .dashboard-side-link {
    min-height: 49px;
    border-radius: 13px;
    padding-inline: 0.82rem;
    color: #2f3c4b;
    font-weight: 530;
  }

  body.desktop-dashboard-mode #panel-dashboard .dashboard-side-link.is-active {
    background: #eef7f1;
    color: #228b4a;
  }

  body.desktop-dashboard-mode #panel-dashboard .dashboard-side-link .dashboard-side-link-icon .icon-sm {
    width: 1.04rem;
    height: 1.04rem;
  }

  body.desktop-dashboard-mode #panel-dashboard .dashboard-side-promo {
    margin-top: auto;
    border: 1px solid #deebdf;
    border-radius: 16px;
    background: #edf7ef;
    padding: 0.92rem;
    display: grid;
    gap: 0.7rem;
  }

  body.desktop-dashboard-mode #panel-dashboard .dashboard-side-promo-title {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 630;
    color: #248d4b;
  }

  body.desktop-dashboard-mode #panel-dashboard .dashboard-side-promo .button {
    justify-self: start;
    border-color: #2aa455;
    background: #2aa455;
    color: #fff;
    font-weight: 600;
    min-height: 40px;
  }

  body.desktop-dashboard-mode #panel-dashboard .dashboard-side-user {
    border: 1px solid #e4e9f0;
    border-radius: 14px;
    padding: 0.74rem 0.82rem;
    display: grid;
    grid-template-columns: 36px 1fr 18px;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    list-style: none;
  }

  body.desktop-dashboard-mode #panel-dashboard .dashboard-side-user::-webkit-details-marker {
    display: none;
  }

  body.desktop-dashboard-mode #panel-dashboard .dashboard-side-user-menu {
    margin-top: 0.42rem;
    position: sticky;
    top: 0.92rem;
    z-index: 3;
  }

  body.desktop-dashboard-mode #panel-dashboard .dashboard-side-user-caret {
    width: 0.55rem;
    height: 0.55rem;
    border-right: 1.8px solid #627286;
    border-bottom: 1.8px solid #627286;
    transform: rotate(45deg);
    justify-self: end;
    transition: transform 140ms ease;
  }

  body.desktop-dashboard-mode #panel-dashboard .dashboard-side-user-menu[open] .dashboard-side-user-caret {
    transform: rotate(-135deg);
    margin-top: 0.26rem;
  }

  body.desktop-dashboard-mode #panel-dashboard .dashboard-side-user-menu-panel {
    margin-top: 0.4rem;
    border: 1px solid #dfe7f1;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 20px rgba(15, 32, 52, 0.09);
    padding: 0.3rem;
    display: grid;
    gap: 0.16rem;
  }

  body.desktop-dashboard-mode #panel-dashboard .dashboard-side-user-menu-item {
    border: 0;
    border-radius: 10px;
    min-height: 39px;
    text-align: left;
    padding: 0.52rem 0.65rem;
    background: transparent;
    color: #253447;
    font: inherit;
  }

  body.desktop-dashboard-mode #panel-dashboard .dashboard-side-user-menu-item:hover {
    background: #f1f5fa;
  }

  body.desktop-dashboard-mode #panel-dashboard .dashboard-side-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid #d7dde7;
    background: #f3f5f9;
    color: #546274;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 640;
    font-size: 0.93rem;
  }

  body.desktop-dashboard-mode #panel-dashboard .dashboard-side-user p {
    font-weight: 560;
    color: #2c3a49;
  }

  body.desktop-dashboard-mode #panel-dashboard .dashboard-desktop-main {
    padding: 1.7rem 1.45rem 1.2rem;
    gap: 1.05rem;
    min-height: calc(100vh - 2.7rem);
  }

  body.desktop-dashboard-mode #panel-dashboard .dashboard-hero-title {
    font-size: clamp(2.2rem, 2.4vw, 2.95rem);
    letter-spacing: -0.035em;
  }

  body.desktop-dashboard-mode #panel-dashboard .dashboard-hero-row .hint {
    font-size: 1.15rem;
    color: #68788a;
    margin-top: 0.18rem;
  }

  body.desktop-dashboard-mode #panel-dashboard .dashboard-hero-actions {
    gap: 0.62rem;
  }

  body.desktop-dashboard-mode #panel-dashboard .dashboard-hero-add-btn {
    min-height: 48px;
    padding-inline: 1.15rem;
    border-color: #24974e;
    background: #24974e;
    font-weight: 620;
    border-radius: 12px;
  }

  body.desktop-dashboard-mode #panel-dashboard .dashboard-hero-icon-btn {
    width: 46px;
    min-width: 46px;
    height: 46px;
    min-height: 46px;
    background: #fff;
    border-color: #dce5ef;
  }

  body.desktop-dashboard-mode #panel-dashboard .stats {
    gap: 0.9rem;
  }

  body.desktop-dashboard-mode #panel-dashboard .stat {
    min-height: 160px;
    border-radius: 16px;
    padding: 1rem 1rem 0.9rem;
  }

  body.desktop-dashboard-mode #panel-dashboard .stat .stat-label {
    font-size: 1.02rem;
    color: #35475a;
    font-weight: 560;
  }

  body.desktop-dashboard-mode #panel-dashboard .stat .stat-value {
    font-size: clamp(2.15rem, 2.15vw, 2.75rem);
    margin-top: 0.55rem;
  }

  body.desktop-dashboard-mode #panel-dashboard .stat .hint {
    font-size: 1rem;
  }

  body.desktop-dashboard-mode #panel-dashboard .dashboard-preview-card {
    border-radius: 18px;
    border: 1px solid #e3e9f1;
  }

  body.desktop-dashboard-mode #panel-dashboard .dashboard-preview-head {
    padding: 0.98rem 1.1rem 0.76rem;
  }

  body.desktop-dashboard-mode #panel-dashboard .dashboard-preview-head h4 {
    font-size: 1.88rem;
    font-weight: 730;
    letter-spacing: -0.03em;
  }

  body.desktop-dashboard-mode #panel-dashboard .dashboard-preview-head .button {
    min-height: 44px;
    padding-inline: 1.02rem;
    border-radius: 999px;
  }

  body.desktop-dashboard-mode #panel-dashboard .dashboard-preview-tabs {
    padding: 0 1.08rem 0.72rem;
  }

  body.desktop-dashboard-mode #panel-dashboard .dashboard-preview-tools {
    padding: 0.88rem 1.08rem 0.76rem;
    gap: 0.56rem;
  }

  body.desktop-dashboard-mode #panel-dashboard .dashboard-preview-tools input[type='search'] {
    min-height: 46px;
  }

  body.desktop-dashboard-mode #panel-dashboard .dashboard-preview-table-head,
  body.desktop-dashboard-mode #panel-dashboard .dashboard-preview-row {
    padding-left: 1.08rem;
    padding-right: 1.08rem;
    grid-template-columns: minmax(260px, 2.2fr) 1fr 1fr 1fr 0.78fr;
  }

  body.desktop-dashboard-mode #panel-dashboard .dashboard-preview-table-head {
    font-size: 0.87rem;
    color: #6f7c8a;
  }

  body.desktop-dashboard-mode #panel-dashboard .dashboard-preview-row {
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
  }

  body.desktop-dashboard-mode #panel-dashboard .dashboard-preview-thumb {
    width: 44px !important;
    height: 44px !important;
  }

  body.desktop-dashboard-mode #panel-dashboard .dashboard-preview-name {
    font-size: 1.03rem;
    font-weight: 670;
  }

  body.desktop-dashboard-mode #panel-dashboard .dashboard-desktop-rail {
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 1.7rem 1.1rem 1.2rem 0.95rem;
    min-height: calc(100vh - 2.7rem);
    gap: 0.84rem;
  }

  body.desktop-dashboard-mode #panel-dashboard .dashboard-rail-card {
    border-radius: 16px;
    border: 1px solid #e4eaf2;
    padding: 0.9rem;
    box-shadow: none;
  }

  body.desktop-dashboard-mode #panel-dashboard .dashboard-rail-head h4 {
    font-size: 1.9rem;
    font-weight: 730;
    letter-spacing: -0.03em;
  }

  body.desktop-dashboard-mode #panel-dashboard .dashboard-alert-row,
  body.desktop-dashboard-mode #panel-dashboard .dashboard-suggested-row {
    padding-block: 0.56rem;
  }

  body.desktop-dashboard-mode #panel-dashboard .dashboard-suggested-list {
    display: grid;
    gap: 0.44rem;
  }

  body.desktop-dashboard-mode #panel-dashboard .dashboard-suggested-row {
    display: grid;
    grid-template-columns: 56px 1fr;
    align-items: center;
    gap: 0.65rem;
    border-top: 1px solid #edf2f7;
  }

  body.desktop-dashboard-mode #panel-dashboard .dashboard-suggested-row:first-child {
    border-top: 0;
  }

  body.desktop-dashboard-mode #panel-dashboard .dashboard-suggested-thumb {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e4eaf2;
    background: #f6f8fb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  body.desktop-dashboard-mode #panel-dashboard .dashboard-suggested-title {
    font-weight: 620;
  }

  body.desktop-dashboard-mode #panel-dashboard .dashboard-rail-highlight {
    border-color: #dcebdc;
    background: #eef7ef;
  }

  body.desktop-dashboard-mode #panel-dashboard .dashboard-highlight-title {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 650;
    color: #258d4c;
    margin-bottom: 0.4rem;
  }
}

/* Desktop inventory page (reference-like) */
@media (min-width: 1200px) {
  body.desktop-stock-mode .topbar,
  body.desktop-stock-mode #app-user-card,
  body.desktop-stock-mode #app-house-card,
  body.desktop-stock-mode #main-nav {
    display: none !important;
  }

  body.desktop-stock-mode {
    background: #f3f5f8;
  }

  body.desktop-stock-mode .app-shell {
    width: min(1560px, 100%);
    max-width: none;
    padding: 0.85rem 0.95rem 1rem;
  }

  body.desktop-stock-mode #app-area {
    gap: 0;
  }

  body.desktop-stock-mode #panel-stock {
    border: 1px solid #dfe6ef !important;
    background: #fff !important;
    box-shadow: 0 18px 38px rgba(21, 32, 49, 0.08) !important;
    border-radius: 28px !important;
    padding: 0 !important;
    overflow: hidden;
  }

  body.desktop-stock-mode #panel-stock .inventory-desktop-shell {
    display: grid;
    grid-template-columns: 302px minmax(0, 1fr);
    gap: 0;
    min-height: calc(100vh - 2.7rem);
  }

  body.desktop-stock-mode #panel-stock .inventory-desktop-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
    border: 0;
    border-right: 1px solid #e7edf4;
    border-radius: 0;
    background: transparent;
    padding: 1.45rem 1.2rem 1.1rem;
  }

  body.desktop-stock-mode #panel-stock .dashboard-brand-block {
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 0.62rem;
    align-items: center;
    padding: 0 0.18rem 1.05rem;
    border-bottom: 0;
    margin-bottom: 0;
  }

  body.desktop-stock-mode #panel-stock .dashboard-brand-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 15px;
    border: 1px solid #d4e8da;
    background: #eef9f1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #2aa154;
  }

  body.desktop-stock-mode #panel-stock .dashboard-brand-text h3 {
    font-size: 2.02rem;
    font-weight: 750;
    letter-spacing: -0.03em;
    line-height: 1.02;
  }

  body.desktop-stock-mode #panel-stock .dashboard-brand-text p {
    font-size: 1.02rem;
    margin-top: 0.2rem;
  }

  body.desktop-stock-mode #panel-stock .dashboard-side-nav {
    display: grid;
    gap: 0.3rem;
  }

  body.desktop-stock-mode #panel-stock .dashboard-side-link {
    min-height: 49px;
    border-radius: 13px;
    padding-inline: 0.82rem;
    color: #2f3c4b;
    font-weight: 530;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    border: 0;
    justify-content: flex-start;
    background: transparent;
  }

  body.desktop-stock-mode #panel-stock .dashboard-side-link .dashboard-side-link-icon .icon-sm {
    width: 1.04rem;
    height: 1.04rem;
    color: #4f5f71;
  }

  body.desktop-stock-mode #panel-stock .dashboard-side-link.is-active {
    background: #eef7f1;
    color: #228b4a;
  }

  body.desktop-stock-mode #panel-stock .dashboard-side-link.is-active .dashboard-side-link-icon .icon-sm {
    color: #1f8a4a;
  }

  body.desktop-stock-mode #panel-stock .inventory-desktop-main {
    padding: 1.7rem 1.45rem 1.2rem;
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 0.55rem;
  }

  body.desktop-stock-mode #panel-stock .dashboard-side-promo {
    margin-top: auto;
    border: 1px solid #deebdf;
    border-radius: 16px;
    background: #edf7ef;
    padding: 0.92rem;
    display: grid;
    gap: 0.7rem;
  }

  body.desktop-stock-mode #panel-stock .dashboard-side-promo-title {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 630;
    color: #248d4b;
  }

  body.desktop-stock-mode #panel-stock .dashboard-side-promo .button {
    justify-self: start;
    border-color: #2aa455;
    background: #2aa455;
    color: #fff;
    font-weight: 600;
    min-height: 40px;
  }

  body.desktop-stock-mode #panel-stock .dashboard-side-user-menu {
    margin-top: 0.42rem;
    position: sticky;
    top: 0.92rem;
    z-index: 3;
  }

  body.desktop-stock-mode #panel-stock .dashboard-side-user {
    border: 1px solid #e4e9f0;
    border-radius: 14px;
    padding: 0.74rem 0.82rem;
    display: grid;
    grid-template-columns: 36px 1fr 18px;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    list-style: none;
  }

  body.desktop-stock-mode #panel-stock .dashboard-side-user::-webkit-details-marker {
    display: none;
  }

  body.desktop-stock-mode #panel-stock .dashboard-side-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid #d7dde7;
    background: #f3f5f9;
    color: #546274;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 640;
    font-size: 0.93rem;
  }

  body.desktop-stock-mode #panel-stock .dashboard-side-user p {
    font-weight: 560;
    color: #2c3a49;
  }

  body.desktop-stock-mode #panel-stock .dashboard-side-user-caret {
    width: 0.55rem;
    height: 0.55rem;
    border-right: 1.8px solid #627286;
    border-bottom: 1.8px solid #627286;
    transform: rotate(45deg);
    justify-self: end;
    transition: transform 140ms ease;
  }

  body.desktop-stock-mode #panel-stock .dashboard-side-user-menu[open] .dashboard-side-user-caret {
    transform: rotate(-135deg);
    margin-top: 0.26rem;
  }

  body.desktop-stock-mode #panel-stock .dashboard-side-user-menu-panel {
    margin-top: 0.4rem;
    border: 1px solid #dfe7f1;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 20px rgba(15, 32, 52, 0.09);
    padding: 0.3rem;
    display: grid;
    gap: 0.16rem;
  }

  body.desktop-stock-mode #panel-stock .dashboard-side-user-menu-item {
    border: 0;
    border-radius: 10px;
    min-height: 39px;
    text-align: left;
    padding: 0.52rem 0.65rem;
    background: transparent;
    color: #253447;
    font: inherit;
  }

  body.desktop-stock-mode #panel-stock .dashboard-side-user-menu-item:hover {
    background: #f1f5fa;
  }

  body.desktop-stock-mode #panel-stock .inventory-page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.8rem;
  }

  body.desktop-stock-mode #panel-stock .inventory-page-title {
    font-size: clamp(2.2rem, 2.4vw, 2.95rem);
    letter-spacing: -0.035em;
  }

  body.desktop-stock-mode #panel-stock .inventory-page-head .hint {
    font-size: 1.15rem;
    color: #68788a;
    margin-top: 0.18rem;
  }

  body.desktop-stock-mode #panel-stock .inventory-page-actions {
    display: flex;
    align-items: center;
    gap: 0.62rem;
  }

  body.desktop-stock-mode #panel-stock .inventory-page-actions .dashboard-hero-add-btn {
    min-height: 48px;
    padding-inline: 1.15rem;
    border-color: #24974e;
    background: #24974e;
    color: #fff;
    font-weight: 620;
    border-radius: 12px;
  }

  body.desktop-stock-mode #panel-stock .inventory-page-actions .dashboard-hero-icon-btn {
    width: 46px;
    min-width: 46px;
    height: 46px;
    min-height: 46px;
    border-radius: 999px;
    border-color: #dce5ef;
    background: #fff;
    padding: 0;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  body.desktop-stock-mode #panel-stock .inventory-page-actions .dashboard-hero-icon-btn [data-dashboard-icon] .icon-sm {
    width: 1.05rem;
    height: 1.05rem;
  }

  body.desktop-stock-mode #panel-stock .inventory-page-actions .dashboard-hero-notif-count {
    position: absolute;
    top: -5px;
    right: -3px;
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    padding: 0 0.32rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    background: #1f9c55;
    border: 2px solid #fff;
  }

  body.desktop-stock-mode #panel-stock .list-tools {
    margin-top: 0;
  }

  body.desktop-stock-mode #panel-stock .stock-categories-row {
    border-bottom: 1px solid #e8edf3;
    padding-bottom: 0.62rem;
  }

  body.desktop-stock-mode #panel-stock .stock-categories-row .chip-btn {
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #616f80;
    padding: 0.42rem 0.9rem 0.62rem;
  }

  body.desktop-stock-mode #panel-stock .stock-categories-row .chip-btn.is-active {
    color: #22914d;
    border-bottom: 3px solid #27a657;
  }

  body.desktop-stock-mode #panel-stock .inventory-toolbar {
    margin-top: 0.74rem;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 0.72rem;
  }

  body.desktop-stock-mode #panel-stock .inventory-toolbar input[type='search'] {
    min-height: 46px;
  }

  body.desktop-stock-mode #panel-stock .inventory-toolbar .button {
    min-height: 46px;
    padding-inline: 1rem;
  }

  body.desktop-stock-mode #panel-stock .inventory-desktop-table-head {
    display: grid;
    grid-template-columns: 56px minmax(220px, 2fr) 136px 168px 152px 84px 132px 36px;
    column-gap: 0.7rem;
    align-items: center;
    padding: 0.68rem 0.82rem 0.54rem;
    color: #6f7c8a;
    font-size: 0.88rem;
    border-bottom: 1px solid #e9eef5;
  }

  body.desktop-stock-mode #panel-stock .inventory-desktop-table-head > span:first-child {
    grid-column: 1 / span 2;
    padding-left: 0.18rem;
  }

  body.desktop-stock-mode #panel-stock #stock-list {
    margin-top: 0 !important;
    border-radius: 0 0 18px 18px;
    border-top: 0;
    background: #fff;
  }

  body.desktop-stock-mode #panel-stock .stock-list-item {
    padding: 0.24rem 0.72rem;
  }

  body.desktop-stock-mode #panel-stock .inventory-row {
    grid-template-columns: 56px minmax(220px, 2fr) 136px 168px 152px 84px 132px 36px;
    grid-template-rows: auto auto;
    column-gap: 0.64rem;
    row-gap: 0.16rem;
  }

  body.desktop-stock-mode #panel-stock .inventory-main {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  body.desktop-stock-mode #panel-stock .inventory-main .inventory-location-line {
    display: none;
  }

  body.desktop-stock-mode #panel-stock .inventory-category-col {
    display: inline-flex;
    align-items: center;
    grid-column: 3;
    grid-row: 1 / span 2;
    min-width: 0;
  }

  body.desktop-stock-mode #panel-stock .inventory-place-col {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    grid-column: 4;
    grid-row: 1 / span 2;
    color: var(--text-2);
    min-width: 0;
  }

  body.desktop-stock-mode #panel-stock .inventory-place-col .icon-sm {
    color: #72829a;
  }

  body.desktop-stock-mode #panel-stock .inventory-expiry {
    grid-column: 5;
    justify-items: start;
    text-align: left;
  }

  body.desktop-stock-mode #panel-stock .inventory-qty {
    grid-column: 6;
    justify-items: start;
    text-align: left;
  }

  body.desktop-stock-mode #panel-stock .inventory-quick {
    grid-column: 7;
  }

  body.desktop-stock-mode #panel-stock .inventory-row > .item-menu {
    grid-column: 8;
  }

  body.desktop-stock-mode #panel-stock .desktop-pagination {
    margin-top: 0.55rem;
  }

  body.desktop-stock-mode #panel-stock .stock-modal {
    z-index: 40;
  }
}

@media (min-width: 1200px) {
  [data-theme='dark'] body.desktop-stock-mode {
    background: #131923;
  }

  [data-theme='dark'] body.desktop-stock-mode #panel-stock {
    background: #172231 !important;
    border-color: #304055 !important;
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.42) !important;
  }

  [data-theme='dark'] body.desktop-stock-mode #panel-stock .inventory-desktop-sidebar {
    border-right-color: #2d3d52;
  }

  [data-theme='dark'] body.desktop-stock-mode #panel-stock .dashboard-side-link {
    color: #d6e3f4;
  }

  [data-theme='dark'] body.desktop-stock-mode #panel-stock .dashboard-side-link.is-active {
    background: #1f4d39;
    color: #e8fff1;
    box-shadow: inset 0 0 0 1px #2f6f53;
  }

  [data-theme='dark'] body.desktop-stock-mode #panel-stock .dashboard-side-link.is-active .dashboard-side-link-icon .icon-sm {
    color: #7ee2a8;
  }

  [data-theme='dark'] body.desktop-stock-mode #panel-stock .dashboard-side-promo,
  [data-theme='dark'] body.desktop-stock-mode #panel-stock .dashboard-side-user-menu-panel {
    border-color: #314960;
  }

  [data-theme='dark'] body.desktop-stock-mode #panel-stock .dashboard-side-promo {
    background: #1f3b30;
  }

  [data-theme='dark'] body.desktop-stock-mode #panel-stock .dashboard-side-user {
    border-color: #31445d;
    background: #1b293a;
  }

  [data-theme='dark'] body.desktop-stock-mode #panel-stock .dashboard-side-user p {
    color: #e6f0fc;
    font-weight: 600;
  }

  [data-theme='dark'] body.desktop-stock-mode #panel-stock .dashboard-side-user-caret {
    border-color: #c7d5e8;
  }

  [data-theme='dark'] body.desktop-stock-mode #panel-stock .dashboard-side-user-menu-panel {
    background: #1b2a3c;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
  }

  [data-theme='dark'] body.desktop-stock-mode #panel-stock .dashboard-side-user-menu-item {
    color: #dbe8f8;
  }

  [data-theme='dark'] body.desktop-stock-mode #panel-stock .dashboard-side-user-menu-item:hover {
    background: #25384f;
  }

  [data-theme='dark'] body.desktop-stock-mode #panel-stock .inventory-page-head .hint {
    color: #b5c6da;
  }

  [data-theme='dark'] body.desktop-stock-mode #panel-stock .inventory-page-actions .dashboard-hero-icon-btn {
    background: #1e2d41;
    border-color: #324862;
  }

  [data-theme='dark'] body.desktop-stock-mode #panel-stock .inventory-page-actions .dashboard-hero-notif-count {
    border-color: #1b2a3c;
  }

  [data-theme='dark'] body.desktop-stock-mode #panel-stock .inventory-desktop-table-head {
    color: #a8b9ce;
    border-bottom-color: #32475f;
  }

  [data-theme='dark'] body.desktop-stock-mode #panel-stock #stock-list {
    background: #1b2a3c;
    border-color: #334a65;
  }

  [data-theme='dark'] body.desktop-stock-mode #panel-stock .stock-list-item {
    border-top-color: #2f4259;
  }

  [data-theme='dark'] body.desktop-stock-mode #panel-stock .inventory-place-col {
    color: #aecdde;
  }

  [data-theme='dark'] body.desktop-stock-mode #panel-stock .inventory-place-col .icon-sm {
    color: #9ab5ce;
  }
}

/* Desktop expiring page (Scadenze) */
@media (min-width: 1200px) {
  body.desktop-cart-mode .topbar,
  body.desktop-cart-mode #app-user-card,
  body.desktop-cart-mode #app-house-card,
  body.desktop-cart-mode #main-nav {
    display: none !important;
  }

  body.desktop-cart-mode {
    background: #f3f5f8;
  }

  body.desktop-cart-mode .app-shell {
    width: min(1780px, 100%);
    max-width: none;
    padding: 0.65rem 0.9rem 1rem;
  }

  body.desktop-cart-mode #app-area {
    gap: 0;
  }

  body.desktop-cart-mode #panel-cart {
    border: 1px solid #dfe6ef !important;
    background: #fff !important;
    box-shadow: 0 18px 38px rgba(21, 32, 49, 0.08) !important;
    border-radius: 26px !important;
    padding: 0 !important;
    overflow: hidden;
  }

  body.desktop-cart-mode #panel-cart .cart-desktop-shell {
    display: grid;
    grid-template-columns: 332px minmax(0, 1fr) 348px;
    gap: 0;
    min-height: calc(100vh - 2.7rem);
  }

  body.desktop-cart-mode #panel-cart .cart-desktop-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
    border: 0;
    border-right: 1px solid #e7edf4;
    border-radius: 0;
    background: transparent;
    padding: 1.7rem 1.38rem 1.16rem;
  }

  body.desktop-cart-mode #panel-cart .dashboard-brand-block {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 0.75rem;
    align-items: center;
    padding: 0 0.18rem 1.25rem;
  }

  body.desktop-cart-mode #panel-cart .dashboard-brand-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 15px;
    border: 1px solid #d4e8da;
    background: #eef9f1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #2aa154;
  }

  body.desktop-cart-mode #panel-cart .dashboard-brand-text h3 {
    font-size: 1.88rem;
    font-weight: 740;
    letter-spacing: -0.02em;
    line-height: 1.08;
  }

  body.desktop-cart-mode #panel-cart .dashboard-brand-text p {
    font-size: 1rem;
    margin-top: 0.22rem;
  }

  body.desktop-cart-mode #panel-cart .dashboard-side-nav {
    display: grid;
    gap: 0.46rem;
  }

  body.desktop-cart-mode #panel-cart .dashboard-side-link {
    min-height: 56px;
    border-radius: 13px;
    padding-inline: 0.98rem;
    color: #2f3c4b;
    font-size: 1.04rem;
    font-weight: 560;
    display: inline-flex;
    align-items: center;
    gap: 0.62rem;
    border: 0;
    justify-content: flex-start;
    background: transparent;
  }

  body.desktop-cart-mode #panel-cart .dashboard-side-link .dashboard-side-link-icon .icon-sm {
    width: 1.1rem;
    height: 1.1rem;
    color: #4f5f71;
  }

  body.desktop-cart-mode #panel-cart .dashboard-side-link.is-active {
    background: #eef7f1;
    color: #228b4a;
  }

  body.desktop-cart-mode #panel-cart .dashboard-side-link.is-active .dashboard-side-link-icon .icon-sm {
    color: #1f8a4a;
  }

  body.desktop-cart-mode #panel-cart .dashboard-side-user-menu {
    margin-top: auto;
    position: sticky;
    bottom: 0.8rem;
    z-index: 3;
  }

  body.desktop-cart-mode #panel-cart .dashboard-side-user {
    border: 1px solid #e4e9f0;
    border-radius: 14px;
    padding: 0.8rem 0.88rem;
    display: grid;
    grid-template-columns: 36px 1fr 18px;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    list-style: none;
  }

  body.desktop-cart-mode #panel-cart .dashboard-side-user::-webkit-details-marker {
    display: none;
  }

  body.desktop-cart-mode #panel-cart .dashboard-side-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid #d7dde7;
    background: #f3f5f9;
    color: #546274;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 640;
    font-size: 0.93rem;
  }

  body.desktop-cart-mode #panel-cart .dashboard-side-user p {
    font-size: 1.03rem;
    font-weight: 580;
    color: #2c3a49;
  }

  body.desktop-cart-mode #panel-cart .dashboard-side-user-caret {
    width: 0.55rem;
    height: 0.55rem;
    border-right: 1.8px solid #627286;
    border-bottom: 1.8px solid #627286;
    transform: rotate(45deg);
    justify-self: end;
    transition: transform 140ms ease;
  }

  body.desktop-cart-mode #panel-cart .dashboard-side-user-menu[open] .dashboard-side-user-caret {
    transform: rotate(-135deg);
    margin-top: 0.26rem;
  }

  body.desktop-cart-mode #panel-cart .dashboard-side-user-menu-panel {
    margin-top: 0.4rem;
    border: 1px solid #dfe7f1;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 20px rgba(15, 32, 52, 0.09);
    padding: 0.3rem;
    display: grid;
    gap: 0.16rem;
  }

  body.desktop-cart-mode #panel-cart .dashboard-side-user-menu-item {
    border: 0;
    border-radius: 10px;
    min-height: 39px;
    text-align: left;
    padding: 0.52rem 0.65rem;
    background: transparent;
    color: #253447;
    font: inherit;
  }

  body.desktop-cart-mode #panel-cart .dashboard-side-user-menu-item:hover {
    background: #f1f5fa;
  }

  body.desktop-cart-mode #panel-cart .cart-desktop-main {
    padding: 1.82rem 1.62rem 1.32rem;
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 0.92rem;
  }

  body.desktop-cart-mode #panel-cart .cart-page-head {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.9rem;
  }

  body.desktop-cart-mode #panel-cart .cart-page-title {
    font-size: 2.02rem;
    line-height: 1.08;
  }

  body.desktop-cart-mode #panel-cart .inventory-page-actions {
    display: flex;
    align-items: center;
    gap: 0.62rem;
  }

  body.desktop-cart-mode #panel-cart .inventory-page-actions .dashboard-hero-add-btn {
    min-height: 48px;
    padding-inline: 1.2rem;
    border-color: #24974e;
    background: #24974e;
    color: #fff;
    font-weight: 620;
    border-radius: 12px;
  }

  body.desktop-cart-mode #panel-cart .inventory-page-actions .dashboard-hero-icon-btn {
    width: 46px;
    min-width: 46px;
    height: 46px;
    min-height: 46px;
    border-radius: 999px;
    border-color: #dce5ef;
    background: #fff;
    padding: 0;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  body.desktop-cart-mode #panel-cart .inventory-page-actions .dashboard-hero-notif-count {
    position: absolute;
    top: -5px;
    right: -3px;
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    padding: 0 0.32rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    background: #1f9c55;
    border: 2px solid #fff;
  }

  body.desktop-cart-mode #panel-cart .cart-view-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  body.desktop-cart-mode #panel-cart .cart-current-card {
    padding: 1.05rem 1.05rem 1rem;
  }

  body.desktop-cart-mode #panel-cart #cart-summary {
    font-size: 0.84rem;
    color: #708198;
  }

  body.desktop-cart-mode #panel-cart .cart-group-card .list-item {
    padding: 0.7rem 0.86rem;
  }

  body.desktop-cart-mode #panel-cart .cart-list-footer-actions {
    display: none;
  }

  body.desktop-cart-mode #panel-cart #cart-list {
    border: 0;
    background: transparent;
    overflow: visible;
  }

  body.desktop-cart-mode #panel-cart .cart-group-card .list-item {
    border-radius: 0;
    border-top: 1px solid #edf2f8;
  }

  body.desktop-cart-mode #panel-cart .cart-group-card .list-item:first-child {
    border-top: 0;
  }

  body.desktop-cart-mode #panel-cart .cart-desktop-rail {
    display: grid;
    align-content: start;
    gap: 1.12rem;
    padding: 1.82rem 1.26rem 1.28rem 1.14rem;
    border-left: 1px solid #e7edf4;
  }

  body.desktop-cart-mode #panel-cart .dashboard-rail-card {
    border-radius: 16px;
    padding: 1.1rem 1.08rem;
    border: 1px solid #e6edf5;
    background: #fff;
  }

  body.desktop-cart-mode #panel-cart .dashboard-rail-card h4 {
    font-size: 1.24rem;
    line-height: 1.12;
  }

  body.desktop-cart-mode #panel-cart .cart-rail-row,
  body.desktop-cart-mode #panel-cart .cart-rail-total {
    min-height: 38px;
  }
}

@media (min-width: 1200px) {
  [data-theme='dark'] body.desktop-cart-mode {
    background: #131923;
  }

  [data-theme='dark'] body.desktop-cart-mode #panel-cart {
    background: #172231 !important;
    border-color: #304055 !important;
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.42) !important;
  }

  [data-theme='dark'] body.desktop-cart-mode #panel-cart .cart-desktop-sidebar,
  [data-theme='dark'] body.desktop-cart-mode #panel-cart .cart-desktop-rail {
    border-color: #2d3d52;
  }

  [data-theme='dark'] body.desktop-cart-mode #panel-cart .dashboard-side-link {
    color: #d6e3f4;
  }

  [data-theme='dark'] body.desktop-cart-mode #panel-cart .dashboard-side-link.is-active {
    background: #1f4d39;
    color: #e8fff1;
    box-shadow: inset 0 0 0 1px #2f6f53;
  }

  [data-theme='dark'] body.desktop-cart-mode #panel-cart .dashboard-side-link.is-active .dashboard-side-link-icon .icon-sm {
    color: #7ee2a8;
  }

  [data-theme='dark'] body.desktop-cart-mode #panel-cart .dashboard-side-user {
    border-color: #31445d;
    background: #1b293a;
  }

  [data-theme='dark'] body.desktop-cart-mode #panel-cart .dashboard-side-user p {
    color: #e6f0fc;
    font-weight: 600;
  }

  [data-theme='dark'] body.desktop-cart-mode #panel-cart .dashboard-side-user-caret {
    border-color: #c7d5e8;
  }

  [data-theme='dark'] body.desktop-cart-mode #panel-cart .dashboard-side-user-menu-panel {
    background: #1b2a3c;
    border-color: #314960;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
  }

  [data-theme='dark'] body.desktop-cart-mode #panel-cart .dashboard-side-user-menu-item {
    color: #dbe8f8;
  }

  [data-theme='dark'] body.desktop-cart-mode #panel-cart .dashboard-side-user-menu-item:hover {
    background: #25384f;
  }

  [data-theme='dark'] body.desktop-cart-mode #panel-cart .inventory-page-actions .dashboard-hero-icon-btn {
    background: #1e2d41;
    border-color: #324862;
  }

  [data-theme='dark'] body.desktop-cart-mode #panel-cart .inventory-page-actions .dashboard-hero-notif-count {
    border-color: #1b2a3c;
  }

  [data-theme='dark'] body.desktop-cart-mode #panel-cart #cart-summary {
    color: #a9bdd4;
  }

  [data-theme='dark'] body.desktop-cart-mode #panel-cart .cart-view-tabs {
    border-bottom-color: #32475f;
  }

  [data-theme='dark'] body.desktop-cart-mode #panel-cart .cart-view-tabs .chip-btn {
    color: #b3c5d8;
  }

  [data-theme='dark'] body.desktop-cart-mode #panel-cart .cart-current-card,
  [data-theme='dark'] body.desktop-cart-mode #panel-cart .cart-group-card,
  [data-theme='dark'] body.desktop-cart-mode #panel-cart .dashboard-rail-card {
    background: #1b2a3c;
    border-color: #334a65;
  }

  [data-theme='dark'] .cart-sort-wrap {
    border-left-color: #334a65;
  }

  [data-theme='dark'] .cart-group-head {
    background: #1f3044;
  }

  [data-theme='dark'] .cart-group-tools {
    background: #1f3044;
    border-bottom-color: #2f4259;
  }

  [data-theme='dark'] .cart-group-tool-btn {
    border-color: #355274;
    color: #d5e2f1;
    background: #253a53;
  }

  [data-theme='dark'] body.desktop-cart-mode #panel-cart .cart-group-head,
  [data-theme='dark'] body.desktop-cart-mode #panel-cart .cart-group-card .list-item,
  [data-theme='dark'] body.desktop-cart-mode #panel-cart .cart-rail-total {
    border-color: #2f4259;
  }

  [data-theme='dark'] .badge.info {
    background: #243b58;
    border-color: #315077;
    color: #9fc5ff;
  }

  [data-theme='dark'] .cart-group-icon {
    background: #274435;
    color: #7be2a8;
  }

  [data-theme='dark'] .cart-group-count {
    background: #22354d;
    color: #9ec4ff;
  }

  [data-theme='dark'] .cart-group-caret {
    border-color: #c7d6e8;
  }

  [data-theme='dark'] .cart-category-icon {
    background: #24384f;
    color: #c8d8ee;
  }

  [data-theme='dark'] .cart-rail-highlight {
    background: #1f3b30;
    border-color: #2f5a46;
  }

  [data-theme='dark'] .cart-rail-link-btn {
    color: #7fdeb0;
  }
}

@media (min-width: 1200px) {
  body.desktop-notifications-mode .topbar,
  body.desktop-notifications-mode #app-user-card,
  body.desktop-notifications-mode #app-house-card,
  body.desktop-notifications-mode #main-nav {
    display: none !important;
  }

  body.desktop-notifications-mode {
    background: #f3f5f8;
  }

  body.desktop-notifications-mode .app-shell {
    width: min(1780px, 100%);
    max-width: none;
    padding: 0.65rem 0.9rem 1rem;
  }

  body.desktop-notifications-mode #app-area {
    gap: 0;
  }

  body.desktop-notifications-mode #panel-notifications {
    border: 1px solid #dfe6ef !important;
    background: #fff !important;
    box-shadow: 0 18px 38px rgba(21, 32, 49, 0.08) !important;
    border-radius: 26px !important;
    padding: 0 !important;
    overflow: hidden;
  }

  body.desktop-notifications-mode #panel-notifications .notifications-legacy {
    display: none !important;
  }

  body.desktop-notifications-mode #panel-notifications .expiry-desktop-shell {
    display: grid;
    grid-template-columns: 304px minmax(0, 1fr) 346px;
    gap: 0;
    min-height: calc(100vh - 2.7rem);
  }

  body.desktop-notifications-mode #panel-notifications .expiry-desktop-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
    border: 0;
    border-right: 1px solid #e7edf4;
    border-radius: 0;
    background: transparent;
    padding: 1.65rem 1.3rem 1.1rem;
  }

  body.desktop-notifications-mode #panel-notifications .dashboard-brand-block {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 0.75rem;
    align-items: center;
    padding: 0 0.18rem 1.25rem;
    border-bottom: 0;
    margin-bottom: 0;
  }

  body.desktop-notifications-mode #panel-notifications .dashboard-brand-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 15px;
    border: 1px solid #d4e8da;
    background: #eef9f1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #2aa154;
  }

  body.desktop-notifications-mode #panel-notifications .dashboard-brand-text h3 {
    font-size: 2.18rem;
    font-weight: 760;
    letter-spacing: -0.028em;
    line-height: 1.05;
  }

  body.desktop-notifications-mode #panel-notifications .dashboard-brand-text p {
    font-size: 1.08rem;
    margin-top: 0.28rem;
  }

  body.desktop-notifications-mode #panel-notifications .dashboard-side-nav {
    display: grid;
    gap: 0.38rem;
  }

  body.desktop-notifications-mode #panel-notifications .dashboard-side-link {
    min-height: 52px;
    border-radius: 13px;
    padding-inline: 0.9rem;
    color: #2f3c4b;
    font-weight: 540;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    border: 0;
    justify-content: flex-start;
    background: transparent;
  }

  body.desktop-notifications-mode #panel-notifications .dashboard-side-link .dashboard-side-link-icon .icon-sm {
    width: 1.04rem;
    height: 1.04rem;
    color: #4f5f71;
  }

  body.desktop-notifications-mode #panel-notifications .dashboard-side-link.is-active {
    background: #eef7f1;
    color: #228b4a;
  }

  body.desktop-notifications-mode #panel-notifications .dashboard-side-link.is-active .dashboard-side-link-icon .icon-sm {
    color: #1f8a4a;
  }

  body.desktop-notifications-mode #panel-notifications .dashboard-side-user-menu {
    margin-top: 0.42rem;
    position: sticky;
    top: 0.92rem;
    z-index: 3;
  }

  body.desktop-notifications-mode #panel-notifications .dashboard-side-user {
    border: 1px solid #e4e9f0;
    border-radius: 14px;
    padding: 0.74rem 0.82rem;
    display: grid;
    grid-template-columns: 36px 1fr 18px;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    list-style: none;
  }

  body.desktop-notifications-mode #panel-notifications .dashboard-side-user::-webkit-details-marker {
    display: none;
  }

  body.desktop-notifications-mode #panel-notifications .dashboard-side-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid #d7dde7;
    background: #f3f5f9;
    color: #546274;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 640;
    font-size: 0.93rem;
  }

  body.desktop-notifications-mode #panel-notifications .dashboard-side-user p {
    font-weight: 560;
    color: #2c3a49;
  }

  body.desktop-notifications-mode #panel-notifications .dashboard-side-user-caret {
    width: 0.55rem;
    height: 0.55rem;
    border-right: 1.8px solid #627286;
    border-bottom: 1.8px solid #627286;
    transform: rotate(45deg);
    justify-self: end;
    transition: transform 140ms ease;
  }

  body.desktop-notifications-mode #panel-notifications .dashboard-side-user-menu[open] .dashboard-side-user-caret {
    transform: rotate(-135deg);
    margin-top: 0.26rem;
  }

  body.desktop-notifications-mode #panel-notifications .dashboard-side-user-menu-panel {
    margin-top: 0.4rem;
    border: 1px solid #dfe7f1;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 20px rgba(15, 32, 52, 0.09);
    padding: 0.3rem;
    display: grid;
    gap: 0.16rem;
  }

  body.desktop-notifications-mode #panel-notifications .dashboard-side-user-menu-item {
    border: 0;
    border-radius: 10px;
    min-height: 39px;
    text-align: left;
    padding: 0.52rem 0.65rem;
    background: transparent;
    color: #253447;
    font: inherit;
  }

  body.desktop-notifications-mode #panel-notifications .dashboard-side-user-menu-item:hover {
    background: #f1f5fa;
  }

  body.desktop-notifications-mode #panel-notifications .expiry-desktop-main {
    padding: 1.85rem 1.4rem 1.25rem;
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 0.74rem;
  }

  .expiry-page-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
  }

  .expiry-page-title {
    font-size: clamp(2.25rem, 2.2vw, 2.8rem);
    letter-spacing: -0.03em;
    line-height: 1.05;
  }

  body.desktop-notifications-mode #panel-notifications .inventory-page-actions {
    display: flex;
    align-items: center;
    gap: 0.62rem;
  }

  body.desktop-notifications-mode #panel-notifications .inventory-page-actions .dashboard-hero-add-btn {
    min-height: 48px;
    padding-inline: 1.15rem;
    border-color: #24974e;
    background: #24974e;
    color: #fff;
    font-weight: 620;
    border-radius: 12px;
  }

  body.desktop-notifications-mode #panel-notifications .inventory-page-actions .dashboard-hero-icon-btn {
    width: 46px;
    min-width: 46px;
    height: 46px;
    min-height: 46px;
    border-radius: 999px;
    border-color: #dce5ef;
    background: #fff;
    padding: 0;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  body.desktop-notifications-mode #panel-notifications .inventory-page-actions .dashboard-hero-icon-btn [data-dashboard-icon] .icon-sm {
    width: 1.05rem;
    height: 1.05rem;
  }

  body.desktop-notifications-mode #panel-notifications .inventory-page-actions .dashboard-hero-notif-count {
    position: absolute;
    top: -5px;
    right: -3px;
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    padding: 0 0.32rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    background: #1f9c55;
    border: 2px solid #fff;
  }

  .expiry-tabs {
    display: flex;
    gap: 0.45rem;
    border-bottom: 1px solid #e8edf3;
    padding-bottom: 0.62rem;
  }

  .expiry-tabs .chip-btn {
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #5f6d7d;
    font-size: 1.04rem;
    padding: 0.5rem 1.02rem 0.72rem;
  }

  .expiry-tabs .chip-btn.is-active {
    color: #22914d;
    border-bottom: 3px solid #27a657;
    font-weight: 620;
  }

  .expiry-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 0.85rem;
    align-items: center;
  }

  .expiry-toolbar input[type='search'] {
    min-height: 52px;
    border-radius: 13px;
  }

  .expiry-toolbar .button {
    min-height: 52px;
    padding-inline: 1.12rem;
    border-radius: 13px;
  }

  .expiry-toolbar-btn .button-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.46rem;
  }

  .expiry-sort-caret {
    width: 0.5rem;
    height: 0.5rem;
    border-right: 1.8px solid currentColor;
    border-bottom: 1.8px solid currentColor;
    transform: rotate(45deg);
    margin-left: 0.18rem;
  }

  .expiry-groups {
    display: grid;
    gap: 1rem;
  }

  .expiry-group-card {
    border: 1px solid #e5ebf3;
    border-radius: 14px;
    background: #fff;
    overflow: visible;
  }

  .expiry-group-head {
    display: flex;
    align-items: center;
    gap: 0.46rem;
    justify-content: flex-start;
    padding: 0.86rem 1rem;
    border-bottom: 1px solid #ecf1f7;
    font-size: 1.13rem;
    font-weight: 660;
  }

  .expiry-group-head.expiry-danger { color: #e24343; }
  .expiry-group-head.expiry-warn { color: #e48a00; }
  .expiry-group-head.expiry-ok { color: #188647; }

  .expiry-group-table-head {
    display: grid;
    grid-template-columns: minmax(280px, 2.5fr) minmax(130px, 0.95fr) minmax(118px, 0.72fr) minmax(136px, 0.92fr) minmax(130px, 0.74fr);
    gap: 0.7rem;
    padding: 0.58rem 1rem;
    color: #6f7c8a;
    font-size: 0.9rem;
    border-bottom: 1px solid #edf2f7;
  }

  .expiry-item-row {
    display: grid;
    grid-template-columns: minmax(280px, 2.5fr) minmax(130px, 0.95fr) minmax(118px, 0.72fr) minmax(136px, 0.92fr) minmax(130px, 0.74fr);
    gap: 0.7rem;
    align-items: center;
    padding: 0.64rem 1rem;
    border-top: 1px solid #eef3f8;
    min-height: 78px;
  }

  .expiry-item-row:first-child { border-top: 0; }

  .expiry-col-food {
    display: flex;
    align-items: flex-start;
    gap: 0.72rem;
    min-width: 0;
  }

  .expiry-thumb {
    width: 44px !important;
    height: 44px !important;
    border-radius: 10px !important;
  }

  .expiry-col-qty,
  .expiry-col-date {
    display: grid;
    gap: 0.08rem;
  }

  .expiry-col-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.42rem;
    position: relative;
  }

  .expiry-col-actions .button {
    min-height: 38px;
    border-radius: 10px;
    padding-inline: 0.8rem;
  }

  .expiry-col-actions .item-menu-trigger {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 999px;
  }

  .expiry-desktop-rail {
    padding: 1.85rem 1.1rem 1.2rem 1rem;
    border-left: 1px solid #e7edf4;
    background: transparent;
    display: grid;
    align-content: start;
    gap: 0.95rem;
  }

  .expiry-summary-list {
    display: grid;
    gap: 0.5rem;
  }

  .expiry-summary-row,
  .expiry-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    min-height: 36px;
  }

  .expiry-summary-label {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: #2d3c4e;
  }

  .expiry-summary-icon {
    width: 1.55rem;
    height: 1.55rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .expiry-summary-icon [data-dashboard-icon] .icon-sm {
    width: 0.92rem;
    height: 0.92rem;
  }

  .expiry-summary-icon.is-danger {
    color: #df3e3e;
    background: #fff1ef;
  }

  .expiry-summary-icon.is-warn {
    color: #ea8a00;
    background: #fff6e8;
  }

  .expiry-summary-icon.is-info {
    color: #3180f7;
    background: #edf4ff;
  }

  .expiry-summary-icon.is-ok {
    color: #219c55;
    background: #ecf8f0;
  }

  .expiry-summary-total {
    border-top: 1px solid #e9eff5;
    padding-top: 0.82rem;
  }

  .expiry-summary-total strong {
    font-size: 1.26rem;
    letter-spacing: -0.02em;
  }

  .expiry-summary-row:nth-child(1) strong { color: #d93c3c; }
  .expiry-summary-row:nth-child(2) strong { color: #e08800; }
  .expiry-summary-row:nth-child(3) strong { color: #2f7cf2; }
  .expiry-summary-row:nth-child(4) strong { color: #1f924f; }

  .expiry-tips-list {
    margin: 0;
    padding-left: 1rem;
    display: grid;
    gap: 0.4rem;
    color: #33475d;
  }

  .expiry-rail-link-btn {
    margin-top: 0.35rem;
    justify-content: flex-start;
    border: 0;
    padding-left: 0;
    color: #1e914c;
    font-weight: 620;
    background: transparent;
  }

  .expiry-rail-link-btn .icon-sm {
    transform: rotate(180deg);
  }

  .expiry-group-head h4 .hint {
    font-weight: 560;
    font-size: 0.98rem;
  }

  .expiry-col-date .inventory-expiry-date {
    font-size: 1.03rem;
    font-weight: 660;
  }

  .expiry-col-date .inventory-expiry-relative {
    font-size: 0.95rem;
    line-height: 1.2;
  }

  .expiry-col-qty .inventory-qty-value {
    font-size: 1.42rem;
    line-height: 1;
  }

  .expiry-col-qty .inventory-qty-unit {
    font-size: 0.98rem;
  }

  .expiry-item-row .inventory-title {
    font-size: 1.02rem;
    line-height: 1.2;
  }

  .expiry-item-row .inventory-brand {
    margin-top: 0.2rem;
  }

  .expiry-desktop-main > .row-inline {
    justify-content: center;
  }

  #expiry-show-more-btn {
    min-height: 46px;
    min-width: 230px;
    border-radius: 12px;
  }
}

@media (min-width: 1200px) {
  [data-theme='dark'] body.desktop-notifications-mode {
    background: #131923;
  }

  [data-theme='dark'] body.desktop-notifications-mode #panel-notifications {
    background: #172231 !important;
    border-color: #304055 !important;
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.42) !important;
  }

  [data-theme='dark'] body.desktop-notifications-mode #panel-notifications .expiry-desktop-sidebar,
  [data-theme='dark'] body.desktop-notifications-mode #panel-notifications .expiry-desktop-rail {
    border-color: #2d3d52;
  }

  [data-theme='dark'] body.desktop-notifications-mode #panel-notifications .dashboard-side-link {
    color: #d6e3f4;
  }

  [data-theme='dark'] body.desktop-notifications-mode #panel-notifications .dashboard-side-link.is-active {
    background: #1f4d39;
    color: #e8fff1;
    box-shadow: inset 0 0 0 1px #2f6f53;
  }

  [data-theme='dark'] body.desktop-notifications-mode #panel-notifications .dashboard-side-link.is-active .dashboard-side-link-icon .icon-sm {
    color: #7ee2a8;
  }

  [data-theme='dark'] body.desktop-notifications-mode #panel-notifications .dashboard-side-user {
    border-color: #31445d;
    background: #1b293a;
  }

  [data-theme='dark'] body.desktop-notifications-mode #panel-notifications .dashboard-side-user p {
    color: #e6f0fc;
    font-weight: 600;
  }

  [data-theme='dark'] body.desktop-notifications-mode #panel-notifications .dashboard-side-user-caret {
    border-color: #c7d5e8;
  }

  [data-theme='dark'] body.desktop-notifications-mode #panel-notifications .dashboard-side-user-menu-panel {
    background: #1b2a3c;
    border-color: #314960;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
  }

  [data-theme='dark'] body.desktop-notifications-mode #panel-notifications .dashboard-side-user-menu-item {
    color: #dbe8f8;
  }

  [data-theme='dark'] body.desktop-notifications-mode #panel-notifications .dashboard-side-user-menu-item:hover {
    background: #25384f;
  }

  [data-theme='dark'] body.desktop-notifications-mode #panel-notifications .expiry-tabs {
    border-bottom-color: #32475f;
  }

  [data-theme='dark'] body.desktop-notifications-mode #panel-notifications .inventory-page-actions .dashboard-hero-icon-btn {
    background: #1e2d41;
    border-color: #324862;
  }

  [data-theme='dark'] body.desktop-notifications-mode #panel-notifications .inventory-page-actions .dashboard-hero-notif-count {
    border-color: #1b2a3c;
  }

  [data-theme='dark'] body.desktop-notifications-mode #panel-notifications .expiry-tabs .chip-btn {
    color: #b3c5d8;
  }

  [data-theme='dark'] body.desktop-notifications-mode #panel-notifications .expiry-toolbar-btn .expiry-sort-caret {
    border-color: #c6d5e8;
  }

  [data-theme='dark'] body.desktop-notifications-mode #panel-notifications .expiry-group-card,
  [data-theme='dark'] body.desktop-notifications-mode #panel-notifications .dashboard-rail-card {
    background: #1b2a3c;
    border-color: #334a65;
  }

  [data-theme='dark'] body.desktop-notifications-mode #panel-notifications .expiry-group-table-head,
  [data-theme='dark'] body.desktop-notifications-mode #panel-notifications .expiry-item-row,
  [data-theme='dark'] body.desktop-notifications-mode #panel-notifications .expiry-group-head {
    border-color: #2f4259;
  }

  [data-theme='dark'] body.desktop-notifications-mode #panel-notifications .expiry-summary-label {
    color: #dbe8f7;
  }

  [data-theme='dark'] body.desktop-notifications-mode #panel-notifications .expiry-summary-icon.is-danger {
    background: #472728;
    color: #ff8d8d;
  }

  [data-theme='dark'] body.desktop-notifications-mode #panel-notifications .expiry-summary-icon.is-warn {
    background: #453622;
    color: #ffc46e;
  }

  [data-theme='dark'] body.desktop-notifications-mode #panel-notifications .expiry-summary-icon.is-info {
    background: #243b58;
    color: #8fbeff;
  }

  [data-theme='dark'] body.desktop-notifications-mode #panel-notifications .expiry-summary-icon.is-ok {
    background: #1f4531;
    color: #8ee3b2;
  }

  [data-theme='dark'] body.desktop-notifications-mode #panel-notifications .expiry-summary-total {
    border-top-color: #32465f;
  }

  [data-theme='dark'] body.desktop-notifications-mode #panel-notifications .expiry-summary-row:nth-child(1) strong { color: #ff8f8f; }
  [data-theme='dark'] body.desktop-notifications-mode #panel-notifications .expiry-summary-row:nth-child(2) strong { color: #ffc678; }
  [data-theme='dark'] body.desktop-notifications-mode #panel-notifications .expiry-summary-row:nth-child(3) strong { color: #96bfff; }
  [data-theme='dark'] body.desktop-notifications-mode #panel-notifications .expiry-summary-row:nth-child(4) strong { color: #8ee4b1; }

  [data-theme='dark'] body.desktop-notifications-mode #panel-notifications .expiry-rail-link-btn {
    color: #7fdeb0;
  }

  [data-theme='dark'] body.desktop-notifications-mode #panel-notifications .expiry-tips-list {
    color: #cadef2;
  }
}

@media (min-width: 1200px) {
  [data-theme='dark'] body.desktop-dashboard-mode {
    background: #131923;
  }

  [data-theme='dark'] body.desktop-dashboard-mode #panel-dashboard {
    background: #172231 !important;
    border-color: #304055 !important;
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.42) !important;
  }

  [data-theme='dark'] body.desktop-dashboard-mode #panel-dashboard .dashboard-desktop-sidebar {
    border-right-color: #2d3d52;
  }

  [data-theme='dark'] body.desktop-dashboard-mode #panel-dashboard .dashboard-side-link {
    color: #d6e3f4;
  }

  [data-theme='dark'] body.desktop-dashboard-mode #panel-dashboard .dashboard-side-link.is-active {
    background: #1f4d39;
    color: #e8fff1;
    box-shadow: inset 0 0 0 1px #2f6f53;
  }

  [data-theme='dark'] body.desktop-dashboard-mode #panel-dashboard .dashboard-side-link.is-active .dashboard-side-link-icon .icon-sm {
    color: #7ee2a8;
  }

  [data-theme='dark'] body.desktop-dashboard-mode #panel-dashboard .dashboard-side-promo,
  [data-theme='dark'] body.desktop-dashboard-mode #panel-dashboard .dashboard-rail-highlight {
    background: #1f3b30;
    border-color: #2f5a46;
  }

  [data-theme='dark'] body.desktop-dashboard-mode #panel-dashboard .dashboard-side-user {
    border-color: #31445d;
    background: #1b293a;
  }

  [data-theme='dark'] body.desktop-dashboard-mode #panel-dashboard .dashboard-side-user p {
    color: #e6f0fc;
    font-weight: 600;
  }

  [data-theme='dark'] body.desktop-dashboard-mode #panel-dashboard .dashboard-side-user-caret {
    border-color: #c7d5e8;
  }

  [data-theme='dark'] body.desktop-dashboard-mode #panel-dashboard .dashboard-side-user-menu-panel {
    background: #1b2a3c;
    border-color: #314960;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
  }

  [data-theme='dark'] body.desktop-dashboard-mode #panel-dashboard .dashboard-side-user-menu-item {
    color: #dbe8f8;
  }

  [data-theme='dark'] body.desktop-dashboard-mode #panel-dashboard .dashboard-side-user-menu-item:hover {
    background: #25384f;
  }

  [data-theme='dark'] body.desktop-dashboard-mode #panel-dashboard .dashboard-side-user-avatar {
    border-color: #38506b;
    background: #223348;
    color: #d6e5f8;
  }

  [data-theme='dark'] body.desktop-dashboard-mode #panel-dashboard .dashboard-hero-row .hint {
    color: #b5c6da;
  }

  [data-theme='dark'] body.desktop-dashboard-mode #panel-dashboard .dashboard-hero-icon-btn {
    background: #1e2d41;
    border-color: #324862;
  }

  [data-theme='dark'] body.desktop-dashboard-mode #panel-dashboard .dashboard-preview-card,
  [data-theme='dark'] body.desktop-dashboard-mode #panel-dashboard .dashboard-rail-card {
    background: #1b2a3c;
    border-color: #334a65;
  }

  [data-theme='dark'] body.desktop-dashboard-mode #panel-dashboard .dashboard-preview-table-head,
  [data-theme='dark'] body.desktop-dashboard-mode #panel-dashboard .dashboard-preview-row,
  [data-theme='dark'] body.desktop-dashboard-mode #panel-dashboard .dashboard-alert-row,
  [data-theme='dark'] body.desktop-dashboard-mode #panel-dashboard .dashboard-suggested-row {
    border-color: #2f4259;
  }
}

body.desktop-dashboard-mode #panel-dashboard .dashboard-brand-block.dashboard-brand-block-logo,
body.desktop-stock-mode #panel-stock .dashboard-brand-block.dashboard-brand-block-logo,
body.desktop-cart-mode #panel-cart .dashboard-brand-block.dashboard-brand-block-logo,
body.desktop-notifications-mode #panel-notifications .dashboard-brand-block.dashboard-brand-block-logo {
  display: block;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 0 0.18rem 1.05rem;
}

body.desktop-dashboard-mode #panel-dashboard .dashboard-brand-block.dashboard-brand-block-logo .dashboard-brand-logo-img,
body.desktop-stock-mode #panel-stock .dashboard-brand-block.dashboard-brand-block-logo .dashboard-brand-logo-img,
body.desktop-cart-mode #panel-cart .dashboard-brand-block.dashboard-brand-block-logo .dashboard-brand-logo-img,
body.desktop-notifications-mode #panel-notifications .dashboard-brand-block.dashboard-brand-block-logo .dashboard-brand-logo-img {
  width: min(100%, 250px);
  max-width: 100%;
  height: auto;
}

/* Unified desktop workspace: one persistent sidebar and one content width. */
@media (min-width: 1200px) {
  body.desktop-app-mode {
    background: #f3f5f8;
    overflow-y: scroll;
    scrollbar-gutter: stable;
  }

  body.desktop-app-mode .topbar,
  body.desktop-app-mode #app-user-card,
  body.desktop-app-mode #app-house-card,
  body.desktop-app-mode #main-nav {
    display: none !important;
  }

  body.desktop-app-mode .app-shell {
    width: min(1840px, 100%);
    max-width: none;
    padding: 0.85rem 0.95rem 1rem;
  }

  body.desktop-app-mode #app-area {
    margin-top: 0;
    display: grid;
    grid-template-columns: 302px minmax(0, 1fr);
    align-items: stretch;
    gap: 0;
  }

  body.desktop-app-mode #desktop-side-menu {
    grid-column: 1;
    grid-row: 1;
    align-self: stretch;
    display: flex !important;
    flex-direction: column;
    gap: 0.95rem;
    min-height: calc(100vh - 2.7rem);
    height: 100%;
    border: 1px solid #dfe6ef;
    border-right: 1px solid #e7edf4;
    border-radius: 28px 0 0 28px;
    background: #fff;
    box-shadow: 0 18px 38px rgba(21, 32, 49, 0.08);
    padding: 1.45rem 1.2rem 1.1rem;
    overflow: visible;
  }

  body.desktop-app-mode #desktop-side-menu .dashboard-brand-block {
    padding: 0 0.18rem 1.05rem;
    border-bottom: 0;
    margin-bottom: 0;
  }

  body.desktop-app-mode #desktop-side-menu .dashboard-brand-logo-img {
    width: min(100%, 250px);
    max-width: 100%;
    height: auto;
  }

  body.desktop-app-mode #desktop-side-menu .desktop-house-switcher {
    display: grid;
    gap: 0.38rem;
    padding: 0.76rem 0.72rem 0.82rem;
    border: 1px solid #e4e9f0;
    border-radius: 14px;
    background: #fbfcfd;
  }

  body.desktop-app-mode #desktop-side-menu .desktop-house-label {
    color: #6a7788;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
  }

  body.desktop-app-mode #desktop-side-menu .desktop-house-select {
    min-height: 42px;
    border-radius: 11px;
    background: #fff;
    color: #172337;
    font-weight: 620;
    padding: 0.56rem 0.72rem;
  }

  body.desktop-app-mode #desktop-side-menu .desktop-house-hint {
    color: #6b7889;
    font-size: 0.78rem;
    line-height: 1.25;
    min-height: 1em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.desktop-app-mode #desktop-side-menu .dashboard-side-nav {
    display: grid;
    gap: 0.3rem;
  }

  body.desktop-app-mode #desktop-side-menu .dashboard-side-link {
    min-height: 49px;
    border-radius: 13px;
    padding-inline: 0.82rem;
    color: #2f3c4b;
    font-weight: 530;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    border: 0;
    justify-content: flex-start;
    background: transparent;
  }

  body.desktop-app-mode #desktop-side-menu .dashboard-side-link .dashboard-side-link-icon .icon-sm {
    width: 1.04rem;
    height: 1.04rem;
    color: #4f5f71;
  }

  body.desktop-app-mode #desktop-side-menu .dashboard-side-link.is-active {
    background: #eef7f1;
    color: #228b4a;
  }

  body.desktop-app-mode #desktop-side-menu .dashboard-side-link.is-active .dashboard-side-link-icon .icon-sm {
    color: #1f8a4a;
  }

  body.desktop-app-mode #desktop-side-menu .dashboard-side-user-menu {
    margin-top: 0.28rem;
    position: relative;
    z-index: 3;
  }

  body.desktop-app-mode #desktop-side-menu .dashboard-side-user {
    border: 1px solid #e4e9f0;
    border-radius: 14px;
    padding: 0.74rem 0.82rem;
    display: grid;
    grid-template-columns: 36px 1fr 18px;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    list-style: none;
  }

  body.desktop-app-mode #desktop-side-menu .dashboard-side-user::-webkit-details-marker {
    display: none;
  }

  body.desktop-app-mode #desktop-side-menu .dashboard-side-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid #d7dde7;
    background: #f3f5f9;
    color: #546274;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 640;
    font-size: 0.93rem;
  }

  body.desktop-app-mode #desktop-side-menu .dashboard-side-user p {
    font-weight: 560;
    color: #2c3a49;
  }

  body.desktop-app-mode #desktop-side-menu .dashboard-side-user-caret {
    width: 0.55rem;
    height: 0.55rem;
    border-right: 1.8px solid #627286;
    border-bottom: 1.8px solid #627286;
    transform: rotate(45deg);
    justify-self: end;
    transition: transform 140ms ease;
  }

  body.desktop-app-mode #desktop-side-menu .dashboard-side-user-menu[open] .dashboard-side-user-caret {
    transform: rotate(-135deg);
    margin-top: 0.26rem;
  }

  body.desktop-app-mode #desktop-side-menu .dashboard-side-user-menu-panel {
    margin-top: 0.4rem;
    border: 1px solid #dfe7f1;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 20px rgba(15, 32, 52, 0.09);
    padding: 0.3rem;
    display: grid;
    gap: 0.16rem;
  }

  body.desktop-app-mode #desktop-side-menu .dashboard-side-user-menu-item {
    border: 0;
    border-radius: 10px;
    min-height: 39px;
    text-align: left;
    padding: 0.52rem 0.65rem;
    background: transparent;
    color: #253447;
    font: inherit;
  }

  body.desktop-app-mode #desktop-side-menu .dashboard-side-user-menu-item:hover {
    background: #f1f5fa;
  }

  body.desktop-app-mode #panel-dashboard .dashboard-desktop-shell > .dashboard-desktop-sidebar,
  body.desktop-app-mode #panel-stock .inventory-desktop-sidebar,
  body.desktop-app-mode #panel-cart .cart-desktop-sidebar,
  body.desktop-app-mode #panel-notifications .expiry-desktop-sidebar {
    display: none !important;
  }

  body.desktop-app-mode #app-area > article[id^='panel-'] {
    grid-column: 2;
    grid-row: 1;
    align-self: stretch;
    min-width: 0;
    min-height: calc(100vh - 2.7rem);
    border: 1px solid #dfe6ef !important;
    border-left: 0 !important;
    border-radius: 0 28px 28px 0 !important;
    background: #fff !important;
    box-shadow: 0 18px 38px rgba(21, 32, 49, 0.08) !important;
    padding: 1.45rem !important;
    overflow: hidden;
  }

  body.desktop-app-mode #panel-dashboard,
  body.desktop-app-mode #panel-stock,
  body.desktop-app-mode #panel-cart,
  body.desktop-app-mode #panel-notifications {
    padding: 0 !important;
  }

  body.desktop-app-mode #panel-dashboard .dashboard-desktop-shell {
    grid-template-columns: minmax(0, 1fr) 356px;
    gap: 0;
    min-height: calc(100vh - 2.7rem);
  }

  body.desktop-app-mode #panel-stock .inventory-desktop-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    min-height: calc(100vh - 2.7rem);
  }

  body.desktop-app-mode #panel-cart .cart-desktop-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 348px;
    gap: 0;
    min-height: calc(100vh - 2.7rem);
  }

  body.desktop-app-mode #panel-notifications .expiry-desktop-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 346px);
    gap: 0;
    min-height: calc(100vh - 2.7rem);
  }

  body.desktop-app-mode #panel-dashboard .dashboard-desktop-main,
  body.desktop-app-mode #panel-stock .inventory-desktop-main,
  body.desktop-app-mode #panel-cart .cart-desktop-main,
  body.desktop-app-mode #panel-notifications .expiry-desktop-main {
    padding: 1.85rem 1.45rem 1.25rem;
    min-width: 0;
  }

  body.desktop-app-mode #panel-notifications .expiry-page-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  body.desktop-app-mode #panel-notifications .expiry-page-head > div:first-child {
    min-width: 0;
  }

  body.desktop-app-mode #panel-notifications .inventory-page-actions {
    min-width: 0;
    max-width: 100%;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  body.desktop-app-mode #panel-notifications .inventory-page-actions .dashboard-hero-add-btn {
    white-space: nowrap;
  }

  body.desktop-app-mode #panel-dashboard .dashboard-desktop-rail,
  body.desktop-app-mode #panel-cart .cart-desktop-rail,
  body.desktop-app-mode #panel-notifications .expiry-desktop-rail {
    display: grid;
    align-content: start;
    gap: 0.95rem;
    padding: 1.85rem 1.1rem 1.2rem 1rem;
    border-left: 1px solid #e7edf4;
    background: transparent;
  }

  [data-theme='dark'] body.desktop-app-mode {
    background: #131923;
  }

  [data-theme='dark'] body.desktop-app-mode #desktop-side-menu,
  [data-theme='dark'] body.desktop-app-mode #app-area > article[id^='panel-'] {
    background: #172231 !important;
    border-color: #304055 !important;
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.42) !important;
  }

  [data-theme='dark'] body.desktop-app-mode #desktop-side-menu,
  [data-theme='dark'] body.desktop-app-mode #panel-dashboard .dashboard-desktop-rail,
  [data-theme='dark'] body.desktop-app-mode #panel-cart .cart-desktop-rail,
  [data-theme='dark'] body.desktop-app-mode #panel-notifications .expiry-desktop-rail {
    border-color: #2d3d52;
  }

  [data-theme='dark'] body.desktop-app-mode #desktop-side-menu .dashboard-side-link {
    color: #d6e3f4;
  }

  [data-theme='dark'] body.desktop-app-mode #desktop-side-menu .dashboard-side-link.is-active {
    background: #1f4d39;
    color: #e8fff1;
    box-shadow: inset 0 0 0 1px #2f6f53;
  }

  [data-theme='dark'] body.desktop-app-mode #desktop-side-menu .dashboard-side-link.is-active .dashboard-side-link-icon .icon-sm {
    color: #7ee2a8;
  }

  [data-theme='dark'] body.desktop-app-mode #desktop-side-menu .desktop-house-switcher {
    background: #1b293a;
    border-color: #31445d;
  }

  [data-theme='dark'] body.desktop-app-mode #desktop-side-menu .desktop-house-label,
  [data-theme='dark'] body.desktop-app-mode #desktop-side-menu .desktop-house-hint {
    color: #aebfd4;
  }

  [data-theme='dark'] body.desktop-app-mode #desktop-side-menu .desktop-house-select {
    background: #142032;
    border-color: #31445d;
    color: #e6f0fc;
  }

  [data-theme='dark'] body.desktop-app-mode #desktop-side-menu .dashboard-side-user {
    border-color: #31445d;
    background: #1b293a;
  }

  [data-theme='dark'] body.desktop-app-mode #desktop-side-menu .dashboard-side-user p {
    color: #e6f0fc;
    font-weight: 600;
  }

  [data-theme='dark'] body.desktop-app-mode #desktop-side-menu .dashboard-side-user-avatar {
    border-color: #38506b;
    background: #223348;
    color: #d6e5f8;
  }

  [data-theme='dark'] body.desktop-app-mode #desktop-side-menu .dashboard-side-user-caret {
    border-color: #c7d5e8;
  }

  [data-theme='dark'] body.desktop-app-mode #desktop-side-menu .dashboard-side-user-menu-panel {
    background: #1b2a3c;
    border-color: #314960;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
  }

  [data-theme='dark'] body.desktop-app-mode #desktop-side-menu .dashboard-side-user-menu-item {
    color: #dbe8f8;
  }

  [data-theme='dark'] body.desktop-app-mode #desktop-side-menu .dashboard-side-user-menu-item:hover {
    background: #25384f;
  }
}
