:root {
  --bg: #f6f4ea;
  --panel: #ffffff;
  --ink: #191613;
  --muted: #6f6a61;
  --line: #e7dfc8;
  --brand: #231f20;
  --brand-strong: #231f20;
  --brand-ink: #231f20;
  --nav: #231f20;
  --nav-soft: #342f30;
  --soft: #f1f5f9;
  --warn: #fed7aa;
  --danger: #dc2626;
  --hot: #c2410c;
  --ok: #16a34a;
  --shadow: 0 14px 34px rgba(15, 23, 42, .09);
  --shadow-strong: 0 22px 55px rgba(15, 23, 42, .15);
  --glass: rgba(255, 255, 255, .82);
  --glow: rgba(35, 31, 32, .12);
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 8% 0%, rgba(35, 31, 32, .06), transparent 34%),
    radial-gradient(circle at 92% 4%, rgba(35, 31, 32, .10), transparent 30%),
    linear-gradient(180deg, #fffef7 0%, var(--bg) 48%, #faf8ed 100%);
  color: var(--ink);
  overflow-x: hidden;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.icon {
  width: 20px;
  height: 20px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
h1, h2, h3 { margin: 0; color: var(--ink); letter-spacing: -.01em; }
h1 { font-size: 34px; line-height: 1.1; }
h2 { font-size: 24px; }
h3 { font-size: 18px; }
p { margin: 8px 0 0; color: var(--muted); line-height: 1.55; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.hidden { display: none !important; }

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(180deg, #ffffff, #f4f6f9);
}
.login-card {
  width: min(460px, 100%);
  padding: 32px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.brand-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .08);
}
.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.brand-subtitle {
  margin-top: 4px;
  color: var(--brand-strong);
  font-weight: 900;
}
.field {
  display: grid;
  gap: 7px;
  margin: 14px 0;
}
.field span {
  font-size: 13px;
  color: #4b5563;
  font-weight: 700;
}
.check-field {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
  color: var(--ink);
  font-weight: 800;
}
.check-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}
input, select, textarea {
  width: 100%;
  border: 1px solid #d4e1e8;
  border-radius: 13px;
  padding: 12px 13px;
  background: rgba(255, 255, 255, .94);
  color: var(--ink);
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(35, 31, 32, .10), 0 10px 28px rgba(15, 23, 42, .08);
}
textarea { min-height: 96px; resize: vertical; }
#dbForm {
  align-items: start;
}
#dbForm .field {
  align-content: start;
}
#dbForm .db-unit-field,
#dbForm .pack-field {
  min-height: 74px;
}
#dbForm select,
#dbForm input {
  min-height: 44px;
}
.btn {
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 10px 15px;
  background: linear-gradient(135deg, #231f20, #3a3435);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(35, 31, 32, .18);
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}
.btn:hover {
  background: linear-gradient(135deg, #111, #2f2a2b);
  box-shadow: 0 14px 30px rgba(35, 31, 32, .24);
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0) scale(.98);
}
.btn.secondary {
  background: #fff;
  color: var(--ink);
  border-color: #e4dac0;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .06);
}
.btn.secondary:hover { background: #f8fafc; }
.btn.danger {
  background: var(--danger);
  color: #fff;
}
.btn.ghost {
  background: transparent;
  color: var(--brand);
  border-color: #d8dee8;
}
.btn.small {
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 13px;
}
.icon-btn {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  padding: 0;
}
.icon-btn.full {
  width: 100%;
}
.action-btn,
.print-full {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  white-space: nowrap;
}
.action-btn .icon,
.print-full .icon {
  width: 17px;
  height: 17px;
}
.page-head .action-btn {
  min-height: 44px;
  padding-inline: 16px;
}
.form-submit {
  width: 100%;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}
.form-submit:disabled {
  opacity: .72;
  cursor: wait;
}
.btn:disabled {
  opacity: .72;
  cursor: wait;
  transform: none;
}
.form-submit .icon {
  width: 18px;
  height: 18px;
}
.image-current {
  min-width: 0;
}
.image-current img,
.image-compare img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
}
.image-check-modal {
  max-width: 680px;
}
.image-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0;
}
.image-compare article {
  display: grid;
  gap: 8px;
}
.image-compare span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}
.image-check-actions {
  justify-content: flex-end;
}
.login-submit {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 6px;
}
.login-submit .icon {
  width: 18px;
  height: 18px;
}
.link-btn {
  width: 100%;
  margin-top: 12px;
  border: 0;
  background: transparent;
  color: var(--brand);
  font-weight: 800;
  text-align: center;
}
.link-btn:hover {
  color: var(--brand-strong);
  text-decoration: underline;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 5;
  width: 76px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 10px;
  background: var(--nav);
  color: #fff;
}
.nav-btn {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #9ca3af;
  font-size: 20px;
}
.nav-btn .icon {
  width: 22px;
  height: 22px;
}
.nav-btn.active {
  color: #231f20;
  background: var(--brand);
}
.nav-btn:hover {
  color: #fff;
  background: var(--nav-soft);
}
.spacer { flex: 1; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px 0 104px;
  background: rgba(255, 255, 255, .82);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 32px rgba(15, 23, 42, .06);
  backdrop-filter: blur(18px);
}
.topbar strong { display: block; }
.app-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.app-title img {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
}
.app-title > div {
  min-width: 0;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.attention-row {
  background: #fff7ed;
}
.dept-select,
.dept-pill {
  min-height: 42px;
  max-width: 220px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}
.dept-select {
  padding: 9px 34px 9px 12px;
}
.dept-pill {
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  color: #231f20;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.top-cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .92);
  color: var(--ink);
  box-shadow: 0 8px 18px rgba(15, 23, 42, .06);
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.top-cart:hover,
.top-cart.active {
  color: #fff;
  background: #231f20;
  border-color: #231f20;
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(35, 31, 32, .16);
}
.top-cart .icon {
  width: 21px;
  height: 21px;
}
.top-cart strong {
  position: absolute;
  top: -7px;
  right: -7px;
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 12px;
  line-height: 1;
}
.save-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--soft);
  color: #166534;
  border: 1px solid #bbf7d0;
  font-size: 12px;
  font-weight: 800;
}
.save-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
}
.user-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .9);
  color: var(--muted);
  box-shadow: 0 8px 18px rgba(15, 23, 42, .05);
  transition: transform .16s ease, box-shadow .16s ease;
}
.user-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(15, 23, 42, .09);
}
.user-menu {
  position: relative;
}
.user-pill {
  border: 1px solid var(--line);
}
.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  display: none;
  min-width: 220px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.user-dropdown.open {
  display: grid;
  gap: 4px;
}
.user-dropdown button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}
.user-dropdown button:hover {
  background: #f1f5f9;
}
.avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #231f20;
  color: #fff;
  font-weight: 900;
}

main {
  padding: 24px 26px 42px 100px;
}
.page-head {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}
.page-head p { max-width: 760px; }
.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin: 10px 0 14px;
}
.toolbar input, .toolbar select { max-width: 320px; }

.grid, .dashboard-grid, .shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.dashboard-grid {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
}
.tile, .panel, .card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.tile { padding: 20px; }
.tile.big {
  min-height: 138px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.metric {
  font-size: 44px;
  font-weight: 900;
  line-height: 1;
}
.muted { color: var(--muted); }
.status-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 22px;
}
.status-card {
  min-height: 142px;
  text-align: left;
  color: var(--ink);
  border-top: 5px solid var(--ok);
}
.status-card.warn {
  background: #fff7ed;
  border-top-color: var(--warn);
}
.status-card.hot {
  background: #c2410c;
  border-top-color: #9a3412;
  color: #fff;
}
.status-card.hot h3,
.status-card.hot p { color: #fff; }
.status-card.danger {
  background: #fee2e2;
  border-top-color: var(--danger);
}
.card {
  padding: 18px;
  background: var(--glass);
  border: 1px solid rgba(203, 218, 226, .9);
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .07);
  backdrop-filter: blur(12px);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}
.location-card {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  align-content: start;
  gap: 14px;
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(248,253,253,.9)),
    radial-gradient(circle at 100% 0%, rgba(35, 31, 32, .06), transparent 38%);
  border: 1px solid rgba(229, 218, 181, .95);
  border-radius: 20px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .08);
  isolation: isolate;
  min-width: 0;
}
.location-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at top right, rgba(35, 31, 32, .08), transparent 42%);
}
.box-card::before {
  background: radial-gradient(circle at top right, rgba(17, 24, 39, .14), transparent 42%);
}
.location-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.location-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #231f20;
  background: linear-gradient(135deg, #ffffff, #f1f5f9);
  box-shadow: inset 0 0 0 1px rgba(35, 31, 32, .08), 0 8px 18px rgba(35, 31, 32, .10);
}
.box-card .location-icon {
  color: #111827;
  background: #eef2ff;
}
.location-icon .icon {
  width: 25px;
  height: 25px;
}
.location-card h3 {
  font-size: 23px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.location-card p {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
.location-stats {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-top: auto;
}
.location-stats.duo {
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.location-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  min-width: max-content;
}
.location-stats span {
  font-size: 42px;
  line-height: .9;
  font-weight: 900;
}
.location-stats small {
  color: var(--muted);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.card-actions {
  justify-content: flex-start;
  width: 100%;
  min-height: 44px;
  margin-top: auto;
  overflow: hidden;
  gap: 12px;
  padding-top: 4px;
}
.card-actions .btn.danger,
.actions .btn.danger {
  margin-left: 6px;
}
.card.clickable, .status-card.clickable {
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.card.clickable:hover, .status-card.clickable:hover {
  border-color: rgba(35, 31, 32, .28);
  box-shadow: var(--shadow-strong);
  transform: translateY(-3px);
}
.storage-list {
  grid-template-columns: 1fr;
}
.storage-list .location-card {
  min-height: 0;
  grid-template-columns: 54px minmax(180px, 1.4fr) minmax(160px, 1fr) minmax(130px, auto) auto;
  grid-template-rows: auto;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  background: rgba(255,255,255,.88);
}
.storage-list .location-card::before {
  background: linear-gradient(90deg, rgba(35, 31, 32, .08), transparent 42%);
}
.storage-list .location-top {
  display: contents;
}
.storage-list .location-icon {
  grid-column: 1;
}
.storage-list .location-top .badge {
  grid-column: 3;
  justify-self: start;
}
.storage-list .location-card h3 {
  grid-column: 2;
  font-size: 20px;
}
.storage-list .location-card p {
  grid-column: 3;
  color: var(--muted);
}
.storage-list .location-stats {
  grid-column: 4;
  margin-top: 0;
  justify-content: flex-end;
}
.storage-list .location-stats span {
  font-size: 30px;
}
.storage-list .card-actions {
  grid-column: 5;
  justify-content: flex-end;
  width: auto;
  min-height: 0;
  padding-top: 0;
  margin-top: 0;
  flex-wrap: nowrap;
}
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  background: #eef6f7;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tile,
.status-card,
.modal,
.box-info-panel,
.box-qr-panel,
.box-items,
.shop-category-drawer,
.product-card,
.cart-actions,
.list {
  backdrop-filter: blur(12px);
}
.tile,
.status-card {
  border: 1px solid rgba(205, 219, 226, .86);
  border-radius: 20px;
  background: rgba(255,255,255,.86);
  box-shadow: 0 12px 32px rgba(15, 23, 42, .07);
}
.status-card {
  overflow: hidden;
}
.status-card::after {
  content: "";
  position: absolute;
  inset: auto -20% -55% 35%;
  height: 120px;
  background: radial-gradient(circle, rgba(255,255,255,.45), transparent 65%);
  pointer-events: none;
}
.badge.admin { background: #f1f5f9; color: #231f20; }
.badge.warn { background: #fff7ed; color: #9a4f00; }
.badge.danger { background: #fef2f2; color: #b91c1c; }

.list {
  display: grid;
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(211, 225, 232, .92);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .07);
}
.row {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(220, 231, 236, .9);
  transition: background .16s ease, transform .16s ease;
}
.row > span {
  min-width: 0;
}
.item-row {
  grid-template-columns: minmax(220px, 1.6fr) minmax(190px, .9fr) minmax(170px, .85fr) minmax(96px, auto);
}
.item-row > span {
  min-width: 0;
}
.item-row > span:nth-child(2),
.item-row > span:nth-child(3) {
  align-self: center;
}
.item-row > span:nth-child(2) {
  justify-self: stretch;
}
.item-row .actions {
  justify-self: end;
  white-space: nowrap;
}
.stock-info {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}
.stock-thumb {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid #e1e7ee;
  border-radius: 12px;
  background: #fff;
  object-fit: contain;
  padding: 4px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, .06);
}
.image-preview-trigger {
  cursor: zoom-in;
}
.image-preview-trigger:hover {
  border-color: #f2d400;
  box-shadow: 0 0 0 3px rgba(242, 212, 0, .18), 0 10px 22px rgba(15, 23, 42, .10);
}
.stock-thumb.placeholder {
  color: #8a94a3;
  background: #f8fafc;
}
.stock-thumb.placeholder .icon {
  width: 20px;
  height: 20px;
}
.row:last-child { border-bottom: 0; }
.row.clickable:hover {
  background: linear-gradient(90deg, rgba(20,184,166,.08), rgba(255,255,255,.9));
}
.row.header {
  background: linear-gradient(135deg, #f8fafc, #eff8f8);
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, .42);
}
.modal {
  width: min(880px, 100%);
  max-height: min(860px, 92vh);
  overflow: auto;
  background: rgba(255, 255, 255, .96);
  border: 1px solid rgba(219, 232, 238, .95);
  border-radius: 22px;
  box-shadow: 0 30px 90px rgba(15, 23, 42, .28);
  padding: 24px;
  animation: modalPop .18s ease;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
}
.full { grid-column: 1 / -1; }
.qr {
  display: grid;
  grid-template-columns: repeat(21, 7px);
  grid-auto-rows: 7px;
  gap: 1px;
  width: max-content;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.qr i { display: block; width: 7px; height: 7px; background: #fff; }
.qr i.on { background: #000; }
.qr-card {
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 14px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid var(--line);
}
.qr-svg {
  width: 190px;
  height: 190px;
  display: block;
  background: #fff;
}
.box-detail {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 18px;
}
.box-page {
  display: grid;
  gap: 18px;
}
.box-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: stretch;
}
.box-hero.compact {
  gap: 10px;
}
.box-info-panel,
.box-qr-panel,
.box-items {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.box-info-panel {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 250px;
  padding: 22px;
}
.box-info-panel.compact {
  min-height: 0;
  grid-template-columns: auto minmax(180px, .9fr) minmax(220px, 1.4fr) auto;
  align-items: center;
  gap: 12px 18px;
  padding: 14px 16px;
}
.box-info-panel h2 {
  margin: 0;
  font-size: 34px;
}
.box-info-panel.compact h2 {
  font-size: 24px;
}
.box-info-panel p {
  margin: 0;
  color: var(--muted);
}
.box-meta {
  display: flex;
  gap: 10px 18px;
  flex-wrap: wrap;
  color: var(--muted);
  font-weight: 700;
}
.box-actions {
  margin-top: 8px;
}
.box-info-panel.compact .box-actions {
  margin-top: 0;
  justify-content: flex-end;
  flex-wrap: nowrap;
}
.box-qr-panel {
  display: grid;
  gap: 14px;
  justify-items: stretch;
  padding: 16px;
}
.box-qr-panel .qr-card {
  height: 100%;
}
.box-qr-panel .qr-card span {
  color: var(--muted);
  font-weight: 800;
}
.print-full { width: auto; }
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 18px 18px 0;
}
.section-title h2 {
  margin: 0;
}
.box-items .list {
  margin: 16px;
}
.tabs {
  display: flex;
  gap: 8px;
  margin: 10px 0 20px;
  flex-wrap: wrap;
}
.tab {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 9px 13px;
  font-weight: 800;
}
.tab.active {
  background: var(--nav);
  color: #fff;
  border-color: var(--nav);
}
.tab-count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #231f20;
  font-size: 12px;
}
.tab.active .tab-count {
  background: rgba(255,255,255,.18);
  color: #fff;
}
.product-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 7px;
  box-shadow: inset 0 0 0 5px #f8fafc;
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover .product-img,
.product-card:hover .product-img {
  transform: scale(1.025);
  box-shadow: inset 0 0 0 5px #f8fafc, 0 10px 22px rgba(15, 23, 42, .08);
}
.cart {
  position: sticky;
  bottom: 16px;
  margin-top: 22px;
  padding: 16px;
  background: var(--nav);
  color: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.cart h3 { color: #fff; }
.cart p { color: #d1d5db; }
.cart-page {
  display: grid;
  gap: 16px;
}
.cart-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.order-btn {
  min-width: 190px;
}
.order-checklist {
  margin: 16px 0;
}
.order-line {
  cursor: pointer;
  grid-template-columns: minmax(180px, 1.6fr) 44px minmax(58px, .5fr) minmax(70px, .7fr) auto;
}
.order-line em {
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
}
.order-image-modal {
  width: min(520px, 100%);
}
.order-image-modal img {
  width: 100%;
  max-height: 58vh;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
}
.order-image-modal p {
  color: var(--muted);
  font-weight: 800;
  margin-top: 12px;
}
.qty-stepper {
  display: grid;
  grid-template-columns: 34px minmax(30px, auto) 34px;
  align-items: center;
  justify-content: center;
  justify-items: center;
  gap: 8px;
  width: max-content;
  max-width: 100%;
  padding: 5px 7px;
  border: 1px solid #c9d8e4;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.7), 0 2px 8px rgba(15, 23, 42, .06);
  vertical-align: middle;
}
.row .qty-stepper {
  align-self: center;
  justify-self: center;
  margin-inline: auto;
}
.row > span:has(.qty-stepper) {
  display: flex;
  align-items: center;
  justify-content: center;
}
.qty-stepper strong {
  min-width: 30px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  color: var(--ink);
}
.qty-input {
  width: 54px;
  min-width: 54px;
  height: 34px;
  border: 1px solid #d7dee6;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 900;
  text-align: center;
  font-variant-numeric: tabular-nums;
  outline: none;
}
.qty-input:focus {
  border-color: #231f20;
  box-shadow: 0 0 0 3px rgba(35, 31, 32, .12);
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  margin: 0;
}
.role-badge {
  border: 1px solid transparent;
}
.role-badge.role-admin {
  background: #231f20;
  color: #fff;
  border-color: #231f20;
}
.role-badge.role-manager {
  background: #e0f2fe;
  color: #075985;
  border-color: #7dd3fc;
}
.role-badge.role-responsible {
  background: #ecfdf5;
  color: #047857;
  border-color: #86efac;
}
.role-badge.role-user {
  background: #f3f4f6;
  color: #374151;
  border-color: #d1d5db;
}
.qty-stepper .icon-btn {
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  border-radius: 999px;
  background: #fff;
  color: #231f20;
  border-color: #d7dee6;
}
.qty-stepper .icon-btn:hover {
  background: #231f20;
  color: #fff;
}
.row > .actions:has(.qty-stepper) {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  justify-items: center;
  column-gap: 12px;
}
.row > .actions:has(.qty-stepper) .qty-stepper {
  justify-self: center;
}
.check-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  color: var(--muted);
  font-weight: 800;
}
.check-cell input {
  width: 20px;
  height: 20px;
  accent-color: var(--brand);
}
.process-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 140px;
}
.process-btn .icon {
  width: 18px;
  height: 18px;
}
.cart-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  padding: 10px 14px;
  white-space: nowrap;
}
.cart-link .icon {
  width: 18px;
  height: 18px;
}
.cart-link strong {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(255,255,255,.22);
  color: inherit;
  font-size: 13px;
}
.empty {
  padding: 30px;
  text-align: center;
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  color: var(--muted);
}
.notice {
  margin: 12px 0;
  padding: 12px;
  border-radius: 12px;
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}
.backup-reminder {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  width: min(360px, calc(100vw - 44px));
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(35, 31, 32, .14);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(248, 250, 252, .96));
  box-shadow: 0 18px 45px rgba(15, 23, 42, .18);
}
.backup-reminder strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
}
.backup-reminder p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.backup-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.json-editor {
  min-height: 520px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre;
}
.autocomplete-wrap { position: relative; }
.suggestions {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: calc(100% - 4px);
  display: grid;
  gap: 4px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.suggestions:empty {
  display: none;
}
.suggestions.scrollable {
  max-height: 174px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.suggestion {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 9px;
  text-align: left;
  background: transparent;
  color: var(--ink);
}
.suggestion:hover { background: #f1f5f9; }
.suggestion.best {
  background: #f8fafc;
}
.suggestion.best:hover {
  background: #eef2f7;
}
.suggestion.add-suggestion {
  background: rgba(242, 212, 0, .18);
  border: 1px dashed rgba(35, 31, 32, .22);
}
.suggestion span {
  color: var(--muted);
  font-weight: 700;
}
.stock-db-preview:empty {
  display: none;
}
.selected-db-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid rgba(242, 212, 0, .46);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(242, 212, 0, .15), rgba(255, 255, 255, .95));
}
.selected-db-item > div {
  min-width: 0;
  display: grid;
  gap: 5px;
}
.selected-db-thumb {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: contain;
  background: #fff;
  border: 1px solid rgba(35, 31, 32, .1);
  padding: 5px;
}
.selected-db-thumb.placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
}
.selected-db-item strong {
  color: var(--ink);
  min-width: 0;
  overflow-wrap: anywhere;
}
.selected-db-item span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.selected-db-item em {
  width: max-content;
  max-width: 100%;
  border-radius: 999px;
  background: #171315;
  color: #fff;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 10px;
}
.stock-variant-fields {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(35, 31, 32, .1);
  border-radius: 14px;
  background: rgba(248, 250, 252, .86);
}
.stock-variant-fields:empty {
  display: none;
}
.stock-variant-fields > strong {
  font-size: 13px;
  color: var(--ink);
}
.variant-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 640px) {
  .variant-grid {
    grid-template-columns: 1fr;
  }
}
.mobile-label { display: none; }

.shop-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}
.shop-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.shop-category {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}
.shop-shell {
  display: grid;
  gap: 12px;
}
.shop-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 42%);
  gap: 22px;
  align-items: center;
  min-height: 270px;
  margin-bottom: 18px;
  padding: 34px 36px;
  overflow: hidden;
  border: 1px solid rgba(191, 229, 232, .95);
  border-radius: 24px;
  background:
    radial-gradient(circle at 82% 42%, rgba(35, 31, 32, .06), transparent 28%),
    radial-gradient(circle at 10% 12%, rgba(35, 31, 32, .10), transparent 28%),
    linear-gradient(115deg, rgba(255,255,255,.96) 0%, #f8fafc 54%, #ffffff 100%);
  box-shadow: 0 18px 46px rgba(15, 23, 42, .09);
}
.shop-eyebrow {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.shop-hero h1 {
  max-width: 620px;
  font-size: 36px;
  line-height: 1.12;
}
.shop-hero p {
  max-width: 560px;
  font-size: 16px;
}
.shop-hero-art {
  position: relative;
  min-height: 210px;
}
.med-pack {
  position: absolute;
  border: 1px solid #dbe8ee;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 38px rgba(15, 23, 42, .10);
}
.med-pack-a {
  right: 10px;
  bottom: 20px;
  width: 190px;
  height: 120px;
}
.med-pack-a::after {
  content: "HVK";
  position: absolute;
  top: 18px;
  left: 18px;
  color: #231f20;
  font-size: 24px;
  font-weight: 900;
}
.med-pack-b {
  right: 165px;
  bottom: 35px;
  width: 94px;
  height: 130px;
  border-radius: 45px 45px 12px 12px;
}
.med-pack-b::before {
  content: "";
  position: absolute;
  top: -24px;
  left: 32px;
  width: 30px;
  height: 28px;
  border-radius: 8px 8px 0 0;
  background: #fff;
  border: 1px solid #dbe8ee;
}
.med-pack-c {
  right: 250px;
  bottom: 18px;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e9f8ff, #ffffff);
}
.shop-searchbar {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 760px;
  margin: 0 0 16px;
}
.shop-searchbar input {
  min-height: 48px;
  padding-right: 54px;
}
.shop-searchbar .icon {
  position: absolute;
  right: 16px;
  color: var(--brand);
}
.shop-hero .shop-searchbar {
  max-width: 620px;
  margin: 18px 0 0;
}
.shop-category-drawer {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  overflow: hidden;
}
.shop-category-drawer summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
  list-style: none;
}
.shop-category-drawer summary::-webkit-details-marker {
  display: none;
}
.shop-category-drawer summary::after {
  content: "⌄";
  color: #231f20;
  font-size: 18px;
  transition: transform .15s ease;
}
.shop-category-drawer[open] summary::after {
  transform: rotate(180deg);
}
.shop-category-drawer summary span {
  color: var(--muted);
  font-size: 13px;
}
.shop-category-drawer summary strong {
  flex: 1;
  text-align: right;
}
.shop-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0 12px 12px;
}
.shop-tab {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 8px 9px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
  font-size: 12px;
  line-height: 1.1;
  text-align: left;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.shop-tab-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shop-tab-count {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.shop-tab.active {
  background: linear-gradient(135deg, #231f20, #3a3435);
  border-color: #231f20;
  color: #fff;
}
.shop-tab.active .shop-tab-count {
  background: rgba(255,255,255,.18);
  color: #fff;
}
.shop-current {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(135deg, #fff, #f8fafc);
}
.shop-current strong {
  font-size: 17px;
}
.shop-current span {
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
}
.shop-section-title {
  padding: 0;
}
.product-card {
  position: relative;
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr) 156px;
  gap: 16px;
  align-items: stretch;
  background: linear-gradient(180deg, #fff, #fbfdff);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  overflow: hidden;
  isolation: isolate;
}
.product-card::after {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-125%) skewX(-14deg);
  background: linear-gradient(90deg, transparent 0%, rgba(35, 31, 32, .05) 22%, rgba(35, 31, 32, .14) 50%, rgba(35, 31, 32, .08) 74%, transparent 100%);
  filter: blur(1px);
}
.product-card .actions,
.product-buy {
  gap: 12px;
}
.product-card:hover {
  transform: translateY(-2px);
  border-color: #c9d5e3;
  box-shadow: 0 14px 32px rgba(15, 23, 42, .10);
}
.product-card.cart-added {
  animation: cartGlow 1.25s ease;
}
.product-card.cart-added::after {
  animation: cartSweep 1.25s ease;
}
.product-media {
  width: 136px;
  aspect-ratio: 1;
  align-self: center;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #fff;
}
.product-info h3 {
  margin-top: 4px;
  font-size: 20px;
}
.product-info h3 span {
  color: var(--muted);
  font-size: .9em;
  font-weight: 800;
}
.product-buy {
  display: grid;
  align-content: center;
  gap: 9px;
  justify-items: stretch;
  padding: 10px;
  border-radius: 13px;
  background: #f8fafc;
  border: 1px solid #edf2f7;
}
.product-buy .field {
  margin: 0;
}
.product-buy .icon-btn {
  width: 100%;
}
.add-cart-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  white-space: nowrap;
}
.add-cart-btn .icon {
  width: 18px;
  height: 18px;
}
.add-cart-btn.cart-added {
  animation: buttonGlow 1.25s ease;
}
@keyframes cartGlow {
  0% { box-shadow: 0 8px 22px rgba(15, 23, 42, .06); border-color: var(--line); }
  38% { box-shadow: 0 0 0 4px rgba(34, 197, 94, .12), 0 18px 38px rgba(22, 163, 74, .18); border-color: #22c55e; }
  100% { box-shadow: 0 8px 22px rgba(15, 23, 42, .06); border-color: var(--line); }
}
@keyframes cartSweep {
  0% { opacity: 0; transform: translateX(-125%) skewX(-14deg); }
  18% { opacity: 1; }
  72% { opacity: 1; transform: translateX(120%) skewX(-14deg); }
  100% { opacity: 0; transform: translateX(135%) skewX(-14deg); }
}
@keyframes buttonGlow {
  0% { background: #231f20; box-shadow: none; }
  40% { background: #231f20; color: #fff; box-shadow: 0 0 0 5px rgba(35, 31, 32, .12), 0 8px 22px rgba(35, 31, 32, .24); }
  100% { background: #231f20; box-shadow: none; }
}
.product-placeholder {
  display: grid;
  place-items: center;
  color: #94a3b8;
}
.product-placeholder .icon {
  width: 44px;
  height: 44px;
}

@keyframes modalPop {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes softFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.shop-hero-art .med-pack {
  animation: softFloat 5s ease-in-out infinite;
}
.shop-hero-art .med-pack-b {
  animation-delay: .5s;
}
.shop-hero-art .med-pack-c {
  animation-delay: 1s;
}

::selection {
  background: rgba(35, 31, 32, .16);
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(35, 31, 32, .45) transparent;
}
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-thumb {
  background: rgba(35, 31, 32, .35);
  border: 3px solid transparent;
  border-radius: 999px;
  background-clip: content-box;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

.card {
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(248,253,253,.9)),
    radial-gradient(circle at 100% 0%, rgba(35, 31, 32, .05), transparent 36%);
  border-color: rgba(229, 218, 181, .95);
  border-radius: 20px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .08);
}
.card:hover {
  border-color: rgba(35, 31, 32, .24);
  box-shadow: var(--shadow-strong);
}
.status-card {
  position: relative;
}
.panel,
.box-info-panel,
.box-items,
.shop-category-drawer,
.cart-actions {
  border-radius: 20px;
  border-color: rgba(211, 225, 232, .92);
  box-shadow: 0 14px 34px rgba(15, 23, 42, .08);
}
.nav-btn,
.icon-btn,
.shop-tab,
.top-cart,
.user-pill,
.product-card,
.location-card,
.row.clickable {
  will-change: transform;
}

.print-sheet {
  display: none;
}

@media (max-width: 940px) {
  .dashboard-grid, .status-row, .shop-layout, .box-hero { grid-template-columns: 1fr; }
  .box-detail { display: grid; }
  .cart { position: static; }
  main {
    padding: 20px 18px 36px 94px;
  }
  .grid, .dashboard-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
  }
  .shop-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .location-card {
    min-height: 220px;
    gap: 14px;
    padding: 20px;
  }
  .storage-list .location-card {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    grid-template-rows: auto auto auto;
    align-items: start;
    gap: 10px 12px;
    padding: 14px;
  }
  .storage-list .location-icon { grid-column: 1; grid-row: 1 / span 2; }
  .storage-list .location-card h3 { grid-column: 2; grid-row: 1; font-size: 20px; }
  .storage-list .location-top .badge { grid-column: 2; grid-row: 2; }
  .storage-list .location-card p { grid-column: 2 / -1; grid-row: 3; }
  .storage-list .location-stats { grid-column: 3; grid-row: 1 / span 2; }
  .storage-list .card-actions { grid-column: 1 / -1; grid-row: 4; justify-content: flex-start; flex-wrap: wrap; }
  .location-card h3 {
    font-size: 23px;
  }
  .location-stats span {
    font-size: 42px;
  }
  .card-actions .icon-btn {
    width: 40px;
    height: 40px;
  }
  .card-actions .action-btn {
    flex: 1 1 auto;
  }
  .shop-tabs {
    grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
  }
  .shop-hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 28px;
  }
  .shop-hero-art {
    display: none;
  }
  .product-card {
    grid-template-columns: 112px minmax(0, 1fr) 138px;
  }
  .product-media {
    width: 112px;
  }
}
@media (max-width: 760px) {
  .sidebar {
    inset: auto 0 0 0;
    width: auto;
    height: 58px;
    flex-direction: row;
    overflow-x: auto;
    padding: 6px 8px;
  }
  .nav-btn {
    min-width: 42px;
    width: 42px;
    height: 42px;
  }
  .topbar {
    height: 56px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 0 10px;
  }
  .app-title {
    min-width: 0;
    gap: 8px;
  }
  .app-title img {
    width: 34px;
    height: 34px;
  }
  .app-title .muted {
    display: none;
  }
  .app-title strong {
    font-size: 15px;
    line-height: 1;
  }
  .topbar-right {
    min-width: 0;
    gap: 6px;
    justify-content: flex-end;
  }
  main {
    padding: 14px 10px 72px;
  }
  .page-head {
    display: grid;
    align-items: start;
    gap: 8px;
    margin-bottom: 12px;
  }
  .page-head h1 { font-size: 25px; }
  .page-head p { font-size: 13px; }
  .page-head .actions {
    width: 100%;
  }
  .page-head .actions .cart-link {
    width: 100%;
  }
  .form-grid { grid-template-columns: 1fr; }
  .form-submit {
    min-height: 52px;
    font-size: 15px;
  }
  .image-compare {
    grid-template-columns: 1fr;
  }
  .image-check-actions {
    flex-direction: column-reverse;
  }
  .image-check-actions .btn {
    width: 100%;
  }
  .toolbar input, .toolbar select { max-width: none; }
  .backup-reminder {
    right: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
  }
  .backup-actions .btn {
    flex: 1 1 140px;
  }
  .row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .order-line {
    grid-template-columns: 1fr auto auto;
  }
  .order-line .check-cell {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
  .row.header { display: none; }
  .mobile-label {
    display: inline;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
  }
  .actions { justify-content: flex-start; }
  .location-card {
    min-height: 220px;
    gap: 14px;
    padding: 20px;
  }
  .location-card h3 {
    font-size: 23px;
  }
  .location-stats span {
    font-size: 42px;
  }
  .card-actions .icon-btn {
    width: 40px;
    height: 40px;
  }
  .user-pill .muted, .save-pill { display: none; }
  .user-pill strong {
    display: none;
  }
  .dept-select,
  .dept-pill {
    max-width: 142px;
    min-height: 40px;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .user-dropdown {
    right: 0;
    min-width: 190px;
  }
  h1 { font-size: 26px; }
  .dashboard-grid,
  .status-row {
    grid-template-columns: 1fr;
    gap: 7px;
  }
  .dashboard-grid {
    margin-bottom: 8px;
  }
  .status-row {
    margin-top: 8px;
  }
  .tile.big,
  .status-card {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 15px;
  }
  .tile.big > div:first-child {
    min-width: 0;
  }
  .tile.big p,
  .status-card p {
    margin-top: 5px;
    font-size: 11px;
    line-height: 1.25;
  }
  .status-card h3 {
    font-size: 14px;
    line-height: 1.15;
  }
  .dashboard-grid .metric,
  .status-row .metric {
    grid-column: 2;
    grid-row: 1 / span 2;
    font-size: 30px;
  }
  .dashboard-grid .badge {
    padding: 4px 7px;
  }
  .dashboard-grid .badge .icon {
    width: 17px;
    height: 17px;
  }
  .toolbar {
    margin: 8px 0 10px;
  }
  .shop-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  .shop-tab {
    min-height: 34px;
    padding: 6px 8px;
    font-size: 11px;
  }
  .shop-current {
    padding: 8px 10px;
  }
  .shop-hero {
    padding: 22px 18px;
    border-radius: 14px;
  }
  .shop-hero h1 {
    font-size: 28px;
  }
  .product-card {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
    border-radius: 13px;
  }
  .product-media {
    width: 92px;
  }
  .product-info h3 {
    font-size: 16px;
  }
  .product-info p,
  .product-info .badge {
    font-size: 12px;
  }
  .product-buy {
    grid-column: 1 / -1;
    grid-template-columns: 1fr minmax(118px, auto);
    align-items: end;
    padding: 8px;
  }
  .add-cart-btn {
    min-height: 42px;
  }
  .cart-actions {
    justify-content: stretch;
    display: grid;
    grid-template-columns: 1fr auto;
  }
  .order-btn {
    min-width: 0;
  }
  .box-info-panel {
    min-height: 0;
    padding: 18px;
  }
  .box-info-panel.compact {
    grid-template-columns: 1fr;
    align-items: start;
    padding: 12px;
  }
  .box-info-panel h2 {
    font-size: 28px;
    overflow-wrap: anywhere;
  }
  .box-info-panel.compact h2 {
    font-size: 22px;
  }
  .box-info-panel.compact .badge {
    width: max-content;
  }
  .box-info-panel.compact .box-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 8px;
  }
  .box-info-panel.compact .box-actions .print-full {
    width: 100%;
  }
  .box-qr-panel {
    padding: 14px;
  }
  .box-qr-panel .qr-svg {
    width: min(220px, 70vw);
    height: min(220px, 70vw);
  }
  .box-items .list {
    margin: 12px;
  }
  .box-items .stock-row {
    display: grid;
    grid-template-columns: 66px minmax(0, 1fr) 66px;
    grid-template-rows: auto auto auto;
    align-items: stretch;
    gap: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid #e1e7ee;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    box-shadow: 0 12px 28px rgba(15, 23, 42, .10);
  }
  .box-items .stock-row > span:first-child {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    align-self: center;
    padding: 12px 74px 2px 12px;
  }
  .box-items .stock-row > span:first-child strong {
    font-size: 16px;
    line-height: 1.2;
  }
  .box-items .stock-row > span:nth-child(2) {
    display: contents;
  }
  .box-items .stock-row > span:nth-child(3) {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
    color: var(--muted);
    font-size: 13px;
    padding: 2px 12px 6px;
  }
  .box-items .stock-row > .actions {
    grid-column: 2;
    grid-row: 3;
    justify-content: flex-start;
    gap: 8px;
    padding: 0 12px 12px;
  }
  .box-items .stock-row .qty-stepper {
    display: contents;
    padding: 0;
    border: 0;
    box-shadow: none;
  }
  .box-items .stock-row .qty-stepper .icon-btn {
    width: 66px;
    height: 100%;
    min-width: 66px;
    min-height: 112px;
    border-radius: 0;
    color: #fff;
    background: #231f20;
    border-color: #231f20;
    box-shadow: none;
  }
  .box-items .stock-row .qty-stepper .icon-btn .icon {
    width: 28px;
    height: 28px;
    stroke-width: 3;
  }
  .box-items .stock-row .qty-stepper .icon-btn:first-child {
    grid-column: 1;
    grid-row: 1 / 4;
    background: #231f20;
    border-color: #231f20;
    border-radius: 20px 0 0 20px;
  }
  .box-items .stock-row .qty-stepper .icon-btn:last-child {
    grid-column: 3;
    grid-row: 1 / 4;
    border-radius: 0 20px 20px 0;
    color: #231f20;
    background: #f8fafc;
    border-color: #e1e7ee;
  }
  .box-items .stock-row .qty-stepper strong,
  .box-items .stock-row .qty-stepper .qty-input {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: start;
    width: 58px;
    min-width: 58px;
    height: auto;
    margin: 12px 12px 0 0;
    padding: 6px 10px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #cfd8e3;
    color: #231f20;
    font-size: 15px;
    line-height: 1;
  }
  .box-items .stock-row .stock-info {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 10px;
  }
  .box-items .stock-row .stock-thumb {
    width: 44px;
    height: 44px;
    border-radius: 11px;
  }
  .box-items .stock-row .mobile-label {
    display: none;
  }
}

@media (min-width: 481px) and (max-width: 760px) {
  .shop-grid {
    grid-template-columns: 1fr;
  }
  .product-card {
    grid-template-columns: 92px minmax(0, 1fr) 132px;
    align-items: stretch;
  }
  .product-buy {
    grid-column: auto;
    grid-template-columns: 1fr;
    align-content: center;
  }
}

@media (max-width: 480px) {
  main {
    padding-left: 8px;
    padding-right: 8px;
  }
  .app-title > div {
    display: none;
  }
  .app-title {
    flex: 0 0 auto;
  }
  .dept-select,
  .dept-pill {
    max-width: 136px;
    padding-left: 8px;
    padding-right: 8px;
  }
  .top-cart {
    width: 39px;
    height: 39px;
  }
  .user-pill {
    padding: 4px 6px;
  }
  .user-pill .avatar {
    margin: 0;
  }
  .avatar {
    width: 30px;
    height: 30px;
  }
  .grid, .dashboard-grid, .shop-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .dashboard-grid,
  .status-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .page-head:has(+ .dashboard-grid) {
    margin-bottom: 8px;
  }
  .page-head:has(+ .dashboard-grid) h1 {
    font-size: 22px;
  }
  .page-head:has(+ .dashboard-grid) p {
    display: none;
  }
  .tile.big,
  .status-card {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    border-radius: 14px;
  }
  .tile.big p,
  .status-card p {
    display: none;
  }
  .status-card h3 {
    font-size: 13px;
  }
  .dashboard-grid .metric,
  .status-row .metric {
    grid-column: 2;
    grid-row: 1 / span 2;
    font-size: 26px;
  }
  .status-row {
    margin-top: 7px;
  }
  .dashboard-grid .badge {
    max-width: 32px;
    height: 25px;
  }
  .location-card {
    min-height: 190px;
    gap: 12px;
    padding: 16px;
  }
  .storage-list .location-card {
    min-height: 0;
    padding: 12px;
  }
  .location-card h3 {
    font-size: 20px;
  }
  .location-stats span {
    font-size: 34px;
  }
  .storage-list .location-stats span {
    font-size: 28px;
  }
  .box-info-panel.compact .box-actions {
    grid-template-columns: 1fr 1fr;
  }
  .box-info-panel.compact .box-actions .action-btn,
  .box-info-panel.compact .box-actions .print-full {
    width: 100%;
    min-height: 46px;
  }
  .box-info-panel.compact .box-actions .icon-btn {
    width: 100%;
    min-height: 46px;
  }
  .box-items .stock-row {
    grid-template-columns: 58px minmax(0, 1fr) 58px;
    border-radius: 18px;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
  }
  .box-items .stock-row .qty-stepper .icon-btn {
    width: 58px;
    min-width: 58px;
    min-height: 108px;
  }
  .box-items .stock-row .qty-stepper .icon-btn:first-child {
    border-radius: 18px 0 0 18px;
  }
  .box-items .stock-row .qty-stepper .icon-btn:last-child {
    border-radius: 0 18px 18px 0;
  }
  .box-items .stock-row > span:first-child {
    padding-right: 68px;
  }
  .box-items .stock-row .stock-info {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 9px;
  }
  .box-items .stock-row .stock-thumb {
    width: 40px;
    height: 40px;
  }
  .product-card {
    grid-template-columns: 76px minmax(0, 1fr);
    padding: 9px;
  }
  .product-media {
    width: 76px;
  }
  .shop-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .shop-hero h1 {
    font-size: 24px;
  }
  .shop-tab {
    font-size: 10.5px;
  }
  .shop-tab-count {
    min-width: 24px;
    height: 20px;
  }
  .product-buy {
    grid-template-columns: 1fr;
  }
  .tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }
}

/* ShelveX premium interface refresh */
:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #2563eb;
  --brand-strong: #1d4ed8;
  --nav: #ffffff;
  --nav-soft: #eef4ff;
  --soft: #f8fafc;
  --shadow: 0 18px 45px rgba(15, 23, 42, .08);
  --shadow-strong: 0 24px 70px rgba(15, 23, 42, .16);
  --glass: rgba(255, 255, 255, .92);
}

body {
  background:
    radial-gradient(circle at 70% 0%, rgba(37, 99, 235, .10), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f5f7fb 46%, #eef2f7 100%);
}

.sidebar {
  width: 92px;
  padding: 18px 14px;
  background: rgba(255,255,255,.88);
  color: var(--ink);
  border-right: 1px solid var(--line);
  box-shadow: 10px 0 38px rgba(15, 23, 42, .05);
  backdrop-filter: blur(18px);
}
.nav-btn {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  color: #64748b;
}
.nav-btn.active {
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 14px 30px rgba(37, 99, 235, .28);
}
.nav-btn:hover {
  color: var(--brand);
  background: #eef4ff;
}
.topbar {
  height: 76px;
  padding-left: 122px;
  background: rgba(255,255,255,.86);
  border-bottom: 1px solid rgba(226,232,240,.9);
}
.app-title img {
  border-radius: 14px;
}
main {
  padding: 30px 32px 48px 124px;
}
.page-head {
  align-items: center;
  margin-bottom: 22px;
}
.page-head h1 {
  font-size: clamp(28px, 3vw, 42px);
  letter-spacing: -.035em;
}
.page-head p {
  margin-top: 6px;
  color: #64748b;
}
.btn {
  border-radius: 13px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 14px 28px rgba(37, 99, 235, .22);
}
.btn:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
}
.btn.secondary {
  background: #fff;
  border-color: #cbd5e1;
  color: #0f172a;
}
.icon-btn {
  border-radius: 13px;
}
.toolbar {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.82);
  box-shadow: 0 12px 34px rgba(15, 23, 42, .05);
}
.toolbar input,
.toolbar select {
  max-width: none;
  border-color: transparent;
  background: #f8fafc;
}

.dashboard-grid,
.status-row {
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  gap: 14px;
}
.tile,
.status-card,
.card,
.list,
.box-info-panel,
.box-items,
.shop-category-drawer,
.product-card {
  border-color: rgba(226,232,240,.95);
  border-radius: 20px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 16px 42px rgba(15, 23, 42, .07);
}
.tile.big {
  min-height: 118px;
  padding: 18px;
}
.metric {
  font-size: 38px;
}
.status-card {
  min-height: 118px;
  border-top: 0;
  border-left: 5px solid var(--ok);
}
.status-card.warn {
  background: #fff7ed;
}
.status-card.hot {
  background: #fb923c;
}
.status-card.danger {
  background: #fee2e2;
}

.storage-list {
  gap: 12px;
}
.storage-list .location-card {
  grid-template-columns: 56px minmax(180px, 1.15fr) minmax(170px, 1fr) minmax(120px, auto) minmax(120px, auto);
  min-height: 84px;
  border-radius: 20px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
}
.storage-list .location-card h3,
.storage-list .location-card p {
  white-space: normal;
  overflow-wrap: anywhere;
}
.location-icon {
  border-radius: 16px;
  color: #1d4ed8;
  background: #eef4ff;
  box-shadow: none;
}
.badge {
  border-radius: 999px;
  background: #eef4ff;
  color: #1d4ed8;
}
.card-actions {
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 8px;
  overflow: visible;
}
.card-actions .action-btn,
.card-actions .icon-btn {
  min-width: 42px;
  flex: 0 0 auto;
}

.storage-workspace {
  display: grid;
  grid-template-columns: minmax(320px, .82fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.storage-visual {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 16px;
  min-height: 560px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,250,252,.96)),
    radial-gradient(circle at 50% 24%, rgba(37,99,235,.10), transparent 34%);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.visual-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.visual-head span {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.visual-head strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 22px;
}
.visual-scene {
  min-height: 440px;
  display: grid;
  place-items: end center;
  perspective: 900px;
  background:
    linear-gradient(rgba(148,163,184,.13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148,163,184,.13) 1px, transparent 1px);
  background-size: 42px 42px;
  border-radius: 20px;
  overflow: hidden;
}
.visual-frame {
  width: min(92%, 440px);
  display: grid;
  gap: 18px;
  padding: 22px 22px 26px;
  border-left: 14px solid #1f2937;
  border-right: 14px solid #1f2937;
  border-bottom: 14px solid #111827;
  transform: rotateX(7deg);
  transform-origin: bottom;
  background: linear-gradient(90deg, #334155, #111827 6%, transparent 6% 94%, #111827 94%, #334155);
  box-shadow: 0 30px 45px rgba(15,23,42,.24);
}
.visual-shelf {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding-top: 12px;
  border-top: 14px solid #374151;
}
.visual-bin {
  min-height: 72px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(15,23,42,.22);
  border-radius: 6px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  box-shadow: inset 0 -10px 20px rgba(15,23,42,.18), 0 10px 18px rgba(15,23,42,.14);
}
.visual-bin.drawer {
  grid-column: span 2;
  background: linear-gradient(135deg, #2563eb, #1e3a8a);
}
.visual-bin.compartment {
  background: linear-gradient(135deg, #059669, #047857);
}
.visual-bin.box {
  background: linear-gradient(135deg, #b7791f, #92400e);
}
.visual-bin.empty {
  opacity: .22;
  background: #cbd5e1;
  box-shadow: none;
}
.visual-vehicle .visual-frame {
  border-radius: 42px 42px 18px 18px;
  border-color: #334155;
}
.visual-cabinet .visual-frame {
  background: linear-gradient(90deg, #475569, #1e293b 7%, rgba(255,255,255,.35) 7% 93%, #1e293b 93%, #475569);
}
.visual-legend {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.visual-legend span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
}

.stock-row {
  border-radius: 18px;
}
.stock-info {
  grid-template-columns: 52px minmax(0, 1fr);
}
.stock-thumb {
  width: 52px;
  height: 52px;
  border-radius: 14px;
}
.qty-input {
  background: #fff;
  color: #0f172a;
}

@media (max-width: 1100px) {
  .storage-workspace {
    grid-template-columns: 1fr;
  }
  .storage-visual {
    position: relative;
    top: auto;
    min-height: 420px;
  }
  .visual-scene {
    min-height: 300px;
  }
}

@media (max-width: 760px) {
  .sidebar {
    inset: auto 0 0 0;
    width: auto;
    height: 68px;
    flex-direction: row;
    justify-content: space-around;
    padding: 8px 10px;
    border-right: 0;
    border-top: 1px solid var(--line);
  }
  .nav-btn {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }
  .topbar {
    height: auto;
    min-height: 68px;
    padding: 10px 12px;
    gap: 10px;
    align-items: flex-start;
  }
  .app-title {
    max-width: calc(100vw - 142px);
  }
  .app-title .muted {
    display: block;
    max-width: 100%;
    white-space: normal;
    font-size: 11px;
    line-height: 1.25;
  }
  .topbar-right {
    gap: 6px;
  }
  main {
    padding: 18px 12px 92px;
  }
  .page-head {
    display: grid;
    gap: 12px;
  }
  .page-head .actions {
    justify-content: stretch;
  }
  .page-head .btn,
  .page-head .action-btn {
    width: 100%;
  }
  .dashboard-grid,
  .status-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .tile.big,
  .status-card {
    min-height: 72px;
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    align-items: center;
  }
  .metric {
    font-size: 30px;
  }
  .storage-list .location-card {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    grid-template-rows: auto auto auto;
    gap: 8px 12px;
  }
  .storage-list .location-card h3 {
    grid-column: 2 / 4;
  }
  .storage-list .location-card p,
  .storage-list .location-top .badge {
    display: none;
  }
  .storage-list .location-stats {
    grid-column: 2;
    justify-content: flex-start;
  }
  .storage-list .card-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(44px, 1fr));
    gap: 8px;
  }
  .storage-list .card-actions .action-btn,
  .storage-list .card-actions .icon-btn {
    width: 100%;
  }
  .storage-visual {
    min-height: 340px;
    padding: 12px;
  }
  .visual-scene {
    min-height: 240px;
  }
  .visual-frame {
    width: 96%;
    gap: 10px;
    padding: 16px;
  }
  .visual-bin {
    min-height: 48px;
    font-size: 12px;
  }
}

/* ShelveX HVK clean interface override */
:root {
  --bg: #f4f5f7;
  --panel: #ffffff;
  --ink: #171315;
  --muted: #6b6f76;
  --line: #e5e7eb;
  --brand: #f2d400;
  --brand-strong: #1f1b1d;
  --nav: #1f1b1d;
  --nav-soft: #2b2628;
  --soft: #f8f9fb;
  --shadow: 0 16px 40px rgba(23, 19, 21, .08);
  --shadow-strong: 0 24px 70px rgba(23, 19, 21, .16);
  --glass: rgba(255, 255, 255, .92);
}

body {
  color: var(--ink);
  background:
    radial-gradient(circle at 95% 0%, rgba(242, 212, 0, .14), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, #f4f5f7 48%, #eef0f3 100%);
}

::selection {
  color: #111;
  background: rgba(242, 212, 0, .32);
}

.sidebar {
  width: 90px;
  padding: 18px 12px;
  background: linear-gradient(180deg, #231f20 0%, #151214 100%);
  color: #fff;
  border-right: 0;
  box-shadow: 12px 0 40px rgba(23, 19, 21, .13);
}

.nav-btn {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  color: rgba(255,255,255,.72);
  background: transparent;
}

.nav-btn:hover,
.nav-btn.active {
  color: #171315;
  background: #f2d400;
  box-shadow: 0 14px 26px rgba(242, 212, 0, .25);
}

.topbar {
  height: 74px;
  padding-left: 122px;
  background: rgba(255,255,255,.90);
  border-bottom: 1px solid rgba(229,231,235,.9);
  backdrop-filter: blur(16px);
}

.app-title {
  min-width: 0;
}

.app-title img {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #f2d400;
  box-shadow: 0 10px 24px rgba(23, 19, 21, .12);
}

.app-title strong {
  letter-spacing: -.02em;
}

.app-title .muted,
.department-pill,
.topbar .muted {
  color: #6b6f76;
}

main {
  padding: 30px 32px 48px 122px;
}

.page-head {
  align-items: center;
  margin-bottom: 18px;
}

.page-head h1 {
  font-size: clamp(26px, 2.5vw, 38px);
  line-height: 1.05;
  letter-spacing: -.035em;
}

.page-head p {
  max-width: 760px;
  color: var(--muted);
}

.btn,
.action-btn.primary {
  border: 1px solid #171315;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, #2b2628, #171315);
  box-shadow: 0 12px 26px rgba(23, 19, 21, .18);
}

.btn:hover,
.action-btn.primary:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #171315, #000);
}

.btn.secondary,
.icon-btn,
.action-btn {
  border: 1px solid #d9dce2;
  color: #171315;
  background: #fff;
  box-shadow: 0 8px 18px rgba(23, 19, 21, .05);
}

.btn.secondary:hover,
.icon-btn:hover,
.action-btn:hover {
  border-color: #f2d400;
  background: #fffdf0;
}

.danger,
.action-btn.danger {
  color: #b91c1c;
  border-color: #fecaca;
  background: #fff;
}

.toolbar,
.shop-controls,
.database-controls {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.88);
  box-shadow: 0 12px 30px rgba(23, 19, 21, .05);
}

input,
select,
textarea,
.toolbar input,
.toolbar select {
  border-color: #dfe3e8;
  border-radius: 12px;
  background: #fff;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #f2d400;
  box-shadow: 0 0 0 4px rgba(242, 212, 0, .18);
}

.tile,
.status-card,
.card,
.list,
.box-info-panel,
.box-items,
.shop-category-drawer,
.product-card,
.modal {
  border: 1px solid rgba(229,231,235,.95);
  border-radius: 18px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 14px 36px rgba(23, 19, 21, .07);
}

.dashboard-grid,
.status-row {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.tile.big,
.status-card {
  min-height: 112px;
  padding: 18px;
}

.tile.big {
  position: relative;
  overflow: hidden;
}

.tile.big::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: #f2d400;
}

.metric {
  font-size: 36px;
  color: #171315;
}

.status-card.warn {
  background: #fffaf0;
  border-left: 5px solid #fdba74;
}

.status-card.hot {
  color: #171315;
  background: #ffedd5;
  border-left: 5px solid #f97316;
}

.status-card.hot h3,
.status-card.hot p,
.status-card.hot .metric {
  color: #171315;
}

.status-card.danger {
  background: #fef2f2;
  border-left: 5px solid #dc2626;
}

.status-card.danger h3,
.status-card.danger p,
.status-card.danger .metric {
  color: #171315;
}

.status-card.warn h3,
.status-card.warn p,
.status-card.warn .metric {
  color: #171315;
}

.badge {
  max-width: 100%;
  border: 1px solid #eceff3;
  border-radius: 999px;
  color: #3d3638;
  background: #f8f9fb;
}

.location-icon {
  border-radius: 15px;
  color: #171315;
  background: #f2d400;
  box-shadow: none;
}

.storage-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.storage-list .location-card {
  min-height: 86px;
  display: grid;
  grid-template-columns: 54px minmax(210px, 1fr) minmax(170px, .8fr) minmax(110px, auto) minmax(104px, auto);
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
}

.storage-list .location-card:not(.rack-card):not(.box-card) {
  grid-template-columns: 54px minmax(0, 1fr) auto;
}

.storage-list .location-card:not(.rack-card):not(.box-card) .location-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.storage-list .location-card:not(.rack-card):not(.box-card) .location-copy h3,
.storage-list .location-card:not(.rack-card):not(.box-card) .location-copy p {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.storage-list .location-card:not(.rack-card):not(.box-card) .location-copy p {
  color: var(--muted);
  font-size: 13px;
}

.storage-list .location-card:not(.rack-card):not(.box-card) .card-actions {
  grid-column: 3;
}

.storage-list .location-card h3,
.storage-list .location-card p {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

.storage-list .location-card h3 {
  font-size: 17px;
}

.storage-list .location-card p {
  color: var(--muted);
}

.location-top {
  min-width: 0;
}

.location-stats {
  justify-self: start;
  min-width: 96px;
  padding: 9px 12px;
  border: 1px solid #eceff3;
  border-radius: 14px;
  background: #fafafa;
}

.storage-list .location-stats small {
  letter-spacing: .02em;
  text-transform: none;
}

.location-stats span {
  color: #171315;
}

.card-actions {
  justify-self: end;
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
}

.card-actions .action-btn,
.card-actions .icon-btn {
  min-width: 42px;
  width: 42px;
  height: 42px;
  padding: 0;
  flex: 0 0 auto;
}

.card-actions .icon-btn {
  display: inline-grid;
  place-items: center;
}

.storage-list .location-card {
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
  touch-action: pan-y;
}

.storage-list .location-card .card-actions .danger {
  width: 42px;
  min-width: 42px;
  padding: 0;
  opacity: 1;
  pointer-events: auto;
  transform: none;
  overflow: visible;
  border-width: 1px;
  transition: width .18s ease, min-width .18s ease, opacity .18s ease, transform .18s ease, border-width .18s ease;
}

.storage-list .location-card.swipe-open {
  border-color: #fecaca;
  box-shadow: 0 16px 38px rgba(185, 28, 28, .12);
}

.storage-list .location-card.swipe-open .card-actions .danger {
  width: 42px;
  min-width: 42px;
  padding: 0;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
  border-width: 1px;
}

.storage-visual,
.storage-workspace,
.visual-head,
.visual-scene,
.visual-frame,
.visual-shelf,
.visual-bin,
.visual-legend {
  display: none !important;
}

.stock-row {
  border-radius: 16px;
  border: 1px solid #eceff3;
  background: #fff;
}

.item-row {
  position: relative;
  overflow: hidden;
}

.swipe-action {
  position: relative;
}

.swipe-action::after,
.swipe-action::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: min(42%, 150px);
  z-index: 4;
  display: none;
  place-items: center;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .02em;
  pointer-events: none;
  opacity: 0;
  transform: scaleX(calc(.72 + (var(--swipe-progress, 0) * .28)));
  transition: opacity .08s linear, transform .08s linear;
}

.swipe-action.swipe-preview-delete::after {
  content: "Verwijderen";
  right: 0;
  display: grid;
  opacity: calc(var(--swipe-progress, 0) * .92);
  transform-origin: right center;
  background: linear-gradient(90deg, rgba(220, 38, 38, .12), rgba(220, 38, 38, .88));
  border-radius: 0 18px 18px 0;
}

.swipe-action.swipe-preview-edit::before {
  content: "Wijzigen";
  left: 0;
  display: grid;
  opacity: calc(var(--swipe-progress, 0) * .92);
  transform-origin: left center;
  color: #171315;
  background: linear-gradient(90deg, rgba(242, 212, 0, .88), rgba(242, 212, 0, .10));
  border-radius: 18px 0 0 18px;
}

.swipe-action.swiping {
  transform: translateX(calc(var(--swipe-x, 0px) * .28));
  transition: none;
}

.item-row.cart-added {
  animation: cartGlow 1.25s ease;
}

.item-row.cart-added::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 44%;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(34, 197, 94, .22), transparent);
  animation: cartSweep 1.25s ease;
}

[data-order-db].cart-added {
  animation: buttonGlow 1.25s ease;
}

.stock-info {
  grid-template-columns: 54px minmax(0, 1fr);
}

.stock-thumb,
.product-image img,
.database-image img {
  border-radius: 14px;
  background: #fff;
  object-fit: contain;
}

.qty-input {
  width: 76px;
  min-width: 76px;
  color: #171315;
  background: #fff;
}

.qty-stepper {
  grid-template-columns: 34px minmax(76px, auto) 34px;
}

.qty-stepper strong {
  min-width: 76px;
}

.box-items .stock-row .qty-stepper .qty-input,
.box-items .stock-row .qty-stepper strong {
  width: 82px;
  min-width: 82px;
  box-sizing: border-box;
}

.product-card {
  overflow: hidden;
}

.product-card h3 {
  overflow-wrap: anywhere;
}

/* Consistent ShelveX wallpaper across every page */
body {
  background:
    radial-gradient(circle at 92% 0%, rgba(242, 212, 0, .10), transparent 28%),
    radial-gradient(circle at 10% 8%, rgba(23, 19, 21, .045), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #f4f5f7 48%, #eef0f3 100%) !important;
  background-attachment: fixed;
}

.shop-hero,
.database-shell,
.shop-shell,
.shop-current,
.shop-category-drawer,
.product-card,
.card,
.list,
.box-items,
.box-info-panel {
  background-color: rgba(255, 255, 255, .96);
}

.shop-hero {
  background:
    radial-gradient(circle at 82% 35%, rgba(23, 19, 21, .045), transparent 30%),
    linear-gradient(115deg, rgba(255,255,255,.97) 0%, #f8f9fb 58%, #ffffff 100%) !important;
  border-color: rgba(229,231,235,.95);
}

.database-shell,
.shop-shell {
  background: transparent !important;
}

.shop-current,
.shop-category-drawer {
  background: rgba(255,255,255,.96) !important;
}

.product-image {
  background: #fff;
  border-bottom: 1px solid #f0f1f3;
}

.cart-count {
  color: #171315;
  background: #f2d400;
}

@media (max-width: 1024px) {
  :is(
    [data-edit-db],
    [data-delete-db],
    [data-edit-user],
    [data-delete-user],
    [data-edit-stock],
    [data-remove-stock],
    [data-remove-cart]
  ) {
    display: none !important;
  }

  .swipe-action :is(
    [data-edit-location],
    [data-delete-location],
    [data-edit-rack],
    [data-delete-rack],
    [data-edit-box],
    [data-delete-box],
    [data-edit-db],
    [data-delete-db],
    [data-edit-user],
    [data-delete-user],
    [data-edit-stock],
    [data-remove-stock],
    [data-remove-cart]
  ) {
    display: none !important;
  }

  .storage-list .location-card .card-actions {
    display: none !important;
  }

  .storage-list .location-card {
    grid-template-columns: 54px minmax(0, 1fr) minmax(98px, auto);
    grid-template-rows: auto auto;
  }

  .storage-list .location-card:not(.rack-card):not(.box-card) {
    grid-template-columns: 54px minmax(0, 1fr) auto;
    grid-template-rows: auto;
  }

  .storage-list .location-card p,
  .storage-list .location-top .badge {
    display: none;
  }

  .storage-list .location-stats {
    grid-column: 3;
    grid-row: 1;
  }

  .storage-list .card-actions {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: flex-end;
  }

  .storage-list .location-card:not(.rack-card):not(.box-card) .card-actions {
    grid-column: 3;
    grid-row: 1;
    width: auto;
  }
}

@media (max-width: 760px) {
  body {
    background: #f4f5f7;
  }

  .sidebar {
    inset: auto 0 0 0;
    width: auto;
    height: 68px;
    flex-direction: row;
    justify-content: space-around;
    padding: 8px 10px;
    border-top: 1px solid rgba(255,255,255,.08);
    border-right: 0;
  }

  .nav-btn {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }

  .topbar {
    height: auto;
    min-height: 66px;
    padding: 9px 10px;
    gap: 8px;
  }

  .app-title {
    max-width: calc(100vw - 132px);
  }

  .app-title img {
    width: 34px;
    height: 34px;
    border-radius: 11px;
  }

  .app-title strong {
    font-size: 14px;
    line-height: 1.05;
  }

  .app-title .muted {
    display: block;
    max-width: 100%;
    overflow: hidden;
    font-size: 10px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .department-pill {
    max-width: 94px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  main {
    padding: 16px 10px 88px;
  }

  .page-head {
    display: grid;
    gap: 10px;
    margin-bottom: 12px;
  }

  .page-head h1 {
    font-size: 24px;
  }

  .page-head p {
    font-size: 13px;
  }

  .page-head .actions,
  .toolbar {
    width: 100%;
  }

  .page-head .btn,
  .page-head .action-btn {
    min-height: 44px;
  }

  .dashboard-grid,
  .status-row {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .tile.big,
  .status-card {
    min-height: 64px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: 12px 14px 12px 16px;
  }

  .metric {
    font-size: 28px;
  }

  .storage-list .location-card {
    grid-template-columns: 46px minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    gap: 8px;
    padding: 12px;
  }

  .storage-list .location-card:not(.rack-card):not(.box-card) {
    grid-template-columns: 46px minmax(0, 1fr) auto;
    grid-template-rows: auto;
  }

  .storage-list .location-card h3 {
    grid-column: 2 / 4;
    font-size: 16px;
  }

  .storage-list .location-card:not(.rack-card):not(.box-card) h3 {
    grid-column: 2;
  }

  .location-icon {
    width: 46px;
    height: 46px;
  }

  .location-stats {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
    justify-self: start;
    padding: 7px 10px;
  }

  .storage-list .card-actions {
    display: none !important;
  }

  .stock-row {
    overflow: hidden;
  }

  .box-items .stock-row {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    gap: 8px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 10px 24px rgba(23, 19, 21, .08);
    touch-action: pan-y;
  }

  .box-items .stock-row > span:first-child,
  .box-items .stock-row > span:nth-child(2),
  .box-items .stock-row > span:nth-child(3),
  .box-items .stock-row > .actions {
    grid-column: 1;
    grid-row: auto;
    min-width: 0;
    padding: 0;
  }

  .box-items .stock-row > span:nth-child(2) {
    display: flex;
    justify-content: stretch;
  }

  .box-items .stock-row > .actions .danger {
    display: none !important;
  }

  .box-items .stock-row .stock-info {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
  }

  .box-items .stock-row .stock-thumb {
    width: 46px;
    height: 46px;
    border-radius: 13px;
  }

  .box-items .stock-row .qty-stepper {
    display: grid;
    grid-template-columns: 48px minmax(86px, 1fr) 48px;
    width: 100%;
    gap: 0;
    padding: 0;
    border: 1px solid #e4e7ec;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: none;
  }

  .box-items .stock-row .qty-stepper .icon-btn,
  .box-items .stock-row .qty-stepper .icon-btn:first-child,
  .box-items .stock-row .qty-stepper .icon-btn:last-child {
    grid-column: auto;
    grid-row: auto;
    width: 48px;
    min-width: 48px;
    height: 48px;
    min-height: 48px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .box-items .stock-row .qty-stepper .icon-btn:first-child {
    color: #fff;
    background: #231f20;
  }

  .box-items .stock-row .qty-stepper .icon-btn:last-child {
    color: #171315;
    background: #f2d400;
  }

  .box-items .stock-row .qty-stepper .qty-input,
  .box-items .stock-row .qty-stepper strong {
    grid-column: auto;
    grid-row: auto;
    justify-self: stretch;
    align-self: stretch;
    width: 100%;
    min-width: 86px;
    height: 48px;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: #fff;
  }
}

/* Final wallpaper lock: dashboard background everywhere */
html,
body {
  background:
    radial-gradient(circle at 95% 0%, rgba(242, 212, 0, .055), transparent 30%),
    radial-gradient(circle at 8% 8%, rgba(23, 19, 21, .035), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f4f5f7 48%, #eef0f3 100%) !important;
  background-attachment: fixed;
}

main,
.shop-shell,
.database-shell,
.shop-grid,
.grid,
.shop-hero,
.shop-current,
.shop-category-drawer,
.list,
.box-items,
.box-items .list,
.database-category-drawer {
  background: transparent !important;
  box-shadow: none !important;
}

.product-card,
.card,
.toolbar {
  background: rgba(255, 255, 255, .96) !important;
}

.shop-hero {
  border-color: transparent !important;
}

.item-row,
.box-items .stock-row,
.list .row:not(.header) {
  background: rgba(255, 255, 255, .96) !important;
}

@media (hover: none), (max-width: 760px) {
  .nav-btn:hover:not(.active) {
    color: rgba(255,255,255,.72) !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .nav-btn.active {
    color: #171315 !important;
    background: #f2d400 !important;
    box-shadow: 0 10px 20px rgba(242, 212, 0, .22) !important;
  }
}

@media print {
  @page {
    size: A4;
    margin: 0;
  }
  html,
  body {
    width: 210mm;
    height: 297mm;
    margin: 0 !important;
    overflow: hidden !important;
  }
  body > *:not(#printSheet) {
    display: none !important;
  }
  #printSheet {
    width: 210mm;
    height: 297mm;
    min-height: 0;
    display: grid !important;
    place-items: center;
    background: #fff;
    page-break-before: avoid;
    page-break-after: avoid;
    page-break-inside: avoid;
    overflow: hidden;
  }
  .print-label {
    width: 82mm;
    height: 98mm;
    display: grid;
    place-items: center;
    text-align: center;
    border: 1.5px dashed #111827;
    border-radius: 5mm;
    padding: 6mm;
    color: #111827;
    font-family: Arial, sans-serif;
    page-break-inside: avoid;
    overflow: hidden;
  }
  .print-label h1 {
    margin: 0;
    max-width: 70mm;
    font-size: 16pt;
    line-height: 1.15;
    overflow-wrap: anywhere;
  }
  .print-rack {
    margin: 2mm 0 6mm;
    font-size: 11pt;
    font-weight: 700;
  }
  .print-code {
    margin-top: 6mm;
    font-size: 12pt;
    font-weight: 700;
    letter-spacing: .08em;
  }
  .print-label .qr {
    display: grid;
    grid-template-columns: repeat(21, 7px);
    grid-auto-rows: 7px;
    gap: 1px;
    width: max-content;
    padding: 0;
    border: 0;
    background: #fff;
  }
  .print-label .qr i {
    display: block;
    width: 7px;
    height: 7px;
    background: #fff;
  }
  .print-label .qr i.on {
    background: #000;
  }
  .print-label .qr-svg {
    width: 54mm;
    height: 54mm;
    display: block;
    background: #fff;
  }
}

/* Absolute final screen background override */
@media screen {
  html,
  body,
  #app {
    background: #f4f5f7 !important;
    background-image: none !important;
    background-attachment: scroll !important;
  }

  main,
  .shop-shell,
  .database-shell,
  .shop-current,
  .shop-category-drawer,
  .database-category-drawer,
  .list,
  .box-items,
  .box-items .list,
  .shop-grid,
  .grid {
    background: transparent !important;
    background-image: none !important;
  }

  .shop-hero {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 34%) !important;
    gap: 28px !important;
    align-items: center !important;
    background:
      radial-gradient(circle at 88% 20%, rgba(242, 212, 0, .26), transparent 30%),
      linear-gradient(115deg, rgba(255,255,255,.97) 0%, #fffdf1 48%, #ffffff 100%) !important;
    border: 1px solid rgba(229, 231, 235, .95) !important;
    box-shadow: 0 18px 46px rgba(15, 23, 42, .09) !important;
  }

  .shop-hero-art {
    position: relative !important;
    min-height: 210px !important;
    background: transparent !important;
    pointer-events: none;
  }

  .shop-hero-art .med-pack {
    background: #fff !important;
    background-image: none !important;
    opacity: .92;
    box-shadow: 0 14px 30px rgba(15, 23, 42, .09) !important;
  }

  .shop-hero-art .med-pack-a {
    right: 16px !important;
    bottom: 30px !important;
    width: 170px !important;
    height: 108px !important;
    z-index: 2;
  }

  .shop-hero-art .med-pack-a::after {
    content: "" !important;
  }

  .shop-hero-art .med-pack-b {
    right: 150px !important;
    bottom: 44px !important;
    width: 76px !important;
    height: 114px !important;
    z-index: 3;
  }

  .shop-hero-art .med-pack-b::before {
    left: 24px !important;
    width: 26px !important;
    height: 24px !important;
  }

  .shop-hero-art .med-pack-c {
    right: 228px !important;
    bottom: 38px !important;
    width: 70px !important;
    height: 70px !important;
    z-index: 1;
  }

  .shop-hero-art .med-pack-c {
    background: linear-gradient(135deg, rgba(242, 212, 0, .28), #ffffff) !important;
  }

  .shop-category-drawer {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(229, 231, 235, .95) !important;
    background: rgba(255, 255, 255, .88) !important;
    box-shadow: 0 10px 28px rgba(23, 19, 21, .06) !important;
  }

  .shop-category-drawer::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(105deg, transparent 0%, rgba(242, 212, 0, .14) 42%, rgba(255,255,255,.55) 50%, rgba(242, 212, 0, .10) 58%, transparent 100%);
    transform: translateX(-120%);
    animation: categoryLightSweep 5.5s ease-in-out infinite;
  }

  .shop-category-drawer summary,
  .shop-category-drawer .shop-tabs {
    position: relative;
    z-index: 1;
  }

  @keyframes categoryLightSweep {
    0%, 38% { transform: translateX(-120%); opacity: 0; }
    48% { opacity: 1; }
    68% { transform: translateX(120%); opacity: .9; }
    100% { transform: translateX(120%); opacity: 0; }
  }

  @media (max-width: 900px) {
    .shop-hero {
      grid-template-columns: 1fr !important;
      min-height: 0 !important;
      padding: 24px !important;
    }

    .shop-hero-art {
      display: none !important;
    }

    .shop-hero h1,
    .shop-hero p,
    .shop-hero .shop-searchbar {
      max-width: none !important;
    }
  }

  .tile,
  .status-card,
  .card,
  .product-card,
  .item-row,
  .stock-row,
  .list .row:not(.header),
  .toolbar,
  .box-info-panel,
  .modal {
    background: rgba(255, 255, 255, .96) !important;
    background-image: none !important;
  }

  .storage-list .location-card:not(.rack-card):not(.box-card) {
    grid-template-columns: 54px minmax(0, 1fr) auto !important;
    grid-template-rows: auto auto !important;
    column-gap: 14px !important;
    row-gap: 6px !important;
    align-items: center !important;
  }

  .storage-list .location-card:not(.rack-card):not(.box-card) .location-icon {
    grid-column: 1 !important;
    grid-row: 1 / span 2 !important;
  }

  .storage-list .location-card:not(.rack-card):not(.box-card) .location-copy {
    grid-column: 2 !important;
    grid-row: 1 / span 2 !important;
    min-width: 0 !important;
    width: 100% !important;
  }

  .storage-list .location-card:not(.rack-card):not(.box-card) .location-copy h3,
  .storage-list .location-card:not(.rack-card):not(.box-card) .location-copy p {
    grid-column: auto !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
  }

  .storage-list .location-card:not(.rack-card):not(.box-card) .card-actions {
    grid-column: 3 !important;
    grid-row: 2 !important;
    justify-self: end !important;
    align-self: end !important;
    width: auto !important;
  }

  .storage-list .rack-card {
    grid-template-columns: 54px minmax(0, 1fr) auto auto auto !important;
    grid-template-rows: auto auto !important;
    column-gap: 14px !important;
    row-gap: 6px !important;
    align-items: center !important;
  }

  .storage-list .rack-card .location-icon {
    grid-column: 1 !important;
    grid-row: 1 / span 2 !important;
  }

  .storage-list .rack-card .location-top .badge {
    grid-column: 3 !important;
    grid-row: 1 !important;
    justify-self: end !important;
    white-space: nowrap !important;
  }

  .storage-list .rack-card .location-copy {
    grid-column: 2 !important;
    grid-row: 1 / span 2 !important;
    min-width: 0 !important;
    width: 100% !important;
    display: grid !important;
    gap: 4px !important;
  }

  .storage-list .rack-card .location-copy h3,
  .storage-list .rack-card .location-copy p {
    grid-column: auto !important;
    margin: 0 !important;
    min-width: 0 !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
  }

  .storage-list .rack-card .location-copy p {
    color: var(--muted) !important;
    font-size: 13px !important;
  }

  .storage-list .rack-card .location-stats {
    grid-column: 4 !important;
    grid-row: 1 / span 2 !important;
    justify-self: end !important;
    align-self: center !important;
  }

  .storage-list .rack-card .card-actions {
    grid-column: 5 !important;
    grid-row: 1 / span 2 !important;
    justify-self: end !important;
    align-self: center !important;
    width: auto !important;
  }

  .storage-list .box-card {
    grid-template-columns: 54px minmax(0, 1fr) auto auto auto !important;
    grid-template-rows: auto auto !important;
    column-gap: 14px !important;
    row-gap: 6px !important;
    align-items: center !important;
  }

  .storage-list .box-card .location-icon {
    grid-column: 1 !important;
    grid-row: 1 / span 2 !important;
  }

  .storage-list .box-card .location-top .badge {
    grid-column: 3 !important;
    grid-row: 1 !important;
    justify-self: end !important;
    white-space: nowrap !important;
  }

  .storage-list .box-card .location-copy {
    grid-column: 2 !important;
    grid-row: 1 / span 2 !important;
    min-width: 0 !important;
    width: 100% !important;
    display: grid !important;
    gap: 4px !important;
  }

  .storage-list .box-card .location-copy h3,
  .storage-list .box-card .location-copy p {
    grid-column: auto !important;
    margin: 0 !important;
    min-width: 0 !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
  }

  .storage-list .box-card .location-copy p {
    color: var(--muted) !important;
    font-size: 13px !important;
  }

  .storage-list .box-card .location-stats {
    grid-column: 4 !important;
    grid-row: 1 / span 2 !important;
    justify-self: end !important;
    align-self: center !important;
  }

  .storage-list .box-card .card-actions {
    grid-column: 5 !important;
    grid-row: 1 / span 2 !important;
    justify-self: end !important;
    align-self: center !important;
    width: auto !important;
  }

  .database-shell .card .card-top {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) max-content !important;
    align-items: start !important;
    gap: 12px !important;
  }

  .database-shell .card .card-top > div {
    min-width: 0 !important;
  }

  .database-shell .card .card-top .badge {
    max-width: none !important;
    width: max-content !important;
    min-width: max-content !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
    justify-self: end !important;
    padding-inline: 12px !important;
  }
}

.tag-input {
  min-height: 50px;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  cursor: text;
}

.tag-list {
  display: contents;
}

.tag-chip {
  border: 1px solid rgba(242, 212, 0, .65);
  border-radius: 999px;
  background: rgba(242, 212, 0, .18);
  color: #171315;
  font-weight: 800;
  padding: 7px 10px;
  cursor: pointer;
}

.tag-input input {
  flex: 1 1 150px;
  min-width: 120px;
  border: 0;
  outline: 0;
  padding: 8px 4px;
  background: transparent;
}

.synonym-line {
  word-break: normal;
  overflow-wrap: anywhere;
}

.stock-group {
  display: grid;
  gap: 0;
  padding: 0;
  border: 1px solid rgba(35, 31, 32, .1);
  border-radius: 22px;
  background: rgba(255, 255, 255, .92);
  overflow: hidden;
  box-shadow: 0 18px 38px rgba(15, 23, 42, .08);
}

.stock-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
  background:
    radial-gradient(circle at 28px 22px, rgba(242, 212, 0, .34), transparent 28px),
    linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(248, 250, 252, .92));
}

.stock-group-head .stock-info {
  min-width: 0;
}

.stock-group-head .stock-info strong {
  display: inline-block;
  max-width: 100%;
  color: #171315;
  font-size: 15px;
  letter-spacing: -.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stock-group-head::-webkit-details-marker {
  display: none;
}

.stock-group-toggle {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #171315;
  color: #171315;
  font-size: 12px;
  font-weight: 900;
  padding: 8px 12px;
  color: #fff;
  box-shadow: 0 10px 22px rgba(23, 19, 21, .16);
}

.stock-group:not([open]) .stock-group-toggle {
  background: rgba(35, 31, 32, .08);
  color: #171315;
  box-shadow: none;
}

.stock-group:not([open]) .stock-group-toggle::before {
  content: "Openen";
  font-size: 12px;
}

.stock-group[open] .stock-group-toggle::before {
  content: "Inklappen";
  font-size: 12px;
}

.stock-group-toggle {
  font-size: 0;
}

.stock-subrows {
  display: grid;
  gap: 8px;
  padding: 10px 12px 12px;
  background:
    linear-gradient(90deg, transparent 0 33px, rgba(242, 212, 0, .28) 33px 35px, transparent 35px),
    rgba(248, 250, 252, .62);
}

.stock-subrow {
  margin-left: 48px;
  border: 1px solid rgba(35, 31, 32, .08) !important;
  border-radius: 16px;
  background:
    linear-gradient(90deg, rgba(242, 212, 0, .22), rgba(255, 255, 255, .98) 38%),
    #fff !important;
  margin-top: 0;
  box-shadow: inset 4px 0 0 rgba(242, 212, 0, .94), 0 10px 24px rgba(15, 23, 42, .055);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.stock-subrow:hover {
  transform: translateY(-1px);
  border-color: rgba(242, 212, 0, .7) !important;
  box-shadow: inset 4px 0 0 rgba(242, 212, 0, .94), 0 16px 30px rgba(15, 23, 42, .08);
}

.stock-subrow .stock-info {
  grid-template-columns: minmax(0, 1fr);
}

.variant-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  max-width: 100%;
  padding: 5px 11px 5px 5px;
  border: 1px solid rgba(242, 212, 0, .72);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 10px 20px rgba(15, 23, 42, .07);
}

.variant-chip b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #f2d400;
  color: #171315;
  font-size: 13px;
  line-height: 1;
}

.variant-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 950;
  color: #171315;
}

.sub-stock-text {
  display: block;
  margin-top: 7px;
  margin-left: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.stock-subrow > span:nth-child(3) {
  justify-self: start;
}

.stock-subrow > span:nth-child(3) .badge {
  margin-left: 6px;
}

.stock-subrow .actions {
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(35,31,32,.08);
  border-radius: 14px;
  padding: 4px;
  flex-wrap: nowrap;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .04);
}

.variant-qty-grid {
  display: grid;
  gap: 8px;
}

.variant-qty-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid rgba(35, 31, 32, .08);
  border-radius: 12px;
  background: #fff;
}

.variant-qty-row span {
  font-weight: 900;
}

.variant-qty-row input {
  min-height: 40px;
  text-align: center;
  font-weight: 900;
}

.modal .form-grid {
  gap: 10px 14px;
}

.modal .field span,
.modal .check-field span {
  margin-bottom: 5px;
}

.modal .form-submit {
  position: sticky;
  bottom: -24px;
  z-index: 2;
  margin-top: 4px;
  box-shadow: 0 -8px 22px rgba(255, 255, 255, .86);
}

.compact-stock-form {
  gap: 8px !important;
}

.compact-stock-form .form-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(35, 31, 32, .08);
  border-radius: 14px;
  background: rgba(248, 250, 252, .78);
}

.compact-stock-form .form-panel-inline {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.quick-stock-form .form-panel-inline {
  grid-template-columns: minmax(180px, 1.4fr) minmax(150px, 1fr) minmax(120px, .8fr) minmax(90px, .6fr);
}

.db-compact-form .form-panel-inline {
  grid-template-columns: minmax(180px, 1.4fr) minmax(150px, 1fr) minmax(120px, .8fr) minmax(90px, .6fr);
}

.db-compact-form .db-extra-panel {
  grid-template-columns: minmax(160px, .9fr) minmax(190px, 1fr) minmax(180px, 1fr);
  align-items: end;
}

.quick-stock-form .quick-variant-panel {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
}

.quick-stock-form .quick-variant-type,
.quick-stock-form .stock-main-qty {
  grid-column: span 1;
}

.quick-stock-form .compact-details {
  padding: 0;
  overflow: hidden;
}

.quick-stock-form .compact-details summary {
  cursor: pointer;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 900;
  color: var(--ink);
  list-style: none;
}

.quick-stock-form .compact-details summary::-webkit-details-marker {
  display: none;
}

.quick-stock-form .compact-details summary::after {
  content: "optioneel";
  float: right;
  color: var(--muted);
  font-size: 11px;
}

.quick-stock-form .compact-details[open] {
  padding: 0 10px 10px;
}

.db-compact-form .compact-details {
  padding: 0;
  overflow: hidden;
}

.db-compact-form .compact-details summary {
  cursor: pointer;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 900;
  color: var(--ink);
  list-style: none;
}

.db-compact-form .compact-details summary::-webkit-details-marker {
  display: none;
}

.db-compact-form .compact-details summary::after {
  content: "optioneel";
  float: right;
  color: var(--muted);
  font-size: 11px;
}

.db-compact-form .compact-details[open] {
  padding: 0 10px 10px;
}

.db-compact-form .db-orderable {
  min-height: 40px;
  align-items: center;
  padding: 8px 0;
}

.db-compact-form input[type="file"] {
  min-height: 40px;
  padding: 7px 10px;
  font-size: 13px;
}

.box-items .item-row {
  grid-template-columns: minmax(220px, 1.7fr) minmax(220px, .95fr) minmax(150px, .75fr) minmax(110px, auto) !important;
}

.box-items .item-row > span:nth-child(2) {
  justify-self: stretch !important;
}

.box-items .stock-row .qty-stepper {
  width: min(220px, 100%);
}

.sort-head {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  font: inherit;
  font-weight: 900;
  text-transform: inherit;
  letter-spacing: inherit;
  cursor: pointer;
}

.sort-head small {
  border-radius: 999px;
  background: rgba(242, 212, 0, .35);
  color: #171315;
  font-size: 10px;
  padding: 3px 7px;
}

.compact-stock-form .field span {
  font-size: 12px;
}

.compact-stock-form input,
.compact-stock-form select {
  min-height: 40px;
}

.compact-stock-form .tag-input {
  min-height: 42px;
  padding: 6px;
}

.compact-stock-form .tag-chip {
  padding: 5px 9px;
}

.compact-stock-form .selected-db-item {
  grid-template-columns: 50px minmax(0, 1fr);
  padding: 9px 10px;
}

.compact-stock-form .selected-db-thumb {
  width: 50px;
  height: 50px;
}

.compact-stock-form .stock-variant-fields {
  padding: 9px;
  gap: 7px;
}

.compact-stock-form .variant-qty-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.compact-stock-form .variant-qty-row {
  grid-template-columns: minmax(0, 1fr) 76px;
  padding: 7px 8px;
}

.compact-stock-form .variant-qty-row input {
  min-height: 36px;
}

.compact-stock-form .form-submit,
.compact-stock-form > .icon-btn.full {
  position: sticky;
  bottom: -24px;
  min-height: 46px;
  z-index: 3;
  box-shadow: 0 -10px 24px rgba(255, 255, 255, .92);
}

@media (max-width: 760px) {
  .stock-group {
    border-radius: 18px;
  }

  .stock-group-head {
    align-items: flex-start;
    padding: 12px;
  }

  .stock-subrows {
    gap: 9px;
    padding: 9px;
    background: rgba(248, 250, 252, .76);
  }

  .stock-subrow {
    margin-left: 0;
    box-shadow: inset 3px 0 0 rgba(242, 212, 0, .9), 0 8px 18px rgba(15, 23, 42, .045);
  }

  .stock-subrow .actions {
    justify-self: stretch;
  }

  .variant-chip {
    max-width: 100%;
  }

  .sub-stock-text {
    margin-left: 4px;
  }

  .variant-qty-row {
    grid-template-columns: minmax(0, 1fr) 88px;
  }

  .compact-stock-form .form-panel-inline,
  .compact-stock-form .variant-qty-grid,
  .quick-stock-form .quick-variant-panel,
  .db-compact-form .form-panel-inline,
  .db-compact-form .db-extra-panel {
    grid-template-columns: 1fr;
  }
}
