.hidden {
  display: none !important;
}

.min-h-screen {
  min-height: 100vh;
}

.grid {
  display: grid;
}

.place-items-center {
  place-items: center;
}

.boot-screen {
  min-height: 100vh;
  min-height: 100dvh;
  padding: max(16px, env(safe-area-inset-top, 0px)) 24px
    max(24px, env(safe-area-inset-bottom, 0px));
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(22, 137, 154, 0.08) 1px, transparent 1px) 0 0 /
      42px 42px,
    linear-gradient(0deg, rgba(22, 137, 154, 0.06) 1px, transparent 1px) 0 0 /
      42px 42px,
    #f4f7f8;
}

.boot-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    132deg,
    transparent 0%,
    transparent 46%,
    rgba(22, 137, 154, 0.08) 46%,
    rgba(22, 137, 154, 0.08) 64%,
    rgba(176, 122, 26, 0.08) 64%,
    rgba(176, 122, 26, 0.08) 100%
  );
  pointer-events: none;
}

.boot-screen__card {
  position: relative;
  z-index: 1;
  width: min(100%, var(--modal-max));
  padding: var(--phi-3) var(--phi-2);
  border-radius: var(--phi-1);
  border: 1px solid rgba(216, 222, 230, 0.9);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 48px rgba(16, 22, 35, 0.13);
  text-align: left;
}

@supports (backdrop-filter: blur(14px)) {
  .boot-screen__card {
    backdrop-filter: blur(14px);
  }
}

.boot-screen__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.boot-screen__logo {
  flex: 0 0 auto;
  display: block;
  width: 52px;
  height: 52px;
  margin: 0;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(22, 137, 154, 0.18);
}

.boot-screen__brand-copy {
  min-width: 0;
}

.boot-screen__brand-name {
  margin: 0;
  color: #16899a;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0;
}

.boot-screen__brand-sub {
  margin: 2px 0 0;
  color: #687386;
  font-size: 12px;
  line-height: 1.35;
}

.boot-screen__copy {
  margin-top: 22px;
}

.boot-screen__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.25;
  color: #182032;
}

.boot-screen__detail {
  margin: 7px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: #687386;
}

.boot-screen__progress {
  height: 6px;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5ecef;
}

.boot-screen__progress span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #16899a, #22a79d, #b07a1a);
  animation: boot-progress 1.35s ease-in-out infinite;
}

.boot-screen__status-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
  color: #4f5b6d;
  font-size: 12px;
  font-weight: 600;
}

.boot-screen__pulse {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #16899a;
  box-shadow: 0 0 0 0 rgba(22, 137, 154, 0.35);
  animation: boot-pulse 1.4s ease-out infinite;
}

.boot-screen__preview {
  display: grid;
  gap: 8px;
  margin-top: 20px;
}

.boot-screen__preview-row {
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(90deg, #eef4f5, #dfeaed, #eef4f5);
  background-size: 220% 100%;
  animation: boot-skeleton 1.6s ease-in-out infinite;
}

.boot-screen__preview-row:nth-child(2) {
  width: 86%;
  animation-delay: 0.12s;
}

.boot-screen__preview-row:nth-child(3) {
  width: 68%;
  animation-delay: 0.24s;
}

.boot-screen--error .boot-screen__progress,
.boot-screen--error .boot-screen__status-row,
.boot-screen--error .boot-screen__preview {
  display: none;
}

@keyframes boot-progress {
  0% {
    transform: translateX(-120%);
  }
  55%,
  100% {
    transform: translateX(260%);
  }
}

@keyframes boot-pulse {
  70% {
    box-shadow: 0 0 0 10px rgba(22, 137, 154, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(22, 137, 154, 0);
  }
}

@keyframes boot-skeleton {
  0% {
    background-position: 120% 0;
  }
  100% {
    background-position: -120% 0;
  }
}

.boot-screen__retry {
  width: 100%;
  margin-top: 18px;
  min-height: 44px;
  padding: 0 16px;
  border: none;
  border-radius: 8px;
  background: #16899a;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

@media (max-width: 480px) {
  .boot-screen {
    padding-right: 16px;
    padding-left: 16px;
  }

  .boot-screen__card {
    padding: 20px;
  }

  .boot-screen__title {
    font-size: 1.12rem;
  }
}

html {
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
}

body {
  touch-action: manipulation;
  overscroll-behavior-y: none;
}

input,
select,
textarea,
input.text-sm,
select.text-sm,
textarea.text-sm,
.qty-stepper input,
.modal-scroll input,
.modal-scroll select,
.modal-scroll textarea,
#app input,
#app select,
#app textarea,
#modal input,
#modal select,
#modal textarea {
  font-size: 16px !important;
  line-height: 1.25;
  -webkit-text-size-adjust: 100%;
}

.app-input {
  font-size: 16px !important;
}

.page-head__title {
  font-size: var(--font-lg);
  font-weight: 700;
  line-height: var(--phi);
  margin: 0;
}

.page-head__count {
  margin-left: 0.35em;
  font-weight: 700;
  color: var(--hex-primary);
  font-variant-numeric: tabular-nums;
}

.page-head__count::before {
  content: "(";
  font-weight: 600;
  color: var(--hex-muted-foreground);
}

.page-head__count::after {
  content: ")";
  font-weight: 600;
  color: var(--hex-muted-foreground);
}

.page-head--row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.page-head--with-back {
  gap: var(--phi-0);
}

.page-head--with-back .page-head__title {
  flex: 1;
  min-width: 0;
}

.page-head__back {
  display: none;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: var(--field-h);
  height: var(--field-h);
  padding: 0;
  border: 1px solid var(--hex-border);
  border-radius: var(--phi-0);
  background: var(--hex-card);
  color: var(--hex-foreground);
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    color 0.15s ease,
    background 0.15s ease;
}

@media (min-width: 1024px) {
  .page-head__back {
    display: inline-flex;
  }
}

.page-head__back:hover {
  border-color: color-mix(in srgb, var(--hex-primary) 35%, var(--hex-border));
  color: var(--hex-primary);
  background: color-mix(in srgb, var(--hex-primary) 6%, var(--hex-card));
}

.page-head__back .ui-icon {
  width: 18px;
  height: 18px;
}

.stat-card {
  padding: var(--phi-0) var(--phi-1) !important;
}

.stat-card__label {
  font-size: 13px;
  color: var(--hex-muted-foreground);
  line-height: 1.35;
}

.stat-card__value {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
  margin-top: var(--phi-neg-1);
}

.admin-action {
  min-height: var(--field-h);
  display: flex;
  align-items: center;
}

/* —— Catalog cards —— */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fill,
    minmax(calc(104px * var(--phi)), 1fr)
  );
  gap: var(--phi-2);
  padding: 16px;
  align-items: stretch;
}

.catalog-grid__empty,
.list-panel__empty,
.line-panel__empty {
  grid-column: 1 / -1;
}

.catalog-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 320px;
  border: 1px solid var(--hex-border);
  border-radius: 12px;
  background: var(--hex-card);
  box-shadow: 0 2px 8px rgba(16, 22, 35, 0.06);
  overflow: hidden;
  transition:
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.catalog-card:hover {
  box-shadow: 0 8px 24px rgba(16, 22, 35, 0.1);
}

.catalog-card__media {
  aspect-ratio: 1 / 1;
  width: 100%;
  flex-shrink: 0;
  background: var(--hex-secondary);
  overflow: hidden;
}

.catalog-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: var(--hex-secondary);
}

.catalog-card__media--avatar {
  display: grid;
  place-items: stretch;
}

.catalog-card__media--avatar .catalog-card__avatar.customer-card__avatar,
.catalog-card__media--avatar .catalog-card__avatar.customer-card__avatar-img {
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 0;
  object-fit: cover;
  display: block;
}

.catalog-card__media--avatar .catalog-card__avatar.customer-card__avatar {
  font-size: clamp(2.25rem, 10vw, 3.75rem);
  font-weight: 800;
  background: linear-gradient(
    145deg,
    var(--hex-primary),
    color-mix(in srgb, var(--hex-primary) 72%, #0a3040)
  );
  color: var(--hex-primary-foreground);
  box-shadow: none;
}

.catalog-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  min-height: 0;
}

.catalog-card__title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--hex-foreground);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-card__value {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--hex-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-card__split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.catalog-card__stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 8px;
  border-radius: 8px;
  background: var(--hex-secondary);
}

.catalog-card__stat--warn {
  background: var(--hex-warning-soft);
}

.catalog-card__stat--warn .catalog-card__stat-value {
  color: var(--hex-warning-text);
}

.catalog-card__stat-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--hex-muted-foreground);
  line-height: 1.2;
}

.catalog-card__stat-value {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--hex-foreground);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-card__meta {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  margin: 0;
  margin-top: auto;
  font-size: 11px;
  line-height: 1.35;
  color: var(--hex-muted-foreground);
  min-width: 0;
}

.catalog-card__meta > span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-card__meta--mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.01em;
}

.catalog-card__meta-icon {
  flex-shrink: 0;
  display: inline-flex;
  margin-top: 1px;
}

.catalog-card__meta-icon .customer-card__icon {
  width: 14px;
  height: 14px;
}

.catalog-card__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 12px 12px;
  margin-top: 0;
}

.catalog-card__actions--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.catalog-card__btn {
  min-height: 36px;
  padding: 0 8px;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: none !important;
}

.catalog-card__btn--edit,
.catalog-card__btn--ghost {
  background: var(--hex-secondary);
  color: var(--hex-foreground);
}

.catalog-card__btn--primary {
  background: var(--hex-primary);
  color: var(--hex-primary-foreground);
}

.catalog-card__btn--delete,
.catalog-card__btn--danger {
  background: var(--hex-danger);
  color: #fff;
}

.customer-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
}

.line-panel--customers .customer-list {
  direction: ltr;
  overflow-x: hidden;
  overflow-y: auto;
  max-height: calc(100svh - 13.5rem);
  scrollbar-gutter: stable;
  scrollbar-width: auto;
  scrollbar-color: var(--hex-primary) #e6e6e6;
}

.app-shell--bottom-nav .line-panel--customers .customer-list {
  max-height: calc(100svh - 16.5rem);
}

.line-panel--customers .customer-list > * {
  direction: ltr;
  flex-shrink: 0;
}

.line-panel--customers .customer-list::-webkit-scrollbar {
  width: 14px;
  -webkit-appearance: none;
}

.line-panel--customers .customer-list::-webkit-scrollbar-track {
  background: #e6e6e6;
}

.line-panel--customers .customer-list::-webkit-scrollbar-thumb {
  background: var(--hex-primary);
  border-radius: 8px;
  border: 2px solid #e6e6e6;
  min-height: 40px;
}

.line-panel--customers .customer-list::-webkit-scrollbar-thumb:window-inactive {
  background: var(--hex-primary);
}

.line-panel--customers .customer-list::-webkit-scrollbar-button:single-button {
  display: block;
  height: 16px;
  background-color: #e6e6e6;
  background-repeat: no-repeat;
  background-position: center;
}

.line-panel--customers
  .customer-list::-webkit-scrollbar-button:single-button:vertical:decrement {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'><polygon points='5,2 9,8 1,8' fill='%2316899a'/></svg>");
}

.line-panel--customers
  .customer-list::-webkit-scrollbar-button:single-button:vertical:increment {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'><polygon points='1,2 9,2 5,8' fill='%2316899a'/></svg>");
}

.store-rating-legend {
  display: none;
}

.store-rating {
  --store-rating-fill: linear-gradient(
    90deg,
    #fdf0f1 0%,
    #f4c4c6 22%,
    #e85a5e 48%,
    #e31e24 72%,
    #7b0005 100%
  );
  width: 100%;
  max-width: none;
  margin: 8px 0 0;
  padding: 0;
  direction: ltr;
}

.store-rating-field {
  width: 100%;
}

.store-rating-field .store-rating {
  margin-top: 0;
}

.store-rating--rail {
  position: relative;
  width: 100%;
  height: 18px;
  min-height: 18px;
  margin: 8px 0 2px;
  padding: 0;
  border-radius: 0;
  background: none;
  pointer-events: none;
}

.store-rating--rail:not(.store-rating--readonly) {
  pointer-events: auto;
}

.store-rating__track {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  top: 5px;
  height: 8px;
  border-radius: 2px;
  background: var(--store-rating-fill);
}

.store-rating__track::after {
  content: "";
  position: absolute;
  top: 50%;
  /* Хагас өргөнөөр нь дотогш татаж, 0 ба 100 дээр захаараа тасрахаас сэргийлнэ. */
  left: clamp(7px, var(--rating-pos, 50%), calc(100% - 7px));
  z-index: 2;
  width: 14px;
  height: 14px;
  transform: translate(-50%, -50%);
  background: #fff;
  border: 1.5px solid #333;
  border-radius: 2px;
  box-shadow: none;
  pointer-events: none;
}

.store-rating__ticks {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  width: 100%;
  height: auto;
  margin: 0;
  pointer-events: none;
  background: none;
}

.store-rating__ticks i {
  display: block;
  width: 1px;
  height: 100%;
  background: #c8c8c8;
  flex: 0 0 1px;
}

.store-rating__input {
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 3;
  box-sizing: border-box;
  width: 100%;
  height: 18px;
  margin: 0;
  padding: 0;
  opacity: 0;
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
}

.store-rating__input:disabled {
  cursor: default;
}

.store-rating__input::-webkit-slider-runnable-track,
.store-rating__input::-moz-range-track {
  background: transparent;
  border: none;
}

.store-rating__input::-webkit-slider-thumb,
.store-rating__input::-moz-range-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 18px;
  background: transparent;
  border: none;
  box-shadow: none;
}

.store-rating__bar,
.store-rating__marker,
.store-rating__value {
  display: none;
}

.perm-role-presets {
  padding: 12px 14px;
  border: 1px solid var(--hex-border);
  border-radius: 12px;
  background: var(--hex-card);
}

.perm-role-presets__label {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--hex-muted-foreground);
}

.perm-role-presets__row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.perm-role-presets__btn {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--hex-border);
  background: var(--hex-secondary);
  color: var(--hex-foreground);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.perm-role-presets__hint {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--hex-muted-foreground);
}

.customer-list__head {
  display: none;
}

.customer-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "head actions"
    "addr actions";
  gap: 6px 8px;
  align-items: start;
  flex-shrink: 0;
  min-height: auto;
  padding: 10px 8px 10px 0;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--hex-border);
  background: transparent;
}

.customer-card--active {
  margin: 4px 0;
  padding: 12px 10px 12px 12px;
  border-radius: 12px;
  border: 2px solid var(--hex-primary);
  border-bottom: 2px solid var(--hex-primary);
  background: color-mix(in srgb, var(--hex-primary) 14%, var(--hex-card));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--hex-primary) 18%, transparent);
  animation: customer-card-pulse 1.1s ease-in-out 2;
}

@keyframes customer-card-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 4px
      color-mix(in srgb, var(--hex-primary) 18%, transparent);
  }
  50% {
    box-shadow: 0 0 0 8px
      color-mix(in srgb, var(--hex-primary) 28%, transparent);
  }
}

.customer-card__head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  grid-area: head;
}

.customer-card__avatar-img {
  object-fit: cover;
  object-position: center;
  background: #fff;
  border: none;
  box-shadow: none;
  outline: none;
  border-radius: 0;
  width: 64px;
  height: 80px;
}

.customer-image-upload {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 14px;
  background: var(--hex-secondary);
}

.customer-image-upload__preview {
  flex-shrink: 0;
  width: 88px;
  height: 88px;
  border-radius: 14px;
  object-fit: cover;
  background: var(--hex-card);
  border: var(--thumb-border);
  box-shadow: var(--thumb-shadow);
}

.customer-image-upload__body {
  flex: 1;
  min-width: 0;
}

.customer-image-upload--stack {
  flex-direction: column;
  align-items: stretch;
}

.customer-image-upload--stack .customer-image-upload__preview {
  width: 100%;
  max-width: 220px;
  height: 140px;
  margin: 0 auto;
}

.customer-image-upload__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.customer-image-upload__pick {
  min-width: 132px;
}

.customer-image-upload__hint {
  margin: 10px 0 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--hex-muted-foreground);
}

.customer-detail {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.customer-detail__hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 16px;
  background: var(--hex-secondary);
}

.customer-detail__avatar,
.customer-detail__avatar.customer-card__avatar-img {
  flex-shrink: 0;
  width: var(--avatar-lg);
  height: var(--avatar-lg);
  border-radius: 0;
  object-fit: contain;
  object-position: center;
  border: none;
  box-shadow: none;
  background: transparent;
}

.customer-detail__avatar.customer-card__avatar {
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  font-weight: 800;
}

.customer-detail__hero-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.customer-detail__name {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.25;
}

.customer-detail__name-text {
  min-width: 0;
  flex: 1;
}

.customer-detail__company {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--hex-foreground);
}

.customer-detail__badge {
  display: inline-flex;
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--hex-primary);
  background: color-mix(in srgb, var(--hex-primary) 12%, transparent);
}

.customer-detail__panel {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 0;
}

.customer-detail__row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid
    color-mix(in srgb, var(--hex-border) 70%, transparent);
}

.customer-detail__row:last-of-type {
  border-bottom: 0;
}

.customer-detail__icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: var(--hex-muted-foreground);
}

.customer-detail__row-body {
  min-width: 0;
  flex: 1;
}

.customer-detail__label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--hex-muted-foreground);
}

.customer-detail__value {
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--hex-foreground);
  word-break: break-word;
}

.customer-detail__phone {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  color: var(--hex-primary);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.customer-detail__phone:hover {
  text-decoration: underline;
}

.customer-detail__sep {
  margin: 0 6px;
  color: var(--hex-muted-foreground);
}

.customer-registry-status {
  margin-top: 0.5rem;
}
.customer-registry-status--locked,
.customer-registry-status:not(:empty) {
  margin-top: 0.85rem;
  margin-bottom: 1rem;
}

.customer-phones {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.customer-phones__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.customer-phone-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.customer-phone-row__field {
  flex: 1;
  min-width: 0;
}

.customer-phone-row__remove {
  flex: 0 0 auto;
  width: 44px;
  height: 48px;
  margin-bottom: 0;
  border: 0;
  border-radius: 10px;
  background: var(--hex-secondary);
  color: var(--hex-muted-foreground);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.customer-phone-row__remove:hover,
.customer-phone-row__remove:focus-visible {
  color: var(--hex-foreground);
  background: color-mix(in srgb, var(--hex-secondary) 70%, #e11);
}

.customer-phones__add {
  align-self: flex-start;
  appearance: none;
  border: 0;
  background: transparent;
  padding: 4px 2px;
  color: var(--hex-primary);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.customer-phones__add:hover {
  text-decoration: underline;
}

.customer-phones__add[hidden] {
  display: none;
}

.customer-detail__maps-row {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.customer-detail__maps {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--hex-primary);
  font-weight: 600;
  text-decoration: none;
}

.customer-detail__maps:hover {
  text-decoration: underline;
}

.customer-detail__maps--apple {
  color: var(--hex-muted-foreground);
  font-weight: 500;
}

.customer-detail__muted {
  color: var(--hex-muted-foreground);
}

.customer-detail__note {
  margin: 8px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--hex-muted-foreground);
  background: var(--hex-secondary);
}

.customer-detail__actions {
  padding-top: 4px;
}

.customer-detail-scroll {
  max-height: min(75vh, 720px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.customer-detail-modal .modal-panel__head {
  flex-shrink: 0;
}

.customer-history {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--hex-border);
  border-radius: 14px;
  background: var(--hex-card);
}

.customer-history__head {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.customer-history__title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--hex-foreground);
}

.customer-history__hint {
  margin: 0;
  font-size: 12px;
  color: var(--hex-muted-foreground);
}

.customer-history__filters {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.customer-history__presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.customer-history__chip {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--hex-border);
  border-radius: 999px;
  background: var(--hex-secondary);
  color: var(--hex-foreground);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.customer-history__chip.is-active {
  border-color: var(--hex-primary);
  background: color-mix(in srgb, var(--hex-primary) 14%, var(--hex-card));
  color: var(--hex-primary);
}

.customer-history__range {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.customer-history__date {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--hex-muted-foreground);
}

.customer-history__date-label {
  display: block;
}

.customer-history__date-shell {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  border: 1.5px solid var(--hex-border);
  border-radius: 10px;
  background: var(--hex-secondary);
  color: var(--hex-foreground);
  box-sizing: border-box;
  overflow: hidden;
}

.customer-history__date-value {
  min-width: 0;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--hex-foreground);
  pointer-events: none;
}

.customer-history__date-value.is-empty {
  color: var(--hex-muted-foreground);
  font-weight: 600;
}

.customer-history__date-native {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
  background: transparent;
  color: transparent;
  -webkit-appearance: none;
  appearance: none;
}

.customer-history__date-native::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  cursor: pointer;
  opacity: 0;
}

.customer-history__date-input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 8px 10px;
  border: 1.5px solid var(--hex-border);
  border-radius: 10px;
  background: var(--hex-secondary);
  color: var(--hex-foreground);
  font-size: 14px;
  box-sizing: border-box;
}

.customer-history__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  /* Full history scrolls with the customer detail modal — no nested clip. */
  max-height: none;
  overflow: visible;
}

.customer-history__order {
  border: 1px solid var(--hex-border);
  border-radius: 12px;
  background: var(--hex-secondary);
  overflow: visible;
}

.customer-history__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
}

.customer-history__summary::-webkit-details-marker,
.customer-history__summary::marker {
  display: none;
  content: "";
}

.customer-history__summary-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.customer-history__day {
  font-size: 12px;
  font-weight: 600;
  color: var(--hex-muted-foreground);
}

.customer-history__amount {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 800;
  color: var(--hex-primary);
  font-variant-numeric: tabular-nums;
}

.customer-history__body {
  padding: 0 12px 12px;
  border-top: 1px dashed var(--hex-border);
  overflow: visible;
}

.customer-history__meta {
  margin: 8px 0;
  font-size: 12px;
  color: var(--hex-muted-foreground);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.customer-history__items {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.customer-history__item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  line-height: 1.35;
  width: 100%;
  box-sizing: border-box;
}

.customer-history__item-name {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 600;
  color: var(--hex-foreground);
  text-align: start;
  direction: ltr;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.customer-history__item-qty {
  flex: 0 0 auto;
  font-weight: 700;
  color: var(--hex-muted-foreground);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.customer-history__empty,
.customer-history__empty-items {
  margin: 0;
  padding: 14px 10px;
  text-align: center;
  font-size: 13px;
  color: var(--hex-muted-foreground);
}

.customer-history__empty-items {
  padding: 4px 0 0;
  text-align: left;
}

.customer-card__avatar {
  flex-shrink: 0;
  width: 64px;
  height: 80px;
  min-width: 64px;
  border-radius: 0;
  display: grid;
  place-items: center;
  background: var(--hex-primary);
  color: var(--hex-primary-foreground);
  font-size: 24px;
  font-weight: 800;
  border: none;
  box-shadow: none;
  outline: none;
  overflow: hidden;
}

.employee-card__avatar-img {
  display: block;
  object-fit: cover;
  object-position: center;
  background: var(--hex-secondary);
}

.employee-card__avatar {
  flex-shrink: 0;
  width: var(--avatar-md);
  height: var(--avatar-md);
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--hex-primary);
  color: var(--hex-primary-foreground);
  font-size: 20px;
  font-weight: 800;
  box-shadow: var(--thumb-shadow);
}

.employee-list .employee-card__avatar,
.employee-list .employee-card__avatar-img {
  width: 56px;
  height: 56px;
  border-radius: 12px;
}

.employee-list .employee-card__avatar {
  font-size: 22px;
}

.employee-list .employee-card__avatar-img {
  object-fit: cover;
}

.sidebar-user__avatar.employee-card__avatar-img {
  display: block;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 50%;
}

.mobile-top-bar__user-avatar.employee-card__avatar-img,
.delivery-picker-option__avatar.employee-card__avatar-img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.mobile-top-bar__user:has(.mobile-top-bar__user-avatar) {
  padding: 0;
  overflow: hidden;
}

.mobile-top-bar__user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--hex-primary);
  color: var(--hex-primary-foreground);
  font-size: 15px;
  font-weight: 800;
}

.delivery-picker-option__avatar.employee-card__avatar-img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
}

.customer-card__identity {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  display: flex;
  align-items: stretch;
}

.customer-card__text {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 4px;
}

.customer-card__title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.customer-card__name-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.customer-card__name {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--hex-foreground);
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.customer-card__phones {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 2px 10px;
  min-width: 0;
  max-width: 100%;
  margin-top: 0;
}

.customer-card__phone-link {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.15;
  color: var(--hex-primary);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.customer-card__phone-link .customer-card__icon {
  width: 14px;
  height: 14px;
  margin-top: 0;
  color: var(--hex-primary);
}

.customer-card__phones.customer-card__muted {
  font-size: 12px;
  white-space: nowrap;
}

.customer-card__sub {
  margin: 0;
  font-size: 12px;
  line-height: 1.3;
  color: var(--hex-muted-foreground);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.customer-card__phone,
.customer-card__addr {
  min-width: 0;
}

.customer-card__addr {
  grid-area: addr;
  margin-top: 0;
  min-width: 0;
}

.customer-card__line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
  color: var(--hex-foreground);
  text-decoration: none;
}

a.customer-card__line {
  color: var(--hex-primary);
  font-weight: 600;
}

.customer-card__icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  stroke-width: 2;
  color: var(--hex-muted-foreground);
}

a.customer-card__line .customer-card__icon {
  color: var(--hex-primary);
}

.customer-card__line span {
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.customer-card__muted {
  font-size: 13px;
  color: var(--hex-muted-foreground);
}

.customer-card__actions {
  grid-area: actions;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: center;
  gap: 4px;
  flex-shrink: 0;
  padding: 0;
  margin: 0;
  border-top: none;
  align-self: center;
  justify-self: end;
}

.customer-card__icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  padding: 0;
  border: 1px solid var(--hex-border);
  border-radius: 8px;
  background: var(--hex-card);
  color: var(--hex-muted-foreground);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: none !important;
}

.customer-card__icon-btn .ui-icon {
  width: 16px;
  height: 16px;
}

.customer-card__icon-btn:active {
  opacity: 0.85;
}

.customer-card__btn {
  flex: 0 0 auto;
  min-width: 36px;
  min-height: 36px;
  padding: 0 10px;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  box-shadow: none !important;
}

.customer-card__btn:has(.ui-icon),
.employee-card__btn:has(.ui-icon) {
  flex: 0 0 36px;
  width: 36px;
  min-width: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
}

.customer-card__btn .ui-icon,
.employee-card__btn .ui-icon,
.category-row__delete .ui-icon,
.icon-action-btn .ui-icon,
.btn--icon-label .ui-icon {
  width: 18px;
  height: 18px;
}

.customer-card__btn--ghost {
  background: var(--hex-secondary);
  color: var(--hex-foreground);
}

.customer-card__btn--primary {
  background: var(--hex-primary);
  color: var(--hex-primary-foreground);
}

.customer-card__btn--danger {
  background: var(--hex-card);
  color: var(--hex-foreground);
  border: 1px solid var(--hex-border);
}

.worker-pick {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.worker-pick__toolbar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 0 4px;
  border: none;
  border-radius: 0;
  background: var(--hex-page, var(--hex-secondary, #f5f7f9));
  position: sticky;
  top: 0;
  z-index: 3;
}

.worker-pick__search {
  display: block;
  width: 100%;
  min-height: var(--field-h);
  padding: 10px 14px;
  border: 1.5px solid var(--hex-border);
  border-radius: 10px;
  background: var(--hex-card);
  color: var(--hex-foreground);
  font-size: 16px;
  line-height: 1.25;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: none !important;
}

.worker-pick__search::-webkit-search-decoration,
.worker-pick__search::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.worker-pick__search:focus {
  border-color: var(--hex-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(22, 137, 154, 0.14) !important;
}

.worker-pick__count {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--hex-muted-foreground);
}

.worker-pick__hint {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--hex-secondary);
  font-size: 13px;
  font-weight: 600;
  color: var(--hex-muted-foreground);
  text-align: center;
}

.worker-pick-selected {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 0 0;
  border-radius: 0;
  border: none;
  background: transparent;
}

.worker-pick-selected__label {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--hex-primary);
}

.worker-pick-selected .store-rating {
  max-width: 100%;
  margin: 4px 0 2px;
}

.worker-pick-selected__store .worker-order-store__name {
  font-size: 17px;
}

.worker-pick-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.worker-pick__empty {
  margin: 0;
  padding: 28px 0;
  text-align: center;
  font-size: 14px;
  line-height: 1.4;
  color: var(--hex-muted-foreground);
  border-radius: 0;
  background: transparent;
  border: none;
  border-bottom: 1px dashed var(--hex-border);
}

.worker-pick-card {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 12px 0;
  border: none;
  border-bottom: 1px solid var(--hex-border);
  border-radius: 0;
  background: transparent;
  color: var(--hex-foreground);
  text-align: left;
  box-shadow: none !important;
  transition: background 0.15s ease;
}

.worker-pick-card__main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: none !important;
}

.worker-pick-card__main:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(22, 137, 154, 0.14);
}

.worker-pick-card.is-selected {
  border-bottom-color: var(--hex-primary);
  background: color-mix(in srgb, var(--hex-primary-soft) 50%, transparent);
  box-shadow: none;
}

.worker-pick-card.is-selected .worker-pick-card__avatar {
  box-shadow: 0 0 0 2px var(--hex-card);
}

.worker-pick-card__avatar {
  flex-shrink: 0;
  width: 48px;
  height: 60px;
  min-width: 48px;
  border-radius: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--hex-primary);
  color: var(--hex-primary-foreground);
  font-size: 18px;
  font-weight: 800;
  box-shadow: none;
  border: none;
}

.worker-pick-card__avatar.customer-card__avatar-img,
img.worker-pick-card__avatar {
  object-fit: cover;
  object-position: center;
  background: #fff;
  box-shadow: none;
}

.worker-pick-card__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.worker-pick-card__name {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  min-width: 0;
}

.worker-pick-card__loc {
  font-size: 12px;
  font-weight: 600;
  color: var(--hex-muted-foreground);
  white-space: nowrap;
}

.worker-pick-card__sub {
  font-size: 13px;
  line-height: 1.3;
  color: var(--hex-muted-foreground);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.worker-pick-card__check {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--hex-primary);
  color: var(--hex-primary-foreground);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.list-panel--customers {
  border-top: none;
}

.list-panel--customers .customer-card {
  padding-left: 0;
}

.list-panel--customers .customer-card__avatar,
.list-panel--customers .customer-card__avatar.customer-card__avatar-img,
.line-panel--customers .customer-card__avatar,
.line-panel--customers .customer-card__avatar.customer-card__avatar-img {
  width: 64px;
  height: 80px;
  min-width: 64px;
  border-radius: 0;
  border: none;
  box-shadow: none;
  outline: none;
  background: #fff;
}

.list-panel--customers .customer-card__avatar,
.line-panel--customers .customer-card__avatar {
  font-size: 24px;
}

.list-panel--customers .customer-card__avatar-img,
.line-panel--customers .customer-card__avatar-img {
  object-fit: cover;
  object-position: center;
  background: #fff;
}

.line-panel--customers .list-action-toolbar {
  padding-left: 0;
  padding-right: 0;
}

.list-action-toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 0 12px;
  border-bottom: 1px solid var(--hex-border);
}

.list-action-toolbar .page-toolbar__search {
  width: 100%;
  flex: none;
}

.list-action-toolbar__tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.list-action-toolbar__tools .btn--toolbar-excel {
  flex: 0 0 auto;
  background: #e8f5ec;
  color: #107c41;
  border-color: #9fd4b3;
}

@media (hover: hover) and (pointer: fine) {
  .list-action-toolbar__tools
    .btn--toolbar-excel:hover:not(:disabled):not(.is-busy) {
    background: #d4eddf;
    border-color: #7bc499;
    color: #0d6635;
  }
}

.page-action-add {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    background 0.15s ease,
    transform 0.1s ease,
    box-shadow 0.15s ease;
}

.list-action-toolbar .excel-import-toolbar {
  padding: 0;
  grid-template-columns: 1fr 1fr;
}

.list-action-toolbar .excel-import-toolbar__btn {
  min-height: var(--field-h);
  height: var(--field-h);
}

label.excel-import-toolbar__upload {
  cursor: pointer;
  margin: 0;
  user-select: none;
}

.list-action-toolbar .excel-import-toolbar__btn.btn--toolbar-excel {
  background: var(--hex-primary-soft);
  color: var(--hex-primary);
  border-color: color-mix(in srgb, var(--hex-primary) 38%, var(--hex-border));
}

@media (hover: hover) and (pointer: fine) {
  .list-action-toolbar
    .excel-import-toolbar__btn.btn--toolbar-excel:hover:not(:disabled):not(
      .is-busy
    ) {
    background: var(--hex-primary-active);
    border-color: var(--hex-primary);
    color: var(--hex-primary-dark);
  }
}

.list-action-toolbar .excel-import-toolbar__btn.btn--toolbar-secondary {
  background: #e8f5ec;
  color: #107c41;
  border-color: #9fd4b3;
}

.list-action-toolbar
  .excel-import-toolbar__btn.btn--toolbar-secondary:hover:not(:disabled) {
  background: #d4eddf;
  border-color: #7bc499;
  color: #0d6635;
}

.list-panel {
  background: transparent;
  border-radius: 0;
  overflow: visible;
  border: none;
  border-top: 1px solid var(--hex-border);
  border-bottom: 1px solid var(--hex-border);
}

.list-panel__toolbar {
  padding: 10px 0 12px;
  background: transparent;
  border-bottom: 1px solid var(--hex-border);
}

/* —— Page toolbar (Search | Filter | Excel | Actions) —— */
.page-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 0 12px;
  border-bottom: 1px solid var(--hex-border);
}

.page-toolbar__filters {
  flex: 1 1 220px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.page-toolbar--products {
  align-items: stretch;
}

.page-toolbar--products .page-toolbar__filters {
  flex: 1 1 100%;
  flex-direction: column;
  align-items: stretch;
}

.page-toolbar--products .page-toolbar__search {
  width: 100%;
  flex: none;
}

.page-toolbar--products .page-toolbar__tax {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
}

.page-toolbar--products .page-toolbar__tax .page-toolbar__select {
  width: 100%;
  min-width: 0;
  max-width: none;
  flex: none;
}

.page-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.page-toolbar__actions .btn--toolbar-excel {
  background: #e8f5ec;
  color: #107c41;
  border-color: #9fd4b3;
}

@media (hover: hover) and (pointer: fine) {
  .page-toolbar__actions
    .btn--toolbar-excel:hover:not(:disabled):not(.is-busy) {
    background: #d4eddf;
    border-color: #7bc499;
    color: #0d6635;
  }
}

.page-toolbar__search,
.page-toolbar__select,
.page-toolbar__date {
  min-height: var(--field-h);
  border-radius: var(--btn-radius);
  border: 1.5px solid var(--hex-border);
  background: var(--hex-secondary);
  font-size: 14px;
  color: var(--hex-foreground);
}

.page-toolbar__search {
  flex: 1 1 160px;
  min-width: 0;
  padding: 10px 14px;
  -webkit-appearance: none;
  appearance: none;
}

.page-toolbar__search::-webkit-search-decoration,
.page-toolbar__search::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.page-toolbar__select {
  flex: 0 1 auto;
  min-width: 120px;
  max-width: 100%;
  padding: 0 12px;
}

.page-toolbar__date {
  flex: 0 1 auto;
  min-width: 132px;
  padding: 0 12px;
}

.page-toolbar__chip {
  min-height: var(--field-h);
  padding: 0 14px;
  border: 1.5px solid var(--hex-border);
  border-radius: var(--btn-radius);
  background: var(--hex-secondary);
  color: var(--hex-foreground);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.page-toolbar__chip.is-active {
  background: var(--hex-primary);
  border-color: var(--hex-primary);
  color: var(--hex-primary-foreground);
}

.page-toolbar__hint {
  flex: 1 1 100%;
  font-size: 12px;
  line-height: 1.35;
  color: var(--hex-muted-foreground);
}

.page-toolbar__excel-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: currentColor;
  pointer-events: none;
}

.btn--toolbar {
  min-height: var(--field-h);
  height: var(--field-h);
  padding: 0 14px;
  border-radius: var(--btn-radius);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  border: 1.5px solid transparent;
}

.btn--toolbar-excel {
  background: #e8f5ec;
  color: #107c41;
  border-color: #9fd4b3;
  /* Avoid .btn:active scale(0.98) hover flicker under the cursor */
  transform: none !important;
  transition:
    background 0.12s ease,
    border-color 0.12s ease,
    color 0.12s ease;
}

.btn--toolbar-excel .ui-icon,
.btn--toolbar-excel .page-toolbar__excel-icon,
.btn--toolbar-excel .btn--toolbar__label {
  pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
  .btn--toolbar-excel:hover:not(:disabled):not(.is-busy) {
    background: #d4eddf;
    border-color: #7bc499;
    color: #0d6635;
  }
}

.btn--toolbar-excel:active:not(:disabled):not(.is-busy) {
  background: #c5e6d0;
  transform: none !important;
}

.btn--toolbar-excel.is-busy {
  background: #e8f5ec;
  color: #107c41;
  border-color: #9fd4b3;
  opacity: 1;
  cursor: wait;
}

.btn--toolbar-excel__spinner {
  width: 14px;
  height: 14px;
  border: 2px solid #9fd4b3;
  border-top-color: #107c41;
  border-radius: 50%;
  flex-shrink: 0;
  animation: excel-export-spin 0.7s linear infinite;
  pointer-events: none;
}

@keyframes excel-export-spin {
  to {
    transform: rotate(360deg);
  }
}

.btn--toolbar-primary {
  background: var(--hex-primary);
  color: var(--hex-primary-foreground);
  border-color: var(--hex-primary);
}

.btn--toolbar-primary:hover:not(:disabled) {
  background: #1eb3c7;
  border-color: #1eb3c7;
}

.btn--toolbar-primary:active:not(:disabled) {
  background: var(--hex-primary-dark);
  border-color: var(--hex-primary-dark);
}

.btn--toolbar-add-product {
  font-weight: 700;
}

.btn--toolbar-secondary {
  background: var(--hex-secondary);
  color: var(--hex-foreground);
  border-color: var(--hex-border);
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.btn--toolbar-secondary:hover:not(:disabled) {
  background: color-mix(
    in srgb,
    var(--hex-secondary) 82%,
    var(--hex-primary) 18%
  );
  border-color: color-mix(
    in srgb,
    var(--hex-border) 55%,
    var(--hex-primary) 45%
  );
}

.btn--toolbar-secondary:active:not(:disabled) {
  background: color-mix(
    in srgb,
    var(--hex-secondary) 70%,
    var(--hex-primary) 30%
  );
  border-color: var(--hex-primary);
}

.page-toolbar__actions .btn--toolbar-secondary:hover:not(:disabled) {
  background: #e3f4f7;
  border-color: #8ec5cf;
  color: var(--hex-primary-dark);
}

.page-toolbar__actions .btn--toolbar-secondary:active:not(:disabled) {
  background: #d4ebef;
  border-color: var(--hex-primary);
}

.btn--toolbar-block {
  width: 100%;
}

.btn--toolbar__label--short {
  display: none;
}

.wh-receipts__filters > .page-toolbar {
  padding: 0;
  border-bottom: none;
}

.wh-receipts__filters > .page-toolbar .page-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.bg-card > .px-3 > .page-toolbar,
.bg-card.rounded.p-3 > .page-toolbar {
  padding-top: 0;
}

@media (max-width: 640px) {
  .page-toolbar__actions {
    width: 100%;
    margin-left: 0;
    justify-content: stretch;
  }

  .page-toolbar__actions .btn--toolbar {
    flex: 1 1 auto;
    min-width: 0;
  }

  .btn--toolbar__label--full {
    display: none;
  }

  .btn--toolbar__label--short {
    display: inline;
  }

  .page-toolbar__hint {
    order: 10;
  }
}

@media (min-width: 641px) {
  .page-toolbar__hint {
    flex: 0 1 auto;
    order: 0;
  }
}

.list-panel__search {
  width: 100%;
  min-height: var(--field-h);
  padding: 10px 14px;
  border-radius: var(--btn-radius);
  border: 1.5px solid var(--hex-border);
  background: var(--hex-secondary);
}

.list-panel__table {
  width: 100%;
}

.list-panel__body {
  width: 100%;
}

.list-panel__empty {
  padding: 48px 16px;
  text-align: center;
  font-size: 14px;
  color: var(--hex-muted-foreground);
}

.list-btn {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.list-btn--secondary {
  background: var(--hex-secondary);
  color: var(--hex-foreground);
}

.list-btn--primary {
  background: var(--hex-primary);
  color: var(--hex-primary-foreground);
}

.list-btn--danger {
  background: var(--hex-danger-soft);
  color: var(--hex-danger-text);
}

.employee-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
}

.employee-list__head {
  display: none;
}

.employee-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--hex-border);
  background: transparent;
}

.employee-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.employee-card__identity {
  flex: 1;
  min-width: 0;
}

.employee-card__name {
  margin: 0;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-card__sub {
  margin: 2px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--hex-muted-foreground);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-card__meta {
  display: none;
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--hex-muted-foreground);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-card__actions {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 0;
  margin: 0;
  border-top: none;
  align-self: center;
  justify-self: end;
}

.employee-card__btn {
  flex: 0 0 auto;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  box-shadow: none !important;
}

.employee-card__btn--ghost {
  background: var(--hex-secondary);
  color: var(--hex-foreground);
}

.employee-card__btn--danger {
  background: var(--hex-card);
  color: var(--hex-foreground);
  border: 1px solid var(--hex-border);
}

.product-list__head {
  display: none;
}

.product-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
}

img[data-product-img],
#productImagePreview {
  object-fit: contain;
  object-position: center;
  background: #fff;
  box-sizing: border-box;
}

.product-card {
  --pc-thumb: 56px;
  --pc-gap: 12px;
  --pc-pad-y: 10px;
  --pc-pad-x: 0;
  --pc-title: calc(var(--font-sm) * var(--phi) / 1.05);
  --pc-meta: var(--font-xs);
  display: grid;
  grid-template-columns: var(--pc-thumb) minmax(0, 1fr) auto;
  grid-template-areas:
    "img copy actions"
    "img fields actions";
  gap: 6px var(--pc-gap);
  align-items: start;
  min-width: 0;
  padding: var(--pc-pad-y) 4px var(--pc-pad-y) 0;
  border: none;
  border-radius: 0;
  border-bottom: 1px solid var(--hex-border);
  background: transparent;
  margin-bottom: 0;
  box-shadow: none;
}

.product-card:last-child {
  border-bottom: none;
}

.product-card__name {
  display: contents;
}

.product-card__media {
  grid-area: img;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--pc-thumb);
  height: var(--pc-thumb);
  min-width: var(--pc-thumb);
  border-radius: 0;
  background: #fff;
  border: none;
  box-shadow: none;
  overflow: hidden;
  align-self: start;
}

.product-card__img {
  grid-area: unset;
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  border-radius: 0;
  object-fit: contain !important;
  object-position: center center !important;
  padding: 0;
  border: none;
  background: #fff;
  box-shadow: none;
}

.product-card__copy {
  grid-area: copy;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: calc(var(--phi-neg-1) / var(--phi));
  padding-top: 1px;
}

.product-card__title {
  margin: 0;
  font-weight: 700;
  font-size: var(--pc-title);
  line-height: var(--phi);
  color: var(--hex-foreground);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card__subtitle {
  margin: 0;
  font-size: var(--pc-meta);
  line-height: 1.35;
  color: var(--hex-muted-foreground);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-card__hint {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  margin: 0;
  font-size: var(--pc-meta);
  line-height: 1.35;
  color: var(--hex-muted-foreground);
}

.product-card__hint-cat,
.product-card__hint-code,
.product-card__hint-pack {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.product-card__hint-pack {
  font-weight: 600;
  color: var(--hex-primary);
}

.product-card__hint-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: calc(var(--pc-meta) / 1.05);
}

.product-card__hint-sep {
  opacity: 0.45;
}

.product-card__cat,
.product-card__barcode,
.product-card__pack {
  display: none;
}

.product-card__fields {
  grid-area: fields;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: calc(var(--phi-neg-1)) calc(var(--phi-1));
  min-width: 0;
}

.product-card__facts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: calc(var(--phi-neg-1)) calc(var(--phi-1));
  min-width: 0;
}

.product-card__price {
  font-weight: 800;
  font-size: calc(var(--pc-title) / 1.02);
  line-height: 1.2;
  color: var(--hex-primary);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.product-card__cost {
  font-size: var(--pc-meta);
  font-weight: 600;
  line-height: 1.2;
  color: var(--hex-muted-foreground);
  white-space: nowrap;
}

.product-card__cost::before {
  content: "Өртөг ";
  font-weight: 500;
  opacity: 0.8;
}

.product-card__stock {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  font-size: var(--pc-meta);
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--hex-foreground);
  font-variant-numeric: tabular-nums;
}

.product-card__stock-label {
  opacity: 0.72;
  font-weight: 600;
}

.product-card__stock.is-low {
  background: transparent;
  color: var(--hex-warning-text);
}

.product-card__actions {
  grid-area: actions;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-self: start;
  justify-self: end;
  flex-shrink: 0;
}

.product-card--clickable {
  cursor: pointer;
}

.product-card--active {
  outline: 2px solid var(--hex-primary);
  outline-offset: 2px;
  background: color-mix(in srgb, var(--hex-primary) 12%, var(--hex-card));
  animation: customer-card-pulse 1.1s ease-in-out 2;
}

.product-card--clickable:focus-visible {
  outline: 2px solid var(--hex-primary);
  outline-offset: -2px;
}

.product-card__action-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  width: 32px;
  min-height: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--hex-border);
  border-radius: 8px;
  font-size: 0;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: none !important;
  background: var(--hex-card);
  color: var(--hex-muted-foreground);
}

.product-card__action-btn .ui-icon {
  width: 16px;
  height: 16px;
}

.product-card__action-btn--edit {
  background: var(--hex-card);
  color: var(--hex-muted-foreground);
  border-color: var(--hex-border);
}

.product-card__action-btn--delete {
  background: var(--hex-card);
  color: var(--hex-muted-foreground);
  border-color: var(--hex-border);
}

.product-list--readonly .product-card {
  grid-template-columns: var(--pc-thumb) minmax(0, 1fr);
  grid-template-areas:
    "img copy"
    "img fields";
}

@media (max-width: 1023px) {
  .product-list {
    gap: 0;
    padding: 0;
  }

  .product-card {
    --pc-thumb: 72px;
    --pc-gap: 10px;
    --pc-pad-y: 10px;
    --pc-pad-x: 0;
    --pc-title: 15px;
    --pc-meta: 12px;
    position: relative;
    grid-template-columns: var(--pc-thumb) minmax(0, 1fr) auto;
    grid-template-areas:
      "img copy actions"
      "img fields actions";
    gap: 2px 10px;
    padding: 10px 4px 10px 0;
    border: none;
    border-radius: 0;
    border-bottom: 1px solid var(--hex-border);
    background: transparent;
    box-shadow: none;
    margin-bottom: 0;
    align-items: start;
    transition: none;
  }

  .product-card--clickable:active {
    transform: none;
    box-shadow: none;
    background: color-mix(in srgb, var(--hex-secondary) 55%, transparent);
  }

  .product-list--readonly .product-card {
    grid-template-columns: var(--pc-thumb) minmax(0, 1fr);
    grid-template-areas:
      "img copy"
      "img fields";
  }

  .product-card__media {
    width: var(--pc-thumb);
    height: var(--pc-thumb);
    min-width: var(--pc-thumb);
    border-radius: 0;
    border: none;
    box-shadow: none;
    background: #fff;
  }

  .product-card__img {
    padding: 0;
    border-radius: 0;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain !important;
    object-position: center center !important;
    background: #fff;
  }

  .product-card__copy {
    padding-top: 0;
    gap: 2px;
    min-height: 0;
    justify-content: center;
  }

  .product-card__title {
    font-size: var(--pc-title);
    line-height: 1.25;
    -webkit-line-clamp: 2;
    letter-spacing: normal;
  }

  .product-card__subtitle {
    display: block;
    max-width: 100%;
    width: auto;
    margin: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: none;
    font-size: var(--pc-meta);
    font-weight: 500;
    line-height: 1.35;
    color: var(--hex-muted-foreground);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .product-card__actions {
    grid-area: actions;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-self: start;
    justify-self: end;
  }

  .product-card__action-btn {
    min-width: 32px;
    width: 32px;
    min-height: 32px;
    height: 32px;
    border-radius: 8px;
    border-width: 1px;
    background: var(--hex-card);
  }

  .product-card__action-btn--edit {
    color: var(--hex-muted-foreground);
    border-color: var(--hex-border);
    background: var(--hex-card);
  }

  .product-card__action-btn--delete {
    color: var(--hex-muted-foreground);
  }

  .product-card__action-btn .ui-icon {
    width: 16px;
    height: 16px;
  }

  .product-card__fields {
    grid-area: fields;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 8px;
    width: 100%;
    min-width: 0;
    padding-top: 0;
  }

  .product-card__cat {
    display: none;
  }

  .product-card__facts {
    display: contents;
  }

  .product-card__pack,
  .product-card__price,
  .product-card__cost,
  .product-card__stock,
  .product-card__barcode {
    display: inline;
    margin: 0;
    min-height: 0;
    border: none;
    text-align: left;
    line-height: 1.3;
  }

  .product-card__pack::before,
  .product-card__price::before,
  .product-card__cost::before,
  .product-card__stock::before,
  .product-card__barcode::before {
    content: none;
    display: none;
  }

  .product-card__price {
    order: 1;
    padding: 0;
    border-radius: 0;
    background: transparent;
    font-size: 15px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--hex-primary);
    letter-spacing: -0.02em;
    white-space: nowrap;
  }

  .product-card__stock {
    order: 2;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: none;
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--hex-muted-foreground);
    white-space: nowrap;
  }

  .product-card__stock.is-low {
    background: transparent;
    border: none;
    color: var(--hex-warning-text);
  }

  .product-card__pack {
    order: 3;
    flex: 0 1 auto;
    max-width: 100%;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: none;
    font-size: 12px;
    font-weight: 700;
    color: var(--hex-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .product-card__pack--empty {
    display: none;
  }

  .product-card__cost {
    display: none;
  }

  .product-list--show-cost .product-card__cost {
    display: inline;
    order: 4;
    flex: 0 1 auto;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: none;
    font-size: 12px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--hex-muted-foreground);
    white-space: nowrap;
  }

  .product-list--show-cost .product-card__cost::before {
    content: "Өртөг ";
    display: inline;
    font-weight: 500;
    opacity: 0.7;
  }

  .product-card__barcode {
    order: 5;
    flex: 1 1 auto;
    min-width: 0;
    margin-top: 0;
    padding: 0;
    border-top: none;
    border-radius: 0;
    background: transparent;
    font-family:
      ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--hex-muted-foreground);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* Narrow phones */
@media (max-width: 640px) {
  .product-list {
    gap: 0;
    padding: 0;
  }

  .product-card {
    --pc-thumb: 72px;
    --pc-pad-y: 10px;
    --pc-pad-x: 0;
    --pc-title: 14.5px;
    --pc-gap: 10px;
    border-radius: 0;
  }

  .product-card__media {
    border-radius: 0;
    border: none;
    box-shadow: none;
  }

  .product-card__action-btn {
    min-width: 32px;
    width: 32px;
    min-height: 32px;
    height: 32px;
    border-radius: 8px;
  }

  .product-card__price {
    font-size: 15px;
  }
}

/* Desktop / web only — compact golden-ratio product table */
@media (min-width: 1024px) {
  .product-list {
    display: grid;
    grid-template-columns: var(--product-cols);
    gap: 0 calc(var(--phi-neg-1));
    padding: 0;
    --product-phi: var(--phi);
    --product-base: var(--phi-neg-1);
    --product-gutter: var(--phi-0);
    --product-pad-y: var(--phi-neg-1);
    --product-pad-x: var(--phi-0);
    --product-thumb: var(--phi-4);
    --product-row-min: calc(var(--product-thumb) + var(--product-pad-y) * 2);
    /* Name gets φ share; data cols share the minor remainder */
    --product-cols: minmax(calc(120px * var(--phi)), 1.618fr) minmax(0, 1fr)
      minmax(0, 0.85fr) minmax(0, 0.9fr) minmax(0, 0.85fr) minmax(72px, 1fr)
      calc(var(--phi-4) + var(--phi-neg-1));
  }

  .product-list__head,
  .product-card {
    display: grid;
    grid-template-columns: subgrid;
    grid-column: 1 / -1;
    grid-template-areas: none;
    align-items: center;
  }

  .product-list--show-cost {
    --product-cols: minmax(calc(110px * var(--phi)), 1.618fr) minmax(0, 0.9fr)
      minmax(0, 0.8fr) minmax(0, 0.85fr) minmax(0, 0.75fr) minmax(0, 0.8fr)
      minmax(72px, 0.95fr) calc(var(--phi-4) + var(--phi-neg-1));
  }

  .product-list--readonly {
    --product-cols: minmax(calc(120px * var(--phi)), 1.618fr) minmax(0, 1fr)
      minmax(0, 0.85fr) minmax(0, 0.9fr) minmax(0, 0.85fr) minmax(72px, 1fr);
  }

  .product-list__head {
    display: grid;
    grid-template-rows: auto;
    font-size: calc(var(--font-xs) / var(--phi) + 2px);
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--hex-muted-foreground);
    background: var(--hex-secondary);
    border-bottom: 1px solid var(--hex-border);
    min-height: calc(var(--phi-2) - 2px);
    padding: calc(var(--phi-neg-1) / 1.2) var(--product-pad-x);
  }

  .product-list__col {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.1;
  }

  .product-list__col--name {
    grid-column: 1;
    padding-left: calc(var(--product-thumb) + var(--product-gutter));
  }

  .product-list__col--cat {
    grid-column: 2;
    padding-right: 2px;
  }

  .product-list__col--pack {
    grid-column: 3;
    text-align: right;
    padding-right: 2px;
  }

  .product-list__col--price {
    grid-column: 4;
    text-align: right;
    padding-right: 2px;
  }

  .product-list__col--cost {
    grid-column: 5;
    text-align: right;
    padding-right: 2px;
  }

  .product-list__col--stock {
    grid-column: 5;
    text-align: right;
    padding-right: 2px;
  }

  .product-list--show-cost .product-list__col--stock {
    grid-column: 6;
  }

  .product-list__col--barcode {
    grid-column: 6;
    text-align: right;
    padding-right: 2px;
  }

  .product-list--show-cost .product-list__col--barcode {
    grid-column: 7;
  }

  .product-list__col--actions {
    grid-column: 7;
    text-align: center;
  }

  .product-list--show-cost .product-list__col--actions {
    grid-column: 8;
  }

  .product-card__subtitle {
    display: none;
  }

  .product-card__fields {
    display: contents;
  }

  .product-card {
    grid-template-rows: minmax(var(--product-row-min), auto);
    padding: var(--product-pad-y) var(--product-pad-x);
    min-height: var(--product-row-min);
    border: none;
    border-radius: 0;
    margin-bottom: 0;
    border-bottom: 1px solid var(--hex-border);
    background: var(--hex-card);
    transition: background-color 140ms ease;
  }

  .product-card:hover {
    background: color-mix(in srgb, var(--hex-secondary) 50%, var(--hex-card));
  }

  .product-card__name,
  .product-card__cat,
  .product-card__pack,
  .product-card__price,
  .product-card__cost,
  .product-card__stock,
  .product-card__barcode,
  .product-card__actions,
  .product-card__facts > * {
    grid-row: 1;
    align-self: center;
  }

  .product-card__name {
    grid-column: 1;
    grid-area: unset;
    min-width: 0;
    display: grid;
    grid-template-columns: var(--product-thumb) minmax(0, 1fr);
    gap: var(--product-gutter);
    align-items: center;
  }

  .product-card__media {
    grid-area: unset;
    width: var(--product-thumb);
    height: var(--product-thumb);
    border-radius: 0;
    border: none;
    background: #fff;
    box-shadow: none;
  }

  .product-card__img {
    grid-area: unset;
    grid-column: auto;
    grid-row: auto;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    border-radius: 0;
    border: none;
    background: #fff;
    padding: 0;
    box-shadow: none;
    object-fit: contain !important;
    object-position: center center !important;
    align-self: center;
    justify-self: start;
  }

  .product-card__copy {
    grid-area: unset;
    grid-column: auto;
    grid-row: auto;
    min-width: 0;
    padding-top: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: calc(var(--product-base) * 0.5);
  }

  .product-card__title {
    font-size: calc(var(--font-sm) / 1.05);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--hex-foreground);
  }

  .product-card__hint {
    display: none;
  }

  .product-card__facts {
    display: contents;
  }

  .product-card__cat {
    display: block;
    grid-column: 2;
    margin: 0;
    font-size: 11px;
    line-height: 1.25;
    color: var(--hex-muted-foreground);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .product-card__pack {
    display: inline-flex;
    grid-column: 3;
    justify-self: end;
    align-items: center;
    min-height: 22px;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    color: var(--hex-primary);
    background: color-mix(in srgb, var(--hex-primary) 10%, var(--hex-card));
    border: 1px solid color-mix(in srgb, var(--hex-primary) 18%, transparent);
  }

  .product-card__pack--empty {
    padding: 0;
    border: none;
    background: transparent;
    color: var(--hex-muted-foreground);
    font-weight: 500;
    opacity: 0.4;
  }

  .product-card__price {
    grid-column: 4;
    font-size: 13px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    justify-self: end;
    text-align: right;
    color: var(--hex-primary);
    letter-spacing: -0.02em;
    white-space: nowrap;
  }

  .product-card__cost {
    display: none;
  }

  .product-list--show-cost .product-card__cost {
    display: block;
    grid-column: 5;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    justify-self: end;
    text-align: right;
    color: var(--hex-muted-foreground);
    white-space: nowrap;
  }

  .product-list--show-cost .product-card__cost::before {
    content: none;
  }

  .product-card__stock {
    grid-column: 5;
    justify-self: end;
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--hex-secondary);
    font-size: 11px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
    color: var(--hex-foreground);
  }

  .product-card__stock-label {
    display: none;
  }

  .product-list--show-cost .product-card__stock {
    grid-column: 6;
  }

  .product-card__stock.is-low {
    background: var(--hex-warning-soft);
    color: var(--hex-warning-text);
  }

  .product-card__barcode {
    display: block;
    grid-column: 6;
    margin: 0;
    font-size: 10px;
    font-family:
      ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    color: var(--hex-muted-foreground);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    justify-self: end;
    text-align: right;
    letter-spacing: 0.01em;
  }

  .product-list--show-cost .product-card__barcode {
    grid-column: 7;
  }

  .product-card__actions {
    grid-column: 7;
    grid-area: unset;
    display: flex;
    flex-direction: column;
    gap: 4px;
    justify-self: center;
    align-self: center;
  }

  .product-list--show-cost .product-card__actions {
    grid-column: 8;
  }

  .product-list__col--actions,
  .product-card__actions {
    text-align: center;
  }

  .product-card__action-btn {
    min-width: 32px;
    width: 32px;
    min-height: 32px;
    height: 32px;
    border-radius: 8px;
    border-color: color-mix(in srgb, var(--hex-border) 85%, var(--hex-primary));
  }

  .product-card__action-btn .ui-icon {
    width: 16px;
    height: 16px;
  }

  .customer-list {
    gap: 0;
    padding: 0;
    max-height: none;
    overflow: visible;
  }

  .line-panel--customers .customer-list {
    max-height: none;
    overflow: visible;
  }

  .customer-list__head {
    display: grid;
    grid-template-columns: minmax(240px, 1.25fr) minmax(220px, 1.35fr) minmax(
        200px,
        auto
      );
    gap: 16px;
    align-items: center;
    padding: 8px 16px;
    background: var(--hex-secondary);
    color: var(--hex-muted-foreground);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: none;
    border-bottom: 1px solid var(--hex-border);
    min-height: auto;
    flex-shrink: 0;
  }

  .customer-list__head-actions {
    text-align: right;
  }

  .customer-card {
    display: grid;
    grid-template-columns: minmax(240px, 1.25fr) minmax(220px, 1.35fr) auto;
    grid-template-areas: "head addr actions";
    gap: 10px 16px;
    align-items: start;
    min-height: auto;
    flex-shrink: 0;
    padding: 12px 16px;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--hex-border);
    background: var(--hex-card);
  }

  .list-panel--customers .customer-card__avatar,
  .list-panel--customers .customer-card__avatar.customer-card__avatar-img,
  .line-panel--customers .customer-card__avatar,
  .line-panel--customers .customer-card__avatar.customer-card__avatar-img {
    width: 80px;
    height: 104px;
    min-width: 80px;
    border-radius: 0;
    border: none;
    box-shadow: none;
    outline: none;
    background: #fff;
  }

  .list-panel--customers .customer-card__avatar,
  .line-panel--customers .customer-card__avatar {
    font-size: 28px;
  }

  .customer-card__head {
    grid-area: head;
    gap: 12px;
  }

  .customer-card__text {
    gap: 4px;
  }

  .customer-card__name {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.25;
  }

  .customer-card__sub {
    margin: 0;
    font-size: 12px;
    line-height: 1.3;
  }

  .customer-card__phones {
    font-size: 12px;
  }

  .customer-card__line {
    font-size: 12px;
    line-height: 1.3;
  }

  .customer-card__addr {
    grid-area: addr;
    margin-top: 0;
  }

  .customer-card__actions {
    grid-area: actions;
    flex-direction: column;
    justify-content: center;
    justify-self: end;
    flex-wrap: nowrap;
    padding: 0;
    margin: 0;
    border-top: none;
    gap: 6px;
  }

  .customer-card__line span {
    -webkit-line-clamp: 1;
  }

  .employee-list {
    gap: 0;
    padding: 0;
  }

  .employee-list__head {
    display: grid;
    grid-template-columns: minmax(240px, 1.25fr) minmax(280px, 1.5fr) minmax(
        200px,
        auto
      );
    gap: 16px;
    align-items: center;
    padding: 10px 16px;
    background: var(--hex-secondary);
    color: var(--hex-muted-foreground);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--hex-border);
  }

  .employee-list__head-actions {
    text-align: right;
  }

  .employee-card {
    display: grid;
    grid-template-columns: minmax(240px, 1.25fr) minmax(280px, 1.5fr) minmax(
        200px,
        auto
      );
    grid-template-areas: "head meta actions";
    gap: 12px 16px;
    align-items: center;
    padding: 12px 16px;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--hex-border);
    background: var(--hex-card);
  }

  .employee-card__head {
    grid-area: head;
    gap: 14px;
  }

  .employee-list .employee-card__avatar,
  .employee-list .employee-card__avatar-img {
    width: 72px;
    height: 72px;
    border-radius: 14px;
  }

  .employee-list .employee-card__avatar {
    font-size: 28px;
  }

  .employee-card__sub {
    display: none;
  }

  .employee-card__meta {
    display: block;
    grid-area: meta;
    margin: 0;
  }

  .employee-card__actions {
    grid-area: actions;
    flex-direction: column;
    justify-content: center;
    justify-self: end;
    flex-wrap: nowrap;
    padding: 0;
    margin: 0;
    border-top: none;
  }

  .employee-card__btn {
    flex: 0 0 auto;
    min-width: 64px;
  }
}

.product-detail__img {
  padding: 6px;
  border: none;
  box-shadow: none;
}

.product-detail .customer-detail__hero {
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px;
  text-align: center;
}

.product-detail .customer-detail__avatar.product-detail__img {
  width: auto;
  height: auto;
  max-width: min(100%, 320px);
  max-height: min(70vw, 320px);
  border-radius: 0;
}

.product-detail .customer-detail__hero-text {
  align-items: center;
  width: 100%;
}

.product-detail .customer-detail__company {
  font-size: 1.05rem;
  font-weight: 700;
}

.product-detail .customer-detail__badge {
  align-self: center;
}

.product-detail__mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}

.product-detail__warn {
  color: var(--hex-warning-text);
  font-weight: 700;
}

.stock-alert-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-content: flex-start;
}

.stock-alert-form {
  box-sizing: border-box;
  height: calc(90vh - 76px);
  height: min(680px, calc(90dvh - 76px));
  max-height: calc(90vh - 76px);
  max-height: calc(90dvh - 76px);
  min-height: 0;
  overflow: hidden;
}

.stock-alert-form__head,
.stock-alert-form__search,
.stock-alert-form__foot {
  flex-shrink: 0;
}

.stock-alert-form .modal-scroll {
  max-height: none;
}

.stock-alert-row {
  display: grid;
  grid-template-columns: var(--thumb-md) minmax(0, 1fr) 64px;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--hex-secondary);
  border: 1px solid transparent;
  flex-shrink: 0;
}

.stock-alert-thumb {
  width: var(--thumb-md);
  height: var(--thumb-md);
  border-radius: 0;
  padding: 3px;
  border: none;
  box-shadow: none;
}

.stock-alert-row__name {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stock-alert-row__sub {
  margin: 1px 0 0;
  font-size: 11px;
  line-height: 1.2;
  color: var(--hex-muted-foreground);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stock-alert-row__sub b {
  color: var(--hex-foreground);
}

.stock-alert-row--low {
  background: var(--hex-warning-soft);
  border-color: var(--hex-warning);
}

.stock-alert-row__limit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin: 0;
}

.stock-alert-row__limit-label {
  font-size: 10px;
  line-height: 1;
  color: var(--hex-muted-foreground);
}

.stock-alert-row__input {
  width: 100%;
  max-width: 64px;
  padding: 6px 8px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  border-radius: 6px;
  background: var(--hex-card);
}

.stock-alert-form__foot {
  background: var(--hex-card);
}

.products-toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.products-toolbar select,
.products-toolbar input,
.products-toolbar button {
  width: 100%;
}

.products-toolbar__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}

.products-toolbar__actions button {
  width: 100%;
  min-width: 0;
}

.category-form__add-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.category-form__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--hex-border);
}

.category-form__empty {
  margin: 0;
  padding: 16px 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--hex-muted-foreground);
}

.category-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--hex-secondary);
}

.category-row__name {
  font-weight: 600;
  font-size: 0.95rem;
  min-width: 0;
  word-break: break-word;
}

.category-row__meta {
  flex-shrink: 0;
  font-size: 0.8rem;
  color: var(--hex-muted-foreground);
}

.category-row__meta--empty {
  opacity: 0.75;
}

.category-row__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.category-row__delete {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--hex-border);
  border-radius: 8px;
  font-size: 0;
  font-weight: 600;
  color: var(--hex-foreground);
  background: var(--hex-card);
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.category-row__delete:hover:not(:disabled) {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #b91c1c;
}

.category-row__delete:active {
  opacity: 0.85;
}

.icon-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 0;
  border: 1px solid var(--hex-border);
  border-radius: 8px;
  background: var(--hex-card);
  color: var(--hex-foreground);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: none !important;
}

.icon-action-btn--neutral {
  background: var(--hex-card);
  color: var(--hex-foreground);
}

@media (min-width: 640px) {
  .catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px;
  }

  .products-toolbar {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .products-toolbar input {
    flex: 1;
    min-width: 180px;
  }

  .products-toolbar select {
    width: auto;
    min-width: 140px;
  }

  .products-toolbar button {
    width: auto;
  }

  .products-toolbar__actions {
    display: contents;
  }

  .products-toolbar__actions button {
    width: auto;
  }
}

@media (min-width: 1024px) {
  .catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
    padding: 20px 24px;
  }

  .catalog-card__body {
    padding: 14px;
  }

  .catalog-card__actions {
    padding: 0 14px 14px;
  }

  .catalog-card__btn {
    min-height: 38px;
    font-size: 13px;
  }
}

.login-password-wrap {
  position: relative;
}

.login-password-wrap input {
  width: 100%;
  padding-right: 72px;
}

.login-password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--hex-primary);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 10px;
  cursor: pointer;
}

.login-remember {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--hex-foreground);
  user-select: none;
}

.login-remember input {
  width: 18px;
  height: 18px;
  accent-color: var(--hex-primary);
}

.pwa-install-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 9999;
}

.scroll-top-fab {
  position: fixed;
  left: max(12px, env(safe-area-inset-left, 0px));
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 42;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--hex-border);
  border-radius: 999px;
  background: var(--hex-card);
  color: var(--hex-primary);
  box-shadow: 0 6px 18px rgba(16, 22, 35, 0.14);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    background 0.15s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.scroll-top-fab.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.scroll-top-fab:active {
  background: color-mix(in srgb, var(--hex-primary) 12%, var(--hex-card));
}

.scroll-top-fab .ui-icon {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-shell--bottom-nav .scroll-top-fab {
  bottom: calc(var(--mobile-nav-offset) + 14px);
}

.app-shell--bottom-nav:has(.worker-view--ordering) .scroll-top-fab {
  bottom: calc(var(--mobile-nav-offset) + 76px);
}

.pwa-install-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--hex-card);
  border: 1px solid var(--hex-border);
  box-shadow: 0 8px 32px rgba(24, 32, 50, 0.16);
}

.pwa-install-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.pwa-install-text {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--hex-muted-foreground);
}

.pwa-install-actions {
  display: flex;
  gap: 8px;
}

.pwa-install-btn,
.pwa-install-dismiss {
  flex: 1;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
}

.pwa-install-btn {
  background: var(--hex-primary);
  color: var(--hex-primary-foreground);
}

.pwa-install-dismiss {
  background: var(--hex-secondary);
  color: var(--hex-foreground);
}

.install-toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 10000;
  max-width: min(92vw, 360px);
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(24, 32, 50, 0.92);
  color: #fff;
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
  transform: translate(-50%, 16px);
  opacity: 0;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
  pointer-events: none;
}

.install-toast--visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.ios-install-coach {
  position: fixed;
  inset: 0;
  z-index: 10001;
  pointer-events: none;
}

.ios-install-coach--visible .ios-install-coach-backdrop {
  opacity: 1;
}

.ios-install-coach--visible .ios-install-coach-panel {
  transform: translateY(0);
  opacity: 1;
}

.ios-install-coach-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 22, 35, 0.55);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: auto;
}

.ios-install-coach-panel {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  padding: 18px 16px 14px;
  border-radius: 16px;
  background: var(--hex-card);
  border: 1px solid var(--hex-border);
  box-shadow: 0 12px 40px rgba(16, 22, 35, 0.28);
  transform: translateY(24px);
  opacity: 0;
  transition:
    transform 0.28s ease,
    opacity 0.28s ease;
  pointer-events: auto;
  text-align: center;
}

.ios-install-coach-title {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 700;
}

.ios-install-coach-step {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--hex-foreground);
}

.ios-install-coach-arrow {
  margin: 6px 0 12px;
  font-size: 28px;
  line-height: 1;
  color: var(--hex-primary);
  animation: ios-coach-bounce 1.2s ease-in-out infinite;
}

@keyframes ios-coach-bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(8px);
  }
}

.ios-install-coach-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: var(--hex-primary);
  color: var(--hex-primary-foreground);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.install-coach-warn {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--hex-warning-soft);
  color: var(--hex-warning-text);
  font-size: 13px;
  line-height: 1.45;
  text-align: left;
}

@media (min-width: 640px) {
  .pwa-install-banner {
    left: auto;
    right: 16px;
    bottom: 16px;
    max-width: 360px;
  }
}

:root {
  --phi: 1.6180339887;
  --u: 10px;
  --phi-neg-1: calc(var(--u) / var(--phi));
  --phi-0: var(--u);
  --phi-1: calc(var(--u) * var(--phi));
  --phi-2: calc(var(--phi-1) * var(--phi));
  --phi-3: calc(var(--phi-2) * var(--phi));
  --phi-4: calc(var(--phi-3) * var(--phi));
  --phi-5: calc(var(--phi-4) * var(--phi));
  --content-max: min(100%, calc(780px * var(--phi)));
  --modal-max: min(100%, calc(420px * var(--phi)));
  --sheet-max-h: min(92dvh, calc(100dvh - var(--phi-4)));
  --background: 0.95 0.01 230;
  --foreground: 0.15 0.02 250;
  --card: 1 0 0;
  --primary: 0.55 0.12 195;
  --primary-foreground: 1 0 0;
  --secondary: 0.97 0.01 230;
  --muted-foreground: 0.45 0.02 250;
  --border: 0.88 0.01 230;
  --sidebar: 0.12 0.02 250;
  --sidebar-foreground: 0.95 0.01 230;
  --sidebar-primary: 0.55 0.12 195;
  --sidebar-primary-foreground: 1 0 0;
  --sidebar-accent: 0.2 0.02 250;
  --sidebar-border: 0.25 0.02 250;
  --hex-background: #eef2f5;
  --hex-foreground: #182032;
  --hex-card: #ffffff;
  --hex-primary: #16899a;
  --hex-primary-foreground: #ffffff;
  --hex-secondary: #f5f7f9;
  --hex-muted-foreground: #687386;
  --hex-border: #d8dee6;
  --hex-sidebar: #101623;
  --hex-sidebar-foreground: #eef2f5;
  --hex-sidebar-primary: #16899a;
  --hex-sidebar-primary-foreground: #ffffff;
  --hex-sidebar-accent: #252d3d;
  --hex-sidebar-border: #353d4e;
  --hex-primary-soft: #eaf6f8;
  --hex-primary-active: #e0f4f7;
  --hex-primary-dark: #117d8d;
  --hex-success: #16899a;
  --hex-success-soft: #eaf6f8;
  --hex-success-text: #0f6b78;
  --hex-danger: #c43c52;
  --hex-danger-soft: #fceef1;
  --hex-danger-text: #9f2f41;
  --hex-warning: #b07a1a;
  --hex-warning-soft: #faf3e6;
  --hex-warning-text: #8a5e12;
  --hex-info: #1a7a94;
  --hex-info-soft: #e6f3f7;
  --hex-info-active: #cfe8ef;
  --hex-info-text: #145f73;
  --btn-radius: var(--phi-1);
  --btn-h-sm: calc(var(--phi-3) - var(--phi-neg-1));
  --btn-h-md: var(--phi-3);
  --btn-h-lg: calc(var(--phi-3) + var(--phi-0));
  --field-h: calc(var(--phi-3) + var(--phi-neg-1));
  --thumb-md: var(--phi-4);
  --thumb-lg: calc(var(--phi-4) + var(--phi-0));
  --avatar-md: calc(var(--phi-3) + var(--phi-0));
  --avatar-lg: calc(var(--phi-4) + var(--phi-1));
  --thumb-radius: var(--phi-1);
  --thumb-border: 1.5px solid
    color-mix(in srgb, var(--hex-foreground) 14%, var(--hex-border));
  --thumb-shadow: 0 1px 3px rgba(16, 22, 35, 0.1);
  --mobile-nav-h: calc(var(--phi-4) + var(--phi-0));
  /* Safe-area tokens — iOS/Android-д ижил тооцоо */
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --mobile-nav-offset: calc(var(--mobile-nav-h) + var(--sab));
  --mobile-top-content-h: var(--phi-3);
  --mobile-top-bar-offset: calc(
    var(--sat) + var(--mobile-top-content-h) + var(--phi-1)
  );
  /* Viewport height: vh → dvh (Samsung/Apple browser chrome-д ойролцоо) */
  --app-vh: 100vh;
  --app-vh: 100dvh;
  --app-gutter: var(--phi-1);
  --space-1: var(--phi-neg-1);
  --space-2: var(--phi-0);
  --space-3: var(--phi-1);
  --space-4: var(--phi-2);
  --space-5: var(--phi-3);
  --space-6: var(--phi-4);
  --font-xs: 12px;
  --font-sm: 14px;
  --font-md: 16px;
  --font-lg: 18px;
  --font-xl: 22px;
  --font-display: 28px;
}

* {
  border-color: var(--hex-border);
  box-sizing: border-box;
}
html {
  height: 100%;
  height: -webkit-fill-available;
}
html,
body,
#app {
  min-height: 100%;
  min-height: var(--app-vh, 100dvh);
  min-height: -webkit-fill-available;
  background: var(--hex-background) !important;
}
body {
  margin: 0;
  background: var(--hex-background);
  color: var(--hex-foreground);
  font-size: var(--font-md);
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-family:
    "Roboto",
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

input,
select,
textarea,
button {
  box-shadow: none;
}

/* ——— UI system: buttons, fields, tabs ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  min-height: var(--btn-h-md);
  padding: 0 var(--phi-2);
  border: none;
  border-radius: var(--btn-radius);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--hex-foreground);
  background: var(--hex-secondary);
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    opacity 0.15s ease,
    filter 0.1s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:active:not(:disabled) {
  filter: brightness(0.94);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn.page-action-add,
.btn.btn--toolbar.btn--toolbar-add-product {
  background: var(--hex-primary) !important;
  color: #fff !important;
  box-shadow: 0 2px 10px rgba(104, 115, 134, 0.28);
}

.btn.btn--toolbar.btn--toolbar-add-product {
  border-color: var(--hex-primary) !important;
}

.btn.page-action-add:hover:not(:disabled),
.btn.btn--toolbar.btn--toolbar-add-product:hover:not(:disabled) {
  background: color-mix(in srgb, #000 10%, var(--hex-primary)) !important;
  color: #fff !important;
  border-color: color-mix(in srgb, #000 10%, var(--hex-primary)) !important;
  box-shadow: 0 3px 12px rgba(104, 115, 134, 0.32);
}

.btn.page-action-add:active:not(:disabled),
.btn.btn--toolbar.btn--toolbar-add-product:active:not(:disabled) {
  background: color-mix(in srgb, #000 16%, var(--hex-primary)) !important;
  color: #fff !important;
  border-color: color-mix(in srgb, #000 16%, var(--hex-primary)) !important;
}

.btn.page-action-add:active:not(:disabled) {
  filter: brightness(0.92);
}

.btn--sm {
  min-height: var(--btn-h-sm);
  padding: 0 12px;
  font-size: 13px;
  border-radius: 8px;
}

.btn--lg {
  min-height: var(--btn-h-lg);
  padding: 0 18px;
  font-size: 15px;
}

.btn--block {
  width: 100%;
}

.btn--primary {
  background: var(--hex-primary) !important;
  color: var(--hex-primary-foreground) !important;
}

.btn--primary:hover {
  background: var(--hex-primary-dark) !important;
}

.btn--primary:active:not(:disabled) {
  background: #0d5f6c !important;
  filter: brightness(0.96);
}

.btn--secondary {
  background: var(--hex-secondary) !important;
  color: var(--hex-foreground) !important;
}

.btn--secondary:active:not(:disabled) {
  background: color-mix(
    in srgb,
    var(--hex-foreground) 10%,
    var(--hex-secondary)
  ) !important;
}

.btn--ghost {
  background: transparent !important;
  color: var(--hex-foreground) !important;
}

.btn--ghost:active:not(:disabled) {
  background: var(--hex-secondary) !important;
}

.btn--danger {
  background: var(--hex-danger) !important;
  color: #fff !important;
}

.btn--danger:active:not(:disabled) {
  background: #a83548 !important;
}

.btn--sidebar {
  background: transparent !important;
  color: var(--hex-sidebar-foreground) !important;
  min-height: var(--btn-h-sm);
  padding: 0 12px;
  font-size: 13px;
}

.btn--sidebar:hover {
  background: var(--hex-sidebar-border) !important;
}

.btn--sidebar:active:not(:disabled) {
  background: color-mix(
    in srgb,
    #fff 12%,
    var(--hex-sidebar-border)
  ) !important;
  filter: brightness(0.94);
}

/* ——— Button press feedback (бүх интерактив товч) ——— */
#app button.bg-primary.text-primary-foreground:active:not(:disabled),
#modal button.bg-primary.text-primary-foreground:active:not(:disabled) {
  background: #0d5f6c !important;
}

#app button.bg-secondary:active:not(:disabled),
#modal button.bg-secondary:active:not(:disabled) {
  background: color-mix(
    in srgb,
    var(--hex-foreground) 10%,
    var(--hex-secondary)
  ) !important;
}

#app button.bg-card:active:not(:disabled),
#modal button.bg-card:active:not(:disabled) {
  background: color-mix(
    in srgb,
    var(--hex-foreground) 6%,
    var(--hex-card)
  ) !important;
}

button.tone:active:not(:disabled) {
  filter: brightness(0.94);
}

.seg-tab:active:not(:disabled) {
  filter: brightness(0.94);
}

.seg-tab.is-active:active:not(:disabled) {
  background: #0d5f6c;
  filter: none;
}

.catalog-card__btn:active:not(:disabled) {
  filter: brightness(0.94);
}

.catalog-card__btn--edit:active:not(:disabled),
.catalog-card__btn--primary:active:not(:disabled) {
  background: #0d5f6c;
  filter: none;
}

.catalog-card__btn--delete:active:not(:disabled) {
  background: #a83548;
  filter: none;
}

.list-btn:active:not(:disabled) {
  filter: brightness(0.94);
}

.list-btn--primary:active:not(:disabled) {
  background: #0d5f6c;
  filter: none;
}

.worker-pick-card:active:not(:disabled) {
  background: color-mix(in srgb, var(--hex-primary) 8%, var(--hex-secondary));
}

.worker-pick-card.is-selected:active:not(:disabled) {
  background: color-mix(
    in srgb,
    var(--hex-primary-soft) 75%,
    var(--hex-primary) 8%
  );
}

.picker-cat-chip:active:not(:disabled) {
  filter: brightness(0.94);
}

.picker-cat-chip.is-active:active:not(:disabled) {
  background: #0d5f6c;
  filter: none;
}

.mobile-bottom-nav__item:active:not(:disabled) {
  background: color-mix(in srgb, var(--hex-primary) 14%, var(--hex-secondary));
}

.mobile-menu-button:active:not(:disabled) {
  filter: brightness(0.9);
}

.sidebar-nav-btn:active:not(:disabled) {
  filter: brightness(0.94);
}

.sidebar-nav-btn.is-active:active:not(:disabled) {
  background: #0d5f6c;
  filter: none;
}

.modal-close:active:not(:disabled) {
  background: color-mix(
    in srgb,
    var(--hex-foreground) 10%,
    var(--hex-secondary)
  ) !important;
}

.confirm-card__btn:active:not(:disabled) {
  filter: brightness(0.94);
}

.confirm-card__btn--confirm:active:not(:disabled),
.confirm-card__btn--danger:active:not(:disabled) {
  filter: brightness(0.88);
}

.confirm-card__btn--cancel:active:not(:disabled) {
  filter: brightness(0.92);
}

.delivery-picker-option:active:not(:disabled) {
  background: color-mix(in srgb, var(--hex-primary) 10%, var(--hex-secondary));
}

.promo-product-row:active:not(:disabled) {
  background: color-mix(in srgb, var(--hex-primary) 10%, var(--hex-secondary));
}

.worker-row-qty:active:not(:disabled) {
  background: color-mix(in srgb, var(--hex-primary) 14%, var(--hex-secondary));
}

.picker-row__ordered:active:not(:disabled) {
  background: color-mix(in srgb, var(--hex-primary) 10%, var(--hex-secondary));
}

.worker-order-add-btn:active {
  background: var(--hex-primary-active);
  color: var(--hex-primary-foreground);
}

.qty-stepper__btn:active:not(:disabled) {
  background: var(--hex-primary-soft);
}

/* ——— Anti hover-flicker: never move hit-box under the cursor ——— */
.btn,
.btn:hover,
.btn:active,
.btn:focus,
.sidebar-nav-btn,
.sidebar-nav-btn:hover,
.sidebar-nav-btn:active,
.mobile-bottom-nav__item,
.mobile-bottom-nav__item:hover,
.mobile-bottom-nav__item:active,
.mobile-menu-button,
.mobile-menu-button:hover,
.mobile-menu-button:active,
.mobile-top-bar__back,
.mobile-top-bar__back:hover,
.mobile-top-bar__back:active,
.seg-tab,
.seg-tab:hover,
.seg-tab:active,
.list-btn,
.list-btn:hover,
.list-btn:active,
.catalog-card__btn,
.catalog-card__btn:hover,
.catalog-card__btn:active,
.picker-cat-chip,
.picker-cat-chip:hover,
.picker-cat-chip:active,
.modal-close,
.modal-close:hover,
.modal-close:active,
.confirm-card__btn,
.confirm-card__btn:hover,
.confirm-card__btn:active,
.confirm-card__close,
.confirm-card__close:hover,
.confirm-card__close:active,
.qty-stepper__btn,
.qty-stepper__btn:hover,
.qty-stepper__btn:active,
.worker-order-add-btn,
.worker-order-add-btn:hover,
.worker-order-add-btn:active,
.worker-row-qty,
.worker-row-qty:hover,
.worker-row-qty:active,
.promo-product-row,
.promo-product-row:hover,
.promo-product-row:active,
.page-head__back,
.page-head__back:hover,
.page-head__back:active,
.btn--toolbar,
.btn--toolbar:hover,
.btn--toolbar:active,
.sidebar-pwa-btn,
.sidebar-pwa-btn:hover,
.sidebar-pwa-btn:active,
.admin-action,
.admin-action:hover,
.admin-action:active,
.catalog-card,
.catalog-card:hover,
.admin-metric-card,
.admin-metric-card:hover,
.admin-menu__item,
.admin-menu__item:hover,
.admin-menu__item:active,
.delivery-store-card,
.delivery-store-card:hover,
.delivery-store-card:active,
.promo-panel__add,
.promo-panel__add:hover,
.promo-panel__add:active,
.promo-form__save,
.promo-form__save:hover,
.promo-form__save:active {
  transform: none !important;
}

.btn > *,
.sidebar-nav-btn > *,
.mobile-bottom-nav__item > *,
.seg-tab > *,
.list-btn > *,
.catalog-card__btn > *,
.confirm-card__btn > *,
.picker-cat-chip > *,
.page-head__back > *,
.btn--toolbar > *,
.sidebar-pwa-btn > *,
.mobile-menu-button > *,
.qty-stepper__btn > * {
  pointer-events: none;
}

button:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--hex-primary) 65%, transparent);
  outline-offset: 2px;
}

.field-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--hex-foreground);
}

.field-input {
  display: block;
  width: 100%;
  min-height: var(--field-h);
  padding: 10px 14px;
  border-radius: var(--btn-radius);
  border: 1.5px solid var(--hex-border);
  background: var(--hex-secondary);
  color: var(--hex-foreground);
}

.field-input:focus {
  outline: none;
  border-color: var(--hex-primary);
  box-shadow: 0 0 0 3px rgba(22, 137, 154, 0.18);
}

.promo-main-tabs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.promo-main-tab {
  min-height: var(--btn-h-md);
  padding: 12px 14px;
  border: 1px solid var(--hex-border);
  border-radius: var(--btn-radius);
  background: var(--hex-secondary);
  color: var(--hex-foreground);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}

.promo-main-tab.is-active {
  border-color: var(--hex-primary);
  background: var(--hex-primary);
  color: var(--hex-primary-foreground);
}

@media (min-width: 640px) {
  .promo-main-tabs {
    flex-direction: row;
  }

  .promo-main-tab {
    flex: 1;
    text-align: center;
    font-size: 12px;
    padding: 10px 8px;
  }
}

.seg-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border-radius: var(--btn-radius);
  background: var(--hex-secondary);
}

.seg-tabs--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.seg-tab {
  min-height: var(--btn-h-md);
  padding: 0 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--hex-muted-foreground);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    transform 0.1s ease,
    filter 0.1s ease;
  -webkit-tap-highlight-color: transparent;
}

.seg-tab.is-active {
  background: var(--hex-primary);
  color: var(--hex-primary-foreground);
  box-shadow: 0 1px 3px rgba(16, 22, 35, 0.12);
}

#app button.bg-primary,
#modal button.bg-primary {
  min-height: var(--btn-h-md);
  border-radius: var(--btn-radius);
  font-weight: 600;
}

#app button.bg-primary.text-primary-foreground,
#modal button.bg-primary.text-primary-foreground {
  font-size: 14px;
}

#app button.bg-secondary.rounded,
#modal button.bg-secondary.rounded,
#app button.bg-card.rounded {
  min-height: var(--btn-h-md);
  border-radius: var(--btn-radius);
  font-weight: 600;
  color: var(--hex-foreground);
}

.mobile-menu-button,
.mobile-bottom-nav__item,
.login-password-toggle,
.modal-close,
.worker-add-plus,
.delivery-field__trigger,
.picker-row__checkbox,
.picker-row,
.seg-tab,
.list-btn {
  min-height: unset;
}

.auth-screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top, 0px)) 16px
    max(24px, env(safe-area-inset-bottom, 0px));
  background: linear-gradient(
    165deg,
    var(--hex-background) 0%,
    var(--hex-primary-soft) 100%
  );
}

.auth-form .field-input {
  font-size: 16px;
  line-height: 1.35;
}

@media (max-width: 640px) {
  .auth-screen {
    align-items: flex-start;
    justify-content: flex-start;
    padding-top: max(20px, env(safe-area-inset-top, 0px));
    min-height: auto;
  }
}

.auth-card {
  width: 100%;
  max-width: var(--modal-max);
  padding: var(--phi-3) var(--phi-2);
  border-radius: var(--phi-2);
  border: 1px solid var(--hex-border);
  background: var(--hex-card);
  box-shadow: 0 var(--phi-1) var(--phi-4) rgba(16, 22, 35, 0.08);
}

.auth-card__brand {
  text-align: center;
  margin-bottom: var(--phi-2);
}

.auth-card__title {
  margin: var(--phi-0) 0 var(--phi-neg-1);
  font-size: var(--font-lg);
  font-weight: 800;
  color: var(--hex-foreground);
}

.auth-card__subtitle {
  margin: 0;
  font-size: var(--font-sm);
  color: var(--hex-muted-foreground);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--phi-1);
}

.auth-form__error:empty {
  display: none;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background: var(--hex-sidebar-accent);
}

.sidebar-user__avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--hex-sidebar-primary);
  color: var(--hex-sidebar-primary-foreground);
  font-size: 15px;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.sidebar-user__meta {
  flex: 1;
  min-width: 0;
}

.sidebar-user__name {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user__role {
  margin: 2px 0 0;
  font-size: 12px;
  color: #a9b1bf;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-nav-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: var(--btn-h-md);
  padding: 10px 12px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--hex-sidebar-foreground);
  text-align: left;
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease,
    filter 0.1s ease;
  -webkit-tap-highlight-color: transparent;
}

.sidebar-nav-btn__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
}

.sidebar-nav-btn__icon .ui-icon {
  width: 20px;
  height: 20px;
}

.sidebar-nav-btn__label {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.sidebar-nav-btn.is-active {
  background: var(--hex-sidebar-primary);
  color: var(--hex-sidebar-primary-foreground);
  box-shadow: 0 4px 14px rgba(22, 137, 154, 0.28);
}

.sidebar-nav-btn.is-active .sidebar-nav-btn__icon {
  background: rgba(255, 255, 255, 0.18);
}

.sidebar-nav-btn:not(.is-active):hover {
  background: var(--hex-sidebar-accent);
}

.sidebar-nav-section {
  margin: 0 0 6px;
  padding: 0 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8b95a8;
}

.sidebar-brand__tag {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 500;
  color: #8b95a8;
  line-height: 1.3;
}

.app-sidebar-nav {
  display: none;
  flex-direction: column;
}

@media (min-width: 1024px) {
  .app-sidebar-nav {
    display: flex !important;
  }
}

@media (max-width: 1023px) {
  .app-shell--bottom-nav .app-sidebar-nav {
    display: none !important;
  }

  .app-shell:not(.app-shell--bottom-nav) .app-sidebar-nav {
    display: flex !important;
  }
}

.sidebar-foot {
  flex-shrink: 0;
}

.sidebar-pwa-btn {
  display: flex;
  align-items: center;
  width: 100%;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px dashed
    color-mix(
      in srgb,
      var(--hex-sidebar-primary) 45%,
      var(--hex-sidebar-border)
    );
  border-radius: 12px;
  background: rgba(22, 137, 154, 0.08);
  color: var(--hex-sidebar-primary);
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}

.sidebar-pwa-btn:hover {
  background: rgba(22, 137, 154, 0.14);
  border-color: var(--hex-sidebar-primary);
}

.app-sidebar {
  width: min(82vw, 280px);
  overflow: hidden;
}

@media (max-width: 1023px) {
  .mobile-sidebar {
    transition:
      transform 0.3s ease,
      opacity 0.3s ease;
  }

  .mobile-sidebar.-translate-x-full {
    opacity: 0;
    pointer-events: none;
  }

  .mobile-sidebar.translate-x-0 {
    opacity: 1;
    pointer-events: auto;
    z-index: 55;
  }

  .app-shell:has(.mobile-sidebar.translate-x-0) .mobile-bottom-nav {
    visibility: hidden;
    pointer-events: none;
  }

  .sidebar-user {
    flex-wrap: wrap;
  }

  .sidebar-user .btn--sidebar {
    flex: 1 1 100%;
    margin-top: 4px;
    justify-content: center;
  }
}

.btn--block-mobile {
  width: 100%;
}

.app-shell {
  min-height: 100dvh;
}

.app-main__inner {
  width: 100%;
  min-width: 0;
  max-width: var(--content-max);
  margin-inline: auto;
}

.mobile-top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 35;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: var(--mobile-top-content-h);
  padding: var(--phi-neg-1) var(--phi-1);
  padding-top: calc(var(--phi-neg-1) + var(--sat));
  background: var(--hex-card);
  border-bottom: 1px solid var(--hex-border);
  box-shadow: none;
}

.mobile-top-bar__title {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: calc(var(--font-md) + 1px);
  font-weight: 700;
  line-height: var(--phi);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  text-transform: none;
}

.mobile-top-bar__back,
.mobile-top-bar__back-spacer {
  flex-shrink: 0;
  width: var(--field-h);
  height: var(--field-h);
}

.mobile-top-bar__back {
  display: grid;
  place-items: center;
  border: none;
  border-radius: var(--phi-0);
  background: transparent;
  color: var(--hex-primary);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mobile-top-bar__back .ui-icon {
  width: 24px;
  height: 24px;
  stroke-width: 2.25;
}

.mobile-top-bar__back:active:not(:disabled) {
  background: var(--hex-secondary);
}

.mobile-top-bar__user {
  flex-shrink: 0;
  width: var(--field-h);
  height: var(--field-h);
  border: none;
  border-radius: 50%;
  background: var(--hex-primary);
  color: var(--hex-primary-foreground);
  font-size: var(--font-sm);
  font-weight: 800;
  cursor: pointer;
}

.mobile-top-bar--worker-orders {
  background: #eef2f6;
  border-bottom-color: #cfd8e3;
}

.mobile-top-bar--worker-orders .mobile-top-bar__title {
  color: var(--hex-foreground);
}

.mobile-top-bar--worker-orders-arrived {
  animation: worker-orders-top-arrive 1.3s ease;
}

@keyframes worker-orders-top-arrive {
  0% {
    background: #cfe9ee;
  }
  100% {
    background: #eef2f6;
  }
}

.worker-view--orders-arrived .worker-view__tabs {
  animation: worker-orders-top-arrive 1.3s ease;
}

.mobile-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: var(--phi-neg-1);
  box-sizing: border-box;
  min-height: var(--mobile-nav-offset);
  height: var(--mobile-nav-offset);
  padding: var(--phi-neg-1) var(--phi-0) var(--sab);
  background: var(--hex-card);
  border-top: 1px solid var(--hex-border);
  box-shadow: none;
}

.mobile-bottom-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--phi-neg-1);
  min-height: calc(var(--phi-3) + var(--phi-0));
  padding: var(--phi-neg-1) var(--phi-neg-1);
  border: none;
  border-radius: var(--phi-0);
  background: transparent;
  color: var(--hex-muted-foreground);
  font-size: var(--font-sm);
  font-weight: 700;
  line-height: 1.25;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mobile-bottom-nav__item.is-active {
  background: var(--hex-primary-soft);
  color: var(--hex-primary);
}

.ui-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: none;
  box-shadow: none;
  text-shadow: none;
}

.ui-icon--lg {
  width: 32px;
  height: 32px;
}

.mobile-bottom-nav__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  line-height: 1;
}

.mobile-bottom-nav__icon .ui-icon {
  width: 22px;
  height: 22px;
}

.mobile-stats .stat-card {
  padding: 10px 10px !important;
}

.mobile-stats .stat-card__label {
  font-size: 13px !important;
}

.mobile-stats .stat-card__value {
  font-size: 1.125rem !important;
}

.mobile-bottom-nav__label {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-action-bar {
  padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
  box-shadow: none;
  border-top: 1px solid var(--hex-border);
}

.page-head__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.modal-panel__title {
  font-size: 1.05rem;
}

#picker-order-title {
  min-width: 0;
  flex: 1;
  text-align: left;
}

#picker-order-title .worker-order-store__name {
  font-size: 1.05rem;
}

#picker-order-title .worker-order-store__loc {
  font-size: 12px;
  font-weight: 600;
}

#picker-order-title .worker-order-store__reg,
#picker-order-title .worker-order-store__phone {
  margin-top: 2px;
  font-size: 13px;
}

.modal-panel--picker .modal-panel__head {
  padding-top: calc(12px + var(--sat));
}

.modal-panel--picker {
  display: flex;
  flex-direction: column;
  max-height: min(88vh, 820px);
}

.modal-panel--picker .picker-step2 {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
}

.modal-panel--deletion-log {
  display: flex;
  flex-direction: column;
  max-height: min(90vh, 760px);
}

.deletion-log-modal {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  gap: 12px;
  padding: 16px;
}

.deletion-log-modal__hint {
  margin: 0;
  flex-shrink: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--hex-muted-foreground);
}

.deletion-log-modal__scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  border: 1px solid var(--hex-border);
  border-radius: 10px;
  background: var(--hex-card);
}

.deletion-log-modal__table-wrap {
  min-width: 520px;
}

.deletion-log-modal__table {
  width: 100%;
  border-collapse: collapse;
}

.deletion-log-modal__table thead {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--hex-secondary);
}

.deletion-log-modal__table th {
  padding: 10px 12px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  color: var(--hex-foreground);
  border-bottom: 1px solid var(--hex-border);
  white-space: nowrap;
}

.deletion-log-modal__table td {
  padding: 10px 12px;
  text-align: left;
  font-size: 13px;
  line-height: 1.35;
  border-bottom: 1px solid var(--hex-border);
  vertical-align: top;
}

.deletion-log-modal__table tbody tr:last-child td {
  border-bottom: none;
}

.deletion-log-modal__close {
  flex-shrink: 0;
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: none;
  border-radius: 10px;
  background: var(--hex-secondary);
  color: var(--hex-foreground);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.deletion-log-modal__close:active {
  filter: brightness(0.96);
}

.picker-list .picker-row:last-child {
  border-bottom: none;
}

.receipt-edit-head {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.modal-panel--confirm {
  max-width: 22rem;
}

.modal-panel--confirm .modal-panel__head {
  padding: 14px 16px;
}

.modal-panel--confirm .modal-panel__title {
  font-size: 1rem;
}

.modal-panel__head--back {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 8px;
  padding: calc(12px + var(--sat)) max(16px, var(--sar)) 12px
    max(12px, var(--sal));
}

.modal-panel__head--back .modal-close--back {
  grid-column: 1;
  grid-row: 1;
  z-index: 1;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  display: grid;
  place-items: center;
}

.modal-panel__head--back .modal-close--back .ui-icon {
  width: 22px;
  height: 22px;
}

.modal-panel__head--back .modal-panel__title {
  grid-column: 1 / -1;
  grid-row: 1;
  margin: 0;
  text-align: center;
  padding: 0 48px;
  pointer-events: none;
}

.product-form__category-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.product-form__category-row select {
  min-width: 0;
  flex: 1;
}

.product-form__category-add {
  flex-shrink: 0;
  border: 0;
  border-radius: 10px;
  padding: 0 12px;
  background: var(--hex-primary);
  color: var(--hex-primary-foreground);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.product-form__category-new {
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin-top: 8px;
}

.product-form__category-new[hidden] {
  display: none !important;
}

/* Product add/edit: keep Хадгалах pinned while the form body scrolls. */
.modal-panel.product-form-modal {
  display: flex !important;
  flex-direction: column !important;
  max-height: min(90vh, 920px) !important;
  overflow: hidden !important;
}

.modal-panel.product-form-modal .modal-panel__head {
  flex-shrink: 0;
}

.modal-panel.product-form-modal .product-form {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: hidden !important;
}

.modal-panel.product-form-modal .product-form__body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
}

.modal-panel.product-form-modal .product-form__foot {
  flex-shrink: 0 !important;
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-top: 0 !important;
  padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px)) !important;
  background: var(--hex-card, #fff);
  border-top: 1px solid var(--hex-border, #d8dee6);
  box-shadow: 0 -8px 18px rgba(16, 22, 35, 0.06);
}

.modal-panel.product-form-modal .product-form__foot .btn,
.modal-panel.product-form-modal .product-form__foot button[type="submit"] {
  min-height: 48px;
  width: 100%;
}

.product-add-chooser__btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  padding: 16px 18px;
  border: 0;
  border-radius: 12px;
  background: var(--hex-secondary, #f1f3f6);
  text-align: left;
  cursor: pointer;
}
.product-add-chooser__btn strong {
  font-size: 16px;
}
.product-add-chooser__btn span {
  font-size: 13px;
  color: var(--hex-muted-foreground, #667085);
}
.product-add-chooser__btn--primary {
  background: var(--hex-primary);
  color: var(--hex-primary-foreground);
}
.product-add-chooser__btn--primary span {
  color: inherit;
  opacity: 0.85;
}

.product-card__badge {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--hex-primary);
  color: var(--hex-primary-foreground);
  font-size: 11px;
  font-weight: 700;
  vertical-align: middle;
}

.bundle-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--hex-border, #d8dee6);
  border-radius: 10px;
}
.bundle-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.bundle-table th,
.bundle-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--hex-border, #e6e8ee);
  text-align: left;
  vertical-align: middle;
}
.bundle-table th {
  background: var(--hex-secondary, #f1f3f6);
  font-weight: 700;
  white-space: nowrap;
}
.bundle-table__no {
  width: 36px;
  color: var(--hex-muted-foreground, #667085);
}
.bundle-table__remove {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: var(--hex-muted-foreground, #667085);
}
.bundle-table--edit td input,
.bundle-table--edit td select {
  min-width: 72px;
}

.confirm-card-overlay[hidden] {
  display: none !important;
}

.confirm-card-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(16, 22, 35, 0.52);
}

.confirm-card-overlay--blur {
  background: rgba(16, 22, 35, 0.58);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.confirm-card__field {
  display: block;
  margin: 4px 0 0;
}

.confirm-card__field .field-input {
  width: 100%;
}

.confirm-card {
  width: 100%;
  max-width: 22rem;
  background: #fff;
  border-radius: 14px;
  padding: 20px 18px 18px;
  box-shadow: 0 18px 40px rgba(16, 22, 35, 0.22);
  display: flex;
  flex-direction: column;
  max-height: min(88vh, 640px);
}

.confirm-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.confirm-card__title {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  color: #182032;
}

.confirm-card__close {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: -4px -4px 0 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #eef2f6;
  color: #687386;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.confirm-card__close:active:not(:disabled) {
  filter: brightness(0.96);
}

.confirm-card__message {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #687386;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.confirm-card__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 18px;
  flex-shrink: 0;
}

.confirm-card__actions--single {
  grid-template-columns: 1fr;
}

.confirm-card__btn {
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.15s ease,
    transform 0.1s ease,
    filter 0.1s ease;
  -webkit-tap-highlight-color: transparent;
}

.confirm-card__btn--confirm {
  background: #eef2f6;
  color: #101828;
  font-weight: 600;
  border: 1px solid #c8d2dc;
}

.confirm-card__btn--danger {
  background: #c43c52;
  color: #fff;
}

.confirm-card__btn--cancel {
  background: #16899a;
  color: #fff;
  font-weight: 700;
  border: 0;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 0 rgba(16, 22, 35, 0.06);
}

.confirm-card__btn--full {
  width: 100%;
}

.confirm-modal {
  padding: 16px 20px 20px;
}

.confirm-modal__text {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--muted-foreground, #687386);
}

.confirm-modal__actions {
  margin-top: 16px;
}

.receipt-edit-modal {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: calc(90vh - 72px);
  overflow-y: auto;
}

.receipt-edit-lock-note {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--hex-danger, #b42318) 10%, transparent);
  color: var(--hex-danger, #b42318);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.receipt-edit-store {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--hex-secondary);
}

.receipt-edit-store__name {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}

.receipt-edit-store__meta {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--hex-muted-foreground);
  line-height: 1.35;
}

.receipt-edit-store__pill {
  display: inline-flex;
  margin-top: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.receipt-edit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.receipt-edit-row + .receipt-edit-row {
  border-top: 1px solid var(--hex-border);
}

.receipt-edit-row__name {
  padding: 10px 8px 10px 0;
  vertical-align: middle;
}

.receipt-edit-row__qty {
  width: 72px;
  padding: 8px 4px;
  text-align: right;
  vertical-align: middle;
}

.receipt-edit-row__sum {
  width: 96px;
  padding: 10px 0 10px 8px;
  text-align: right;
  font-weight: 700;
  white-space: nowrap;
  vertical-align: middle;
}

.receipt-edit-qty {
  width: 56px;
  min-height: 34px !important;
  height: 34px;
  padding: 0 6px !important;
  text-align: center;
  font-size: 14px !important;
  font-weight: 700;
}

.receipt-edit-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--hex-border);
  font-size: 15px;
  font-weight: 700;
}

.receipt-edit-printbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--hex-border);
}

.receipt-edit-printbar .receipt-edit-total {
  flex: 1;
  min-width: 120px;
  padding-top: 0;
  border-top: none;
}

.receipt-edit-total strong {
  color: var(--hex-primary);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 1023px) {
  .modal-panel.shadow-lg {
    box-shadow: 0 -12px 40px rgba(16, 22, 35, 0.12) !important;
  }

  /* Захиалгын форм: app-main гүйлгэнэ (overflow:hidden биш — түгжигдэхээс сэргийлнэ). */
  .app-shell--bottom-nav .app-main:has(.worker-view--ordering) {
    overflow-x: hidden;
    overflow-y: auto;
    padding-bottom: calc(
      var(--mobile-nav-offset) + var(--worker-savebar-h, 72px) + var(--phi-1)
    ) !important;
  }

  .app-shell--bottom-nav .app-main__inner:has(.worker-view--ordering) {
    display: block;
    height: auto;
    min-height: 0;
  }

  .app-shell--stock-in {
    height: var(--app-vh, 100dvh);
    max-height: var(--app-vh, 100dvh);
    overflow: hidden;
  }

  .app-shell--stock-in .mobile-menu-button,
  .app-shell--stock-in .mobile-top-bar {
    display: none !important;
  }

  .app-shell--stock-in .app-main {
    padding: 0 !important;
    overflow: hidden;
  }

  .app-shell--stock-in .app-main__inner {
    height: 100%;
    min-height: 0;
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important;
    display: flex;
    flex-direction: column;
  }

  .app-shell--stock-in .app-main__inner > .stock-in-sheet {
    flex: 1;
    min-height: 0;
    height: 100% !important;
    max-height: none !important;
    margin: 0;
  }

  /* Apple/Samsung: status bar-ийн доор ижил зай (translucent биш) */
  .app-shell--stock-in .stock-in-sheet__head {
    padding-top: max(12px, var(--sat));
  }

  /* Орлого: гадна scroll түгжиж, жагсаалт дотор л гүйлгэнэ. Footer бэхлэгдэнэ. */
  .app-shell--bottom-nav .app-main:has(.stock-in-sheet) {
    overflow: hidden;
  }

  .app-shell--bottom-nav .app-main__inner:has(.stock-in-sheet) {
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  .app-shell--bottom-nav
    .app-main__inner:has(.stock-in-sheet)
    > .stock-in-sheet {
    flex: 1;
    min-height: 0;
    height: auto;
    max-height: none;
    margin: 0;
  }

  .app-shell--bottom-nav .app-main {
    padding-top: var(--mobile-top-bar-offset) !important;
    padding-bottom: calc(var(--mobile-nav-offset) + var(--phi-1)) !important;
    padding-left: var(--app-gutter) !important;
    padding-right: var(--app-gutter) !important;
    scroll-padding-top: var(--mobile-top-bar-offset);
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--hex-primary) #e6e6e6;
  }

  .app-shell--bottom-nav .app-main::-webkit-scrollbar {
    width: 10px;
  }

  .app-shell--bottom-nav .app-main::-webkit-scrollbar-track {
    background: #e6e6e6;
  }

  .app-shell--bottom-nav .app-main::-webkit-scrollbar-thumb {
    background: var(--hex-primary);
    border-radius: 8px;
    border: 2px solid #e6e6e6;
  }

  .app-shell--bottom-nav {
    height: var(--app-vh, 100dvh);
    max-height: var(--app-vh, 100dvh);
    overflow: hidden;
  }

  .app-shell--bottom-nav .app-main__inner {
    padding-top: 0 !important;
  }

  /* Гарчиг mobile-top-bar дээр байгаа тул давхар гарчиг нуух */
  .app-shell--bottom-nav .page-head__title {
    display: none !important;
  }

  .app-shell--bottom-nav .page-head--row {
    margin: 0;
  }

  .app-shell--bottom-nav .page-head--row .page-head__actions {
    width: 100%;
    margin-bottom: 4px;
  }

  .app-shell--bottom-nav
    .page-head--row:has(.page-head__actions)
    .page-head__title {
    display: none !important;
  }

  .app-shell:not(.app-shell--bottom-nav) .mobile-top-bar {
    display: none;
  }

  .app-shell:not(.app-shell--bottom-nav) .app-main {
    padding-top: calc(12px + env(safe-area-inset-top, 0px)) !important;
    padding-bottom: max(16px, env(safe-area-inset-bottom, 0px)) !important;
  }

  .app-shell:not(.app-shell--bottom-nav) .app-main__inner {
    padding-top: 52px !important;
  }

  /* Орлого: дээд хоосон зай бүү үлдээ (дээрх :not(bottom-nav) padding-ийг дарна). */
  .app-shell--stock-in.app-shell:not(.app-shell--bottom-nav) .app-main,
  .app-shell--stock-in .app-main {
    padding: 0 !important;
  }

  .app-shell--stock-in.app-shell:not(.app-shell--bottom-nav) .app-main__inner,
  .app-shell--stock-in .app-main__inner {
    padding-top: 0 !important;
  }

  .mobile-menu-button--sheet {
    display: none !important;
  }

  .page-head--row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .page-head__actions {
    width: 100%;
  }

  .page-head__actions .btn,
  .page-head__actions button {
    flex: 1;
    min-width: 0;
  }

  .modal-backdrop {
    align-items: flex-end !important;
    padding: 0 !important;
  }

  .modal-panel {
    max-width: 100% !important;
    max-height: var(--sheet-max-h) !important;
    margin: 0 !important;
    border-radius: var(--phi-2) var(--phi-2) 0 0 !important;
  }

  .modal-panel.product-form-modal {
    max-height: var(--sheet-max-h) !important;
  }

  .modal-panel__head {
    padding-top: calc(var(--space-3) + var(--sat)) !important;
  }

  .modal-close {
    min-width: var(--field-h);
    min-height: var(--field-h);
  }

  .seg-tab {
    min-height: var(--btn-h-md);
    font-size: 13px;
    padding: 0 8px;
  }

  .seg-tabs--3 .seg-tab {
    font-size: 12px;
  }

  .seg-tabs--4 .seg-tab {
    font-size: 11px;
    padding: 0 4px;
  }

  #app button.bg-primary,
  #modal button.bg-primary,
  #app button.bg-secondary.rounded,
  #modal button.bg-secondary.rounded,
  .btn:not(.btn--sm):not(.modal-close):not(.catalog-card__btn):not(
      .picker-row
    ) {
    min-height: var(--btn-h-md) !important;
    font-size: 15px !important;
  }

  .field-input,
  #app input.app-input:not(.qty-stepper__input):not(.worker-order-opt__input),
  #app textarea.app-input:not(.worker-order-opt__input),
  #app select,
  #modal input.app-input:not(.qty-stepper__input):not(.worker-order-opt__input),
  #modal textarea.app-input:not(.worker-order-opt__input),
  #modal select {
    min-height: var(--field-h);
  }

  #app textarea.worker-order-opt__input,
  #modal textarea.worker-order-opt__input {
    min-height: 30px !important;
    font-size: 13px !important;
    line-height: 1.35 !important;
  }

  .auth-card {
    max-width: none;
    border-radius: 20px;
    padding: 28px 20px;
  }

  .auth-card__title {
    font-size: 1.4rem;
  }

  .qty-stepper:not(.picker-qty-stepper--compact):not(.picker-qty-stepper--sheet)
    button,
  .qty-stepper:not(.picker-qty-stepper--compact):not(.picker-qty-stepper--sheet)
    input {
    height: 44px;
    min-height: 44px;
  }

  .worker-add-plus {
    width: 56px;
    height: 56px;
    font-size: 30px;
  }

  .delivery-field__trigger {
    min-height: 56px;
    padding: 14px;
  }

  .sidebar-nav-btn {
    min-height: 48px;
    font-size: 15px;
  }
}

@media (min-width: 640px) {
  .btn--block-mobile {
    width: auto;
  }
}

@media (min-width: 1024px) {
  .app-shell {
    --sidebar-w: 272px;
    min-height: 100dvh;
  }

  .mobile-top-bar,
  .mobile-bottom-nav {
    display: none !important;
  }

  .app-sidebar {
    position: sticky;
    top: 0;
    width: var(--sidebar-w);
    min-width: var(--sidebar-w);
    height: 100dvh;
    border-right: 1px solid var(--hex-sidebar-border);
    box-shadow: 4px 0 28px rgba(16, 22, 35, 0.1);
  }

  .app-sidebar-nav {
    padding: 12px 14px 16px !important;
    gap: 4px;
  }

  .sidebar-brand {
    padding: 22px 18px 18px !important;
  }

  .sidebar-foot {
    padding: 16px 14px 18px !important;
  }

  .sidebar-user {
    padding: 12px;
    border-radius: 14px;
  }

  .app-main {
    flex: 1;
    min-width: 0;
    min-height: 100dvh;
    padding: var(--phi-3) var(--phi-4) var(--phi-4) !important;
    background:
      radial-gradient(
        ellipse 80% 50% at 100% 0%,
        rgba(22, 137, 154, 0.06),
        transparent 55%
      ),
      var(--hex-background);
  }

  .app-main__inner {
    padding-top: 0 !important;
    max-width: var(--content-max);
  }

  .page-head__title {
    font-size: var(--font-xl);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: var(--phi-neg-1);
    text-transform: none;
  }

  .stat-card {
    border: none;
    box-shadow: none;
  }

  .admin-action,
  .bg-card.rounded {
    border: none;
    box-shadow: none;
    transition: background 0.15s ease;
  }

  .admin-action:hover {
    box-shadow: none;
    background: var(--hex-secondary);
  }

  .worker-order-card,
  section.bg-card.rounded {
    box-shadow: none;
  }
}

aside[class*="bg-sidebar"] {
  background: var(--hex-sidebar) !important;
  color: var(--hex-sidebar-foreground) !important;
}

main {
  background: var(--hex-background) !important;
}

.bg-background {
  background-color: var(--hex-background) !important;
}
.text-foreground {
  color: var(--hex-foreground) !important;
}
.bg-card {
  background-color: var(--hex-card) !important;
}
.bg-primary {
  background-color: var(--hex-primary) !important;
}
.text-primary {
  color: var(--hex-primary) !important;
}
.text-primary-foreground {
  color: var(--hex-primary-foreground) !important;
}
.bg-secondary {
  background-color: var(--hex-secondary) !important;
}
.text-muted-foreground {
  color: var(--hex-muted-foreground) !important;
}

@media (max-width: 1023px) {
  #app .text-sm,
  #modal .text-sm {
    font-size: 15px !important;
    line-height: 1.45;
  }

  #app .text-xs,
  #modal .text-xs {
    font-size: 13px !important;
    line-height: 1.4;
  }

  .page-head__title {
    font-size: 1.125rem;
    line-height: 1.35;
  }

  .admin-menu__item {
    font-size: 16px;
  }

  .promo-type-menu__label,
  .promo-hub-card__label {
    font-size: 16px;
  }

  .product-card__title {
    font-size: 15px;
  }
}

.border-border {
  border-color: var(--hex-border) !important;
}
.divide-border > :not([hidden]) ~ :not([hidden]) {
  border-color: var(--hex-border) !important;
}
.bg-sidebar {
  background-color: var(--hex-sidebar) !important;
}
.text-sidebar-foreground {
  color: var(--hex-sidebar-foreground) !important;
}
.text-sidebar-primary {
  color: var(--hex-sidebar-primary) !important;
}
.bg-sidebar-primary {
  background-color: var(--hex-sidebar-primary) !important;
}
.text-sidebar-primary-foreground {
  color: var(--hex-sidebar-primary-foreground) !important;
}
.bg-sidebar-accent {
  background-color: var(--hex-sidebar-accent) !important;
}
.border-sidebar-border {
  border-color: var(--hex-sidebar-border) !important;
}

.bg-primary\/5 {
  background-color: var(--hex-primary-soft) !important;
}
.bg-primary\/10 {
  background-color: var(--hex-primary-active) !important;
}
.bg-secondary\/30 {
  background-color: #fbfcfd !important;
}
.bg-secondary\/40 {
  background-color: #fafbfc !important;
}
.bg-secondary\/50 {
  background-color: #f7f9fb !important;
}
.bg-secondary\/60 {
  background-color: #f6f8fa !important;
}
.bg-secondary\/70 {
  background-color: #f4f7f9 !important;
}
.hover\:bg-secondary\/30:hover {
  background-color: #fbfcfd !important;
}
.hover\:bg-secondary\/40:hover {
  background-color: #fafbfc !important;
}
.hover\:bg-secondary\/80:hover {
  background-color: #eef2f5 !important;
}
.hover\:bg-primary\/90:hover {
  background-color: #117d8d !important;
}
.hover\:bg-sidebar-accent:hover {
  background-color: var(--hex-sidebar-accent) !important;
}
.hover\:bg-sidebar-border:hover {
  background-color: var(--hex-sidebar-border) !important;
}
.text-sidebar-foreground\/70 {
  color: #a9b1bf !important;
}

.tone {
  border-radius: 8px;
}

.tone--success {
  background: var(--hex-success-soft);
  color: var(--hex-success-text);
}

.tone--danger {
  background: var(--hex-danger-soft);
  color: var(--hex-danger-text);
}

.tone--warning {
  background: var(--hex-warning-soft);
  color: var(--hex-warning-text);
}

.tone--info {
  background: var(--hex-info-soft);
  color: var(--hex-info-text);
}

.tone--block {
  display: block;
  padding: 1rem;
}

.text-tone-success {
  color: var(--hex-success-text) !important;
}

.text-tone-danger {
  color: var(--hex-danger-text) !important;
}

.text-tone-warning {
  color: var(--hex-warning-text) !important;
}

.text-tone-info {
  color: var(--hex-info-text) !important;
}

.btn-solid--danger {
  background: var(--hex-danger) !important;
  color: #fff !important;
}

.btn-solid--success {
  background: var(--hex-success) !important;
  color: #fff !important;
}

.surface-soft {
  background: var(--hex-primary-soft);
}

.surface-muted {
  background: var(--hex-secondary);
}

input,
select,
textarea {
  color: var(--hex-foreground);
}

/* Native select chevrons sit on the border — custom arrow with inset. */
#app select:not([multiple]):not([size]),
#modal select:not([multiple]):not([size]),
.page-toolbar__select,
select.app-input,
select.field-input,
.product-form select,
.modal-scroll select:not([multiple]):not([size]) {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 2.25rem !important;
  background-image:
    linear-gradient(45deg, transparent 50%, #687386 50%),
    linear-gradient(135deg, #687386 50%, transparent 50%);
  background-position:
    calc(100% - 1rem) calc(50% - 0.15rem),
    calc(100% - 0.7rem) calc(50% - 0.15rem);
  background-size:
    0.35rem 0.35rem,
    0.35rem 0.35rem;
  background-repeat: no-repeat;
  cursor: pointer;
}

#app select:not([multiple]):not([size]):disabled,
#modal select:not([multiple]):not([size]):disabled,
select.app-input:disabled,
select.field-input:disabled,
.product-form select:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

input::placeholder,
textarea::placeholder {
  color: var(--hex-muted-foreground);
}

.tomuda-logo {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.sidebar-brand__row {
  position: relative;
  z-index: 1;
}

.login-brand__logo,
.auth-card__logo {
  width: 72px;
  height: auto;
  max-height: 72px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.receipt-logo {
  width: 16mm;
  height: 16mm;
  object-fit: contain;
  display: block;
  margin: 0;
}

.mobile-menu-button {
  top: max(12px, env(safe-area-inset-top, 0px));
  left: 12px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--hex-sidebar-border);
  box-shadow: none !important;
}

.mobile-menu-button--open {
  left: auto;
  right: max(12px, env(safe-area-inset-right, 0px));
}

.mobile-menu-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.modal-scroll {
  max-height: calc(90vh - 120px);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.customer-map-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.customer-map-head__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.customer-map-locate {
  flex-shrink: 0;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--hex-secondary);
  border: 1px solid var(--hex-border);
  font-size: 13px;
  font-weight: 600;
  color: #16899a;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.customer-map-locate:active {
  opacity: 0.85;
}

.customer-map-settings-btn {
  flex-shrink: 0;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--hex-warning) 14%, var(--hex-card));
  border: 1px solid
    color-mix(in srgb, var(--hex-warning) 45%, var(--hex-border));
  font-size: 13px;
  font-weight: 600;
  color: var(--hex-warning-text);
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.customer-map-settings-btn.hidden,
.customer-map-settings-btn[hidden] {
  display: none !important;
}

.customer-map-settings-btn:active {
  opacity: 0.85;
}

.customer-map {
  height: 360px !important;
  min-height: 360px !important;
  width: 100% !important;
  display: block !important;
  border-radius: 8px;
  overflow: hidden;
  background: var(--hex-secondary);
  border: 1px solid var(--hex-border);
}

.customer-map-user-marker {
  background: transparent !important;
  border: none !important;
}

.customer-map-user-marker__pulse {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--hex-primary) 28%, transparent);
  animation: customer-map-user-pulse 1.8s ease-out infinite;
}

.customer-map-user-marker__dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  background: var(--hex-primary);
  border: 3px solid #fff;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

.customer-map-user-marker__label {
  position: absolute;
  left: 50%;
  top: calc(50% + 14px);
  transform: translateX(-50%);
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--hex-border);
  font-size: 11px;
  font-weight: 700;
  color: var(--hex-primary);
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

@keyframes customer-map-user-pulse {
  0% {
    transform: scale(0.55);
    opacity: 0.85;
  }
  70% {
    transform: scale(1.35);
    opacity: 0;
  }
  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

.count-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
}

.count-list__empty {
  margin: 0;
  padding: 24px 16px;
  text-align: center;
  font-size: 14px;
  color: var(--hex-muted-foreground);
  border-radius: 12px;
  background: var(--hex-card);
  border: 1px dashed var(--hex-border);
}

.count-row {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  padding: 10px 12px;
  border: none;
  border-bottom: 1px solid var(--hex-border);
  border-radius: 0;
  background: transparent;
}

.count-row:last-child {
  border-bottom: none;
}

.count-row__main {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) auto;
  grid-template-areas:
    "img title actions"
    "img meta actions";
  column-gap: 12px;
  row-gap: 6px;
  align-items: start;
  min-width: 0;
}

.count-row__lead {
  display: contents;
}

.count-row__img {
  grid-area: img;
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  border-radius: 0;
  padding: 4px;
  border: none;
  box-shadow: none;
}

.count-row__title {
  grid-area: title;
  margin: 0;
  min-width: 0;
  align-self: center;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.35;
  text-align: left;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}

.count-row__meta {
  grid-area: meta;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  min-width: 0;
  font-size: 12px;
  line-height: 1.3;
  color: var(--hex-muted-foreground);
}

.count-row__stats b {
  color: var(--hex-foreground);
  font-weight: 700;
}

.count-row__input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.count-view__hint {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--hex-primary) 8%, var(--hex-card));
  border: 1px solid
    color-mix(in srgb, var(--hex-primary) 22%, var(--hex-border));
  color: var(--hex-muted-foreground);
  font-size: 13px;
  line-height: 1.4;
}

.count-row__actions {
  grid-area: actions;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-shrink: 0;
  align-self: center;
  margin: 0;
  padding: 0;
}

.count-row__field {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.count-row__field-label {
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--hex-muted-foreground);
  white-space: nowrap;
}

.count-row__input {
  width: 64px;
  min-width: 64px;
  min-height: 36px !important;
  height: 36px;
  padding: 0 4px !important;
  text-align: center;
  font-size: 15px !important;
  font-weight: 700;
  border-radius: 8px;
}

.count-row__cost-input {
  width: 88px;
  min-width: 88px;
  min-height: 36px !important;
  height: 36px;
  padding: 0 4px !important;
  text-align: center;
  font-size: 13px !important;
  font-weight: 700;
  border-radius: 8px;
  font-variant-numeric: tabular-nums;
}

.count-row__diff {
  min-width: 32px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: var(--hex-muted-foreground);
}

.count-row__diff-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
}

.count-row__diff-amt {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.metrics-bar--count.count-values {
  margin-top: 8px;
}

.metrics-bar--count.count-values .metrics-bar__value {
  font-size: 0.95rem;
}

.count-row__diff.text-tone-danger,
.count-row__diff.count-result-table__diff--bad {
  color: #e53935;
  font-weight: 800;
}

.inventory-tab {
  line-height: 1.25;
  text-align: center;
  white-space: normal;
}

.inventory-categories {
  max-width: 100%;
  margin: 0 0 12px;
}

.inventory-categories.picker-cat-chips {
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.inventory-categories.picker-cat-chips::-webkit-scrollbar {
  display: none;
}

.inventory-stock-row {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 10px 12px;
  padding: 12px;
  align-items: center;
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}

.inventory-stock-row:hover,
.inventory-stock-row:focus-visible {
  background: color-mix(in srgb, var(--hex-secondary) 65%, transparent);
  outline: none;
}

.inventory-stock-modal__product {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background: var(--hex-secondary);
}

.inventory-stock-modal__thumb {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}

.inventory-stock-modal__name {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}

.inventory-stock-modal__barcode {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--hex-muted-foreground);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.inventory-stock-modal__stock {
  margin: 6px 0 0;
  font-size: 13px;
}

.inventory-stock-modal__price {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--hex-primary-dark);
}

.inventory-stock-modal__price b {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.inventory-stock-row__thumb {
  width: 80px;
  height: 80px;
  grid-area: auto;
}

.inventory-stock-row__name {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.35;
  word-break: break-word;
}

.inventory-stock-row__barcode {
  margin-top: 2px;
  font-size: 12px;
  color: var(--hex-muted-foreground);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.inventory-stock-row__stock {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--hex-secondary);
  font-size: 12px;
}

.inventory-stock-row__pending {
  margin-left: 4px;
  color: var(--hex-primary);
  font-weight: 600;
}

.inventory-stock-row__price {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--hex-primary-dark);
}

.inventory-stock-row__price b {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

@media (min-width: 768px) {
  .inventory-stock-row {
    grid-template-columns: 80px minmax(0, 1fr);
  }
}

.stock-in-entry-row {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) auto;
  gap: 10px 12px;
  padding: 12px;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}

.stock-swipe {
  position: relative;
  overflow: hidden;
  touch-action: pan-y;
}

.stock-swipe__rail {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 92px;
  display: flex;
  z-index: 0;
}

.stock-swipe__rail--left {
  left: 0;
}

.stock-swipe__rail--right {
  right: 0;
}

.stock-swipe__delete {
  flex: 1;
  border: none;
  margin: 0;
  padding: 0 10px;
  background: var(--hex-danger);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.stock-swipe__delete:active {
  background: color-mix(in srgb, var(--hex-danger) 88%, #000);
}

.stock-swipe__front {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: stretch;
  background: var(--hex-card, #fff);
  will-change: transform;
  touch-action: pan-y;
}

.stock-swipe__main {
  flex: 1;
  min-width: 0;
}

.stock-entry-return {
  display: none;
  flex-shrink: 0;
  align-self: center;
  margin: 0 12px 0 0;
  padding: 8px 12px;
  border: 1px solid color-mix(in srgb, var(--hex-danger) 32%, var(--hex-border));
  border-radius: 8px;
  background: var(--hex-danger-soft);
  color: var(--hex-danger-text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}

.stock-entry-return:hover,
.stock-entry-return:focus-visible {
  background: color-mix(in srgb, var(--hex-danger) 14%, var(--hex-danger-soft));
  outline: none;
}

.stock-entry-return:active {
  background: color-mix(in srgb, var(--hex-danger) 20%, #fff);
}

/* Desktop/web: visible return button, no swipe rails. */
@media (hover: hover) and (pointer: fine) {
  .stock-swipe {
    overflow: visible;
  }

  .stock-swipe__rail {
    display: none;
  }

  .stock-swipe__front {
    transform: none !important;
    will-change: auto;
  }

  .stock-entry-return {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

.stock-swipe .stock-in-entry-row--filled {
  background: color-mix(in srgb, var(--hex-success) 13%, var(--hex-card));
}

.stock-in-take__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  width: 100%;
}

.stock-in-take__remove {
  width: 100%;
  min-height: 44px;
  border: 1px solid color-mix(in srgb, var(--hex-danger) 35%, var(--hex-border));
  border-radius: 12px;
  background: var(--hex-danger-soft);
  color: var(--hex-danger-text);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.stock-in-take__remove:active {
  background: color-mix(in srgb, var(--hex-danger-soft) 70%, #fff);
}

.stock-in-entry-row:hover,
.stock-in-entry-row:focus-visible {
  background: color-mix(in srgb, var(--hex-secondary) 65%, transparent);
  outline: none;
}

.stock-in-entry-row--filled {
  background: color-mix(in srgb, var(--hex-success) 13%, var(--hex-card));
  box-shadow:
    inset 4px 0 0 var(--hex-success),
    inset 0 0 0 1px
      color-mix(in srgb, var(--hex-success) 30%, var(--hex-border));
}

.stock-in-entry-row--filled:hover,
.stock-in-entry-row--filled:focus-visible {
  background: color-mix(in srgb, var(--hex-success) 18%, var(--hex-card));
}

.stock-in-entry-row__img {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  display: block;
  border-radius: 0;
  object-fit: contain;
  object-position: center;
  padding: 6px;
  box-sizing: border-box;
  border: none;
  box-shadow: none;
  background: var(--hex-secondary);
}

.stock-in-entry-row__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
  min-width: 72px;
  text-align: right;
}

.stock-in-entry-row--filled .stock-in-entry-row__meta {
  align-items: center;
  min-width: 86px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--hex-success);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--hex-success) 24%, transparent);
  text-align: center;
}

.stock-in-entry-row__meta-qty {
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--hex-foreground);
}

.stock-in-entry-row--filled .stock-in-entry-row__meta-qty {
  color: var(--hex-primary-foreground);
}

.stock-in-entry-row__meta-cost {
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--hex-muted-foreground);
}

.stock-in-entry-row--filled .stock-in-entry-row__meta-cost {
  color: color-mix(in srgb, var(--hex-primary-foreground) 86%, transparent);
}

.stock-in-entry-row__hint {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--hex-muted-foreground);
  text-align: right;
  max-width: 72px;
  line-height: 1.3;
}

.stock-in-entry-cat {
  padding: 10px 16px;
  border-bottom: 1px solid var(--hex-border);
  background: color-mix(in srgb, var(--hex-secondary) 40%, var(--hex-card));
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--hex-foreground);
}
.stock-in-entry-section {
  border: 1px solid var(--hex-border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--hex-card);
}
.stock-in-entry-section__title {
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--hex-foreground);
  background: color-mix(in srgb, var(--hex-primary) 8%, var(--hex-card));
  border-bottom: 1px solid var(--hex-border);
}

.inventory-stock-panel .inventory-stock-row__name {
  margin: 0;
}

@media (max-width: 639px) {
  .stock-in-entry-row {
    gap: 8px 10px;
    padding: 10px;
  }

  .stock-in-entry-row__meta {
    min-width: 64px;
  }

  .stock-in-entry-row--filled .stock-in-entry-row__meta {
    min-width: 76px;
    padding: 7px 8px;
  }

  .stock-in-entry-row__meta-qty {
    font-size: 12px;
  }

  .stock-in-entry-row__hint {
    max-width: 64px;
    font-size: 10px;
  }
}

.product-thumb {
  width: var(--thumb-md);
  height: var(--thumb-md);
  display: block;
  border-radius: 0;
  object-fit: contain;
  object-position: center;
  padding: 3px;
  box-sizing: border-box;
  background: #fff;
  border: none;
  box-shadow: none;
}

.detail-row .product-thumb {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
}

.product-thumb--preview {
  width: 88px;
  height: 88px;
  border-radius: 0;
}

.worker-view__tabs {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 0;
  margin: 0 0 8px;
  border: none;
  border-bottom: 1px solid var(--hex-border);
  border-radius: 0;
  background: transparent;
}

.worker-view__tabs .seg-tab {
  flex: 1 1 0;
  min-width: 0;
  min-height: 42px;
  padding: 8px 12px;
  border: none;
  border-radius: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: transparent;
  color: var(--hex-muted-foreground);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  box-shadow: none;
  transition:
    color 0.15s ease,
    border-color 0.15s ease;
}

.worker-view__tabs .seg-tab + .seg-tab {
  border-left: 1px solid var(--hex-border);
}

.worker-view__tabs .seg-tab:hover:not(.is-active) {
  color: var(--hex-foreground);
  background: transparent;
}

.worker-view__tabs .seg-tab.is-active {
  color: var(--hex-primary-foreground);
  background: var(--hex-primary);
  box-shadow: none;
  border-bottom-color: var(--hex-primary);
  border-radius: 10px 10px 0 0;
}

@media (max-width: 1023px) {
  .worker-view--orders .worker-view__tabs {
    margin-left: calc(-1 * var(--app-gutter));
    margin-right: calc(-1 * var(--app-gutter));
    margin-bottom: 0;
    padding: 0 var(--app-gutter);
    background: #eef2f6;
    border-bottom-color: #cfd8e3;
  }

  .worker-view--orders .worker-view__tabs .seg-tab:not(.is-active) {
    color: #6b7c91;
    background: transparent;
  }

  .worker-view--orders .worker-view__tabs .seg-tab.is-active {
    color: var(--hex-primary-foreground);
    border-bottom-color: var(--hex-primary);
    background: var(--hex-primary);
  }

  .worker-view--orders .worker-view__tabs .seg-tab + .seg-tab {
    border-left-color: #cfd8e3;
  }
}

.app-shell:not(.app-shell--bottom-nav) .worker-view__tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  width: min(100%, 28rem);
  padding: 4px;
  margin: 0 0 12px;
  border: none;
  border-radius: var(--btn-radius);
  background: var(--hex-secondary);
}

.app-shell:not(.app-shell--bottom-nav) .worker-view__tabs .seg-tab {
  min-height: 40px;
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  margin: 0;
  background: transparent;
  color: var(--hex-muted-foreground);
}

.app-shell:not(.app-shell--bottom-nav) .worker-view__tabs .seg-tab + .seg-tab {
  border-left: none;
}

.app-shell:not(.app-shell--bottom-nav)
  .worker-view__tabs
  .seg-tab:hover:not(.is-active) {
  color: var(--hex-foreground);
  background: color-mix(in srgb, var(--hex-card) 80%, transparent);
}

.app-shell:not(.app-shell--bottom-nav) .worker-view__tabs .seg-tab.is-active {
  color: var(--hex-primary-foreground);
  background: var(--hex-primary);
  border-bottom-color: transparent;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(16, 22, 35, 0.12);
}

.app-shell:not(.app-shell--bottom-nav) .worker-order-top-meta {
  width: min(100%, 28rem);
  margin: 0 0 12px;
}

.app-shell:not(.app-shell--bottom-nav) .worker-order-top-meta .field-input {
  min-height: 40px;
  height: 40px;
}

.worker-view {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.worker-order-card {
  display: flex;
  flex-direction: column;
  border-radius: 0;
  background: transparent;
  border: none;
  border-top: 1px solid var(--hex-border);
  overflow: visible;
}

.worker-order-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  background: transparent;
  border-bottom: 1px solid var(--hex-border);
}

.worker-order-store {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.worker-order-store__avatar {
  flex-shrink: 0;
  width: 56px;
  height: 72px;
  min-width: 56px;
  border-radius: 0;
  object-fit: cover;
  object-position: center;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--hex-primary);
  color: var(--hex-primary-foreground);
  font-size: 20px;
  font-weight: 800;
}

.worker-order-store__avatar.customer-card__avatar-img,
img.worker-order-store__avatar {
  background: #fff;
}

.worker-order-store__body {
  min-width: 0;
  flex: 1;
}

.worker-order-store__name {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--hex-foreground);
}

.worker-order-store__name-text {
  min-width: 0;
}

.worker-order-store__loc {
  font-size: 13px;
  font-weight: 600;
  color: var(--hex-muted-foreground);
  white-space: nowrap;
}

.worker-order-store__reg {
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--hex-primary);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.worker-order-store__reg-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--hex-muted-foreground);
}

.worker-order-store__phone {
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--hex-primary);
  letter-spacing: 0.02em;
}

.worker-order-store__addr {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.35;
  color: var(--hex-muted-foreground);
}

.worker-order-card__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 10px 0 0;
}

.worker-order-card__tools {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  margin-bottom: 4px;
}

.worker-order-summary {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--hex-border);
  border-radius: 14px;
  background: var(--hex-card);
  flex-shrink: 0;
}

.worker-order-summary .worker-order-stats {
  margin-bottom: 0;
}

.worker-order-summary .worker-receivable {
  margin: 0;
}

.worker-order-summary .worker-order-meta {
  display: block;
}

.worker-order-top-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 8px;
}

.worker-order-top-meta .worker-order-meta {
  display: block;
}

.worker-order-lines-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  margin: 4px 0 12px;
  padding: 4px 0 8px;
}

.worker-order-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 0;
}

.worker-view--ordering .worker-order-summary {
  position: static;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 10px;
}

.worker-view--ordering .worker-order-stats {
  gap: 6px;
}

.worker-view--ordering .worker-order-stat {
  gap: 1px;
  padding: 6px 4px;
  border-radius: 8px;
}

.worker-view--ordering .worker-order-stat__value {
  font-size: 0.95rem;
}

.worker-view--ordering .worker-order-stat--total .worker-order-stat__value {
  font-size: 0.9rem;
}

.worker-view--ordering .worker-order-stat__label {
  font-size: 10px;
}

.worker-view--ordering .worker-order-summary .worker-order-field,
.worker-view--ordering .worker-order-top-meta .worker-order-field {
  gap: 3px;
}

.worker-view--ordering .worker-order-summary .worker-order-field__label,
.worker-view--ordering .worker-order-top-meta .worker-order-field__label {
  font-size: 11px;
}

.worker-view--ordering .worker-order-summary .field-input,
.worker-view--ordering .worker-order-top-meta .field-input {
  min-height: 36px;
  height: 36px;
  font-size: 13px;
}

.worker-view--ordering .worker-receivable {
  column-gap: 8px;
  row-gap: 2px;
  padding: 5px 8px;
  border-radius: 6px;
}

.worker-view--ordering .worker-receivable__list {
  gap: 2px;
}

.worker-view--ordering .worker-receivable__open {
  gap: 6px;
  padding: 0;
}

.worker-view--ordering .worker-receivable__amount {
  font-size: 12px;
}

.worker-view--ordering .worker-order-card__body {
  gap: 8px;
  padding-top: 6px;
}

.worker-view--ordering .worker-order-card__tools {
  gap: 6px;
  margin-bottom: 2px;
}

.worker-view--ordering .worker-order-add-btn {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 13px;
}

.worker-view--ordering .worker-order-lines-wrap {
  gap: 6px;
  margin: 2px 0 8px;
  padding: 2px 0 4px;
}

.worker-order-stats__note {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.35;
  color: var(--hex-muted-foreground);
  text-align: center;
}

.worker-order-stats__promo {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.35;
  color: var(--hex-muted-foreground);
  text-align: center;
}

.worker-order-stats__promo.is-active {
  color: var(--hex-primary, #0f766e);
  font-weight: 600;
}

.worker-order-stats__note strong {
  color: var(--hex-foreground);
  font-weight: 700;
}

.worker-order-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 10px 6px;
  border-radius: 12px;
  border: 1px solid var(--hex-border);
  background: var(--hex-background);
  text-align: center;
}

.worker-order-stat--total {
  border-color: color-mix(in srgb, var(--hex-primary) 35%, var(--hex-border));
  background: var(--hex-primary-soft);
}

.worker-order-stat__value {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--hex-foreground);
  font-variant-numeric: tabular-nums;
}

.worker-order-stat--total .worker-order-stat__value {
  color: var(--hex-primary);
  font-size: 1rem;
}

.worker-order-stat__label {
  font-size: 11px;
  font-weight: 600;
  color: var(--hex-muted-foreground);
}

.worker-order-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 0 16px;
  border: none;
  border-radius: 12px;
  background: var(--hex-primary);
  color: var(--hex-primary-foreground);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(16, 22, 35, 0.12);
  -webkit-tap-highlight-color: transparent;
}

.worker-order-add-btn .ui-icon {
  width: 20px;
  height: 20px;
  stroke-width: 2.5;
}

.worker-order-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.worker-order-field__label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
  color: var(--hex-foreground);
}

.worker-receivable {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 10px;
  row-gap: 4px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--hex-warning-soft);
  border: 1px solid
    color-mix(in srgb, var(--hex-warning) 28%, var(--hex-border));
}

.worker-receivable__label {
  grid-column: 1;
  grid-row: 1 / -1;
  align-self: center;
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--hex-warning-text);
  white-space: nowrap;
}

.worker-receivable__list {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.worker-receivable__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.worker-receivable__item:has(.worker-receivable__action) {
  grid-template-columns: minmax(0, 1fr) auto;
}

.worker-receivable__open {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  margin: 0;
  padding: 2px 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

.worker-receivable__open:active {
  filter: brightness(0.97);
}

.worker-receivable__open:focus-visible {
  outline: 2px solid var(--hex-primary);
  outline-offset: 2px;
}

.worker-receivable__no .receipt-no--xs {
  font-size: 10px;
  padding: 2px 5px;
  border-radius: 5px;
}

.worker-receivable__amount {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  color: var(--hex-foreground);
  text-align: right;
  white-space: nowrap;
}

.worker-receivable__paid {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--hex-muted-foreground);
}

.pay-confirm {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pay-confirm__line {
  margin: 0;
  font-size: 14px;
}
.pay-confirm__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
}
.pay-confirm__input {
  width: 100%;
  min-height: var(--field-h, 44px);
}
.pay-confirm__hint {
  margin: 0;
  font-size: 12px;
  color: var(--hex-muted-foreground);
  font-weight: 400;
}

.app-input.is-locked {
  opacity: 0.72;
  cursor: not-allowed;
}

.worker-receivable__action {
  flex-shrink: 0;
  min-height: 32px;
  padding-inline: 8px;
  font-size: 12px;
}

.worker-pick-selected__store .worker-receivable {
  margin-top: 8px;
}

.report-receivable-row {
  display: block;
  align-items: stretch;
  padding: 12px 0;
}

.report-receivable-row__main {
  width: 100%;
  min-width: 0;
}

.report-receivable-row .line-list__meta {
  margin-top: 8px;
}

.worker-order-date {
  min-height: var(--field-h);
}

.worker-order-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.worker-order-sales {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--hex-secondary);
  font-size: 14px;
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}

.worker-order-lines {
  border-radius: 0;
  border: none;
  border-top: 1px solid var(--hex-border);
  border-bottom: 1px solid var(--hex-border);
  background: transparent;
  overflow: visible;
  min-height: 0;
  padding: 4px 0;
}

.worker-order-lines .worker-selected-row {
  background: transparent;
}

.worker-order-lines .worker-swipe {
  border-bottom: 1px solid var(--hex-border);
}

.worker-order-lines .worker-swipe:last-child {
  border-bottom: none;
}

.worker-order-lines .worker-swipe .stock-swipe__front {
  background: var(--hex-background, #fff);
}

.worker-order-lines .worker-swipe .worker-selected-row.is-editing {
  background: color-mix(in srgb, var(--hex-primary) 10%, transparent);
}

.worker-order-lines .worker-swipe .stock-entry-return {
  margin-right: 4px;
}

.worker-order-empty {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 20px 0;
  text-align: center;
  background: transparent;
}

.worker-order-empty__text {
  margin: 0;
  font-size: 14px;
  color: var(--hex-muted-foreground);
}

.worker-order-card__foot {
  position: relative;
  z-index: 12;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 0 12px;
  border-top: none;
  background: var(--hex-background);
  flex-shrink: 0;
}

.worker-order-card__foot--below-tabs {
  margin: 0;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--hex-border);
}

.worker-order-savebar {
  margin-top: 12px;
}

.worker-order-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: none;
  background: transparent;
}

.worker-order-opt {
  border: none;
  border-bottom: 1px solid var(--hex-border);
  border-radius: 0;
  background: transparent;
  overflow: visible;
  transition: background 0.15s ease;
}

.worker-order-opt.is-open {
  border-bottom-color: var(--hex-border);
  background: color-mix(in srgb, var(--hex-primary-soft) 35%, transparent);
}

.worker-order-opt__head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 0;
  padding: 7px 10px;
  margin: 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--hex-foreground);
  -webkit-tap-highlight-color: transparent;
}

.worker-order-opt.is-open .worker-order-opt__head {
  padding-bottom: 4px;
}

.worker-order-opt__head input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--hex-primary);
  margin: 0;
  cursor: pointer;
}

.worker-order-opt__title {
  flex: 1;
  min-width: 0;
  line-height: 1.25;
  font-size: 13px;
}

.worker-order-opt__badge {
  flex-shrink: 0;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--hex-primary-soft);
  color: var(--hex-primary);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.worker-order-opt--disabled .worker-order-opt__head {
  cursor: not-allowed;
  opacity: 0.55;
}

.worker-order-opt--disabled .worker-order-opt__badge--muted {
  background: color-mix(in srgb, var(--hex-muted-foreground) 18%, transparent);
  color: var(--hex-muted-foreground);
}

.worker-order-opt__body {
  padding: 0 10px 4px;
}

.worker-order-opt__fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.worker-order-opt__field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.worker-order-opt__field-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--hex-muted-foreground);
}

.worker-order-opt__field .app-input {
  min-height: 36px !important;
  height: 36px;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  font-size: 13px !important;
}

.worker-order-opt__field--date {
  flex: 1 1 100%;
}

.worker-order-opt__field--date .app-input,
.worker-order-opt__field--date .worker-order-opt__input {
  width: 100%;
}

.worker-order-opt__input {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 30px !important;
  height: 30px;
  max-height: 120px;
  padding: 6px 8px !important;
  border: 1px solid var(--hex-border);
  border-radius: 8px;
  background: var(--hex-card);
  font-size: 13px !important;
  line-height: 1.35 !important;
  box-shadow: none;
  resize: none;
  overflow-x: hidden;
  overflow-y: hidden;
  -webkit-appearance: none;
  appearance: none;
}

#app textarea.worker-order-opt__input,
#modal textarea.worker-order-opt__input {
  min-height: 30px !important;
  font-size: 13px !important;
  line-height: 1.35 !important;
}

.worker-order-discount-preview {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  margin: 0;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--hex-secondary);
  font-size: 12px;
  color: var(--hex-muted-foreground);
}

.worker-order-discount-preview strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--hex-foreground);
}

.worker-order-discount-preview__total {
  color: var(--hex-primary) !important;
  font-size: 16px !important;
}

.worker-order-discount-preview__sep {
  color: var(--hex-border);
  font-weight: 700;
}

.worker-payment-tabs {
  margin: 0;
}

.worker-payment-tabs .seg-tab {
  min-height: 44px;
  font-size: 14px;
}

.worker-payment-tabs--idle {
  opacity: 0.42;
}

.worker-payment-tabs--idle .seg-tab.is-active {
  background: color-mix(in srgb, var(--hex-primary) 18%, var(--hex-secondary));
  color: color-mix(
    in srgb,
    var(--hex-primary) 55%,
    var(--hex-muted-foreground)
  );
  box-shadow: none;
}

.btn.is-disabled,
.btn.is-disabled:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.worker-add-plus {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 9999px;
  background: var(--hex-primary);
  color: var(--hex-primary-foreground);
  font-size: 32px;
  font-weight: 300;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: none;
}

.worker-add-plus:active {
}

.worker-add-plus--compact {
  width: 40px;
  height: 40px;
  font-size: 24px;
  box-shadow: none;
}

.worker-promo-row {
  border-left: 4px solid var(--hex-success);
  background: color-mix(in srgb, var(--hex-success) 13%, #ffffff);
}

.worker-order-lines .worker-promo-row {
  background: color-mix(in srgb, var(--hex-success) 13%, #ffffff);
}

.worker-promo-row__label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--hex-success);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.15;
}

.worker-promo-hints {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.worker-promo-hint {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.35;
}

.worker-promo-hint--active {
  background: color-mix(in srgb, var(--hex-success) 14%, #ffffff);
  border: 1px solid color-mix(in srgb, var(--hex-success) 35%, transparent);
}

.worker-promo-hint--pending {
  background: var(--hex-secondary);
  border: 1px solid var(--hex-border);
}

.worker-promo-hint__rule {
  font-weight: 700;
  color: var(--hex-foreground);
}

.worker-promo-hint__status {
  color: var(--hex-muted-foreground);
}

.worker-promo-hint--active .worker-promo-hint__status b {
  color: var(--hex-success);
}

.worker-promo-progress-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 12px;
}

.worker-promo-progress {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, #5dae6d 28%, var(--hex-border));
  background: #eef8f1;
}

.worker-promo-progress.is-active {
  border-color: color-mix(in srgb, #5dae6d 55%, var(--hex-border));
  background: #e4f4e8;
}

.worker-promo-progress__head-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.worker-promo-progress__title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
  color: #1a2736;
}

.worker-promo-progress__offer {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: color-mix(in srgb, #5dae6d 16%, #ffffff);
  color: #1a2736;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
}

.worker-promo-progress.is-active .worker-promo-progress__offer {
  background: color-mix(in srgb, #5dae6d 22%, #ffffff);
}

.worker-promo-progress__meter {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid color-mix(in srgb, #5dae6d 18%, var(--hex-border));
}

.worker-promo-progress__meter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--hex-foreground);
}

.worker-promo-progress__count {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.worker-promo-progress__bar {
  height: 10px;
  border-radius: 999px;
  background: #d7e3ef;
  overflow: hidden;
}

.worker-promo-progress__bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #3b82f6;
  transition: width 0.2s ease;
}

.worker-promo-progress.is-active .worker-promo-progress__bar > span {
  background: #2563eb;
}

.promo-mix-entries {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 12px;
}

.promo-mix-entry {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 12px;
  border: 1px solid color-mix(in srgb, #5dae6d 28%, var(--hex-border));
  border-radius: 14px;
  background: #eef8f1;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.promo-mix-entry.is-ready {
  border-color: color-mix(in srgb, #5dae6d 55%, var(--hex-border));
  background: #e4f4e8;
}

.promo-mix-entry__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: color-mix(in srgb, #5dae6d 18%, #fff);
  color: #3f8f4f;
}

.promo-mix-entry__icon svg {
  width: 20px;
  height: 20px;
}

.promo-mix-entry__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.promo-mix-entry__title {
  font-size: 14px;
  font-weight: 800;
  color: #1a2736;
  line-height: 1.25;
}

.promo-mix-entry__offer {
  font-size: 12px;
  line-height: 1.35;
  color: #5b6b7c;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.promo-mix-entry__go {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 800;
  color: #3f8f4f;
}

.promo-mix-sheet {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.promo-mix-sheet__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(16, 22, 35, 0.42);
  cursor: pointer;
}

.promo-mix-sheet__panel {
  --promo-mix-mint: #eaf7ee;
  --promo-mix-mint-strong: #d8f0df;
  --promo-mix-green: #4fa35f;
  --promo-mix-green-deep: #3f8f4f;
  --promo-mix-ink: #1c2430;
  --promo-mix-muted: #6a7a88;
  position: relative;
  z-index: 1;
  width: min(100%, 440px);
  max-height: min(94dvh, 860px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 18px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  border-radius: 24px 24px 0 0;
  background: #ffffff;
  box-shadow: 0 -16px 40px rgba(16, 22, 35, 0.2);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

@media (min-width: 720px) {
  .promo-mix-sheet {
    align-items: center;
    padding: 24px;
  }

  .promo-mix-sheet__panel {
    border-radius: 20px;
    max-height: min(88vh, 820px);
    width: min(100%, 480px);
  }
}

.promo-mix-sheet__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.promo-mix-sheet__title {
  margin: 0;
  font-size: clamp(18px, 4.6vw, 22px);
  font-weight: 800;
  line-height: 1.25;
  color: var(--promo-mix-ink);
}

.promo-mix-sheet__close {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: #eef2f5;
  color: var(--promo-mix-ink);
  font-size: 15px;
  cursor: pointer;
}

.promo-mix-sheet__offer {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--promo-mix-mint);
  color: var(--promo-mix-ink);
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.4;
  text-align: center;
}

.promo-mix-sheet__tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 14px 10px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e5ecf0;
  box-shadow: 0 1px 2px rgba(16, 22, 35, 0.04);
}

.promo-mix-sheet__tiles--1 {
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
}

.promo-mix-sheet__tiles--1 .promo-mix-tile {
  width: min(100%, 160px);
}

.promo-mix-sheet__tiles--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.promo-mix-sheet__empty,
.promo-mix-sheet__hint {
  margin: 0;
  grid-column: 1 / -1;
  text-align: center;
  font-size: 13px;
  color: var(--promo-mix-muted);
}

.promo-mix-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  min-width: 0;
  text-align: center;
}

.promo-mix-tile__media {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: #f4f7f9;
  overflow: hidden;
}

.promo-mix-tile__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.promo-mix-tile__name {
  margin: 0;
  width: 100%;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--promo-mix-ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.5em;
}

.promo-mix-tile__th {
  font-size: 10px;
  font-weight: 700;
  color: var(--promo-mix-muted);
  white-space: nowrap;
}

.promo-mix-stepper {
  display: inline-grid;
  grid-template-columns: 30px minmax(22px, 1fr) 30px;
  align-items: center;
  width: 100%;
  max-width: 108px;
  min-height: 36px;
  padding: 2px;
  border: 1.5px solid var(--promo-mix-green);
  border-radius: 10px;
  background: #fff;
  box-sizing: border-box;
}

.promo-mix-stepper__btn {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--promo-mix-green-deep);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.promo-mix-stepper__btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.promo-mix-stepper__val {
  min-width: 0;
  text-align: center;
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--promo-mix-ink);
  white-space: nowrap;
  overflow: hidden;
}

.promo-mix-stepper__unit {
  font-size: 11px;
  font-weight: 700;
  color: var(--hex-muted-foreground, #667788);
}

.promo-mix-sheet__summary {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  background: var(--promo-mix-mint);
}

.promo-mix-sheet__summary.is-ready {
  background: var(--promo-mix-mint-strong);
}

.promo-mix-sheet__meter-row {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(72px, 1fr);
  align-items: center;
  gap: 10px;
}

.promo-mix-sheet__meter-label {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--promo-mix-ink);
  white-space: nowrap;
}

.promo-mix-sheet__meter-label b {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.promo-mix-sheet__bar {
  height: 10px;
  border-radius: 999px;
  background: #d5e2ee;
  overflow: hidden;
  min-width: 0;
}

.promo-mix-sheet__bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #3b82f6;
  transition: width 0.2s ease;
}

.promo-mix-sheet__picks-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.promo-mix-sheet__picks-label {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--promo-mix-ink);
}

.promo-mix-sheet__picks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.promo-mix-sheet__pick {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 6px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--promo-mix-ink);
}

.promo-mix-sheet__pick-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.promo-mix-sheet__pick-qty {
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.promo-mix-sheet__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  padding: 12px 18px;
  border: 0;
  border-radius: 999px;
  background: #8fbf97;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: none;
}

.promo-mix-sheet__cta.is-ready {
  background: var(--promo-mix-green);
  box-shadow: 0 10px 22px
    color-mix(in srgb, var(--promo-mix-green) 35%, transparent);
}

.promo-mix-sheet__cta-ico {
  font-size: 16px;
  line-height: 1;
}

.promo-mix-sheet__foot-note {
  margin: 0;
  text-align: center;
  font-size: 12px;
  line-height: 1.4;
  color: var(--promo-mix-muted);
}

@media (max-width: 360px) {
  .promo-mix-sheet__meter-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .promo-mix-tile__media {
    width: 60px;
    height: 60px;
  }

  .promo-mix-stepper {
    max-width: 96px;
    grid-template-columns: 26px minmax(18px, 1fr) 26px;
  }

  .promo-mix-stepper__btn {
    width: 26px;
    height: 28px;
  }
}

.worker-promo-progress__picks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.worker-promo-progress__picks-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--hex-muted-foreground);
}

.worker-promo-progress__pick {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  line-height: 1.3;
}

.worker-promo-progress__pick-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--hex-foreground);
}

.worker-promo-progress__pick b {
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.worker-promo-progress__empty {
  margin: 0;
  font-size: 12px;
  color: var(--hex-muted-foreground);
}

.worker-promo-progress__status {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
  color: var(--hex-muted-foreground);
}

.worker-promo-progress.is-active .worker-promo-progress__status {
  color: var(--hex-success);
  font-weight: 600;
}

.worker-promo-progress__status b {
  color: inherit;
}

.picker-row__promo--active {
  background: color-mix(in srgb, var(--hex-success) 18%, #ffffff);
  color: var(--hex-success);
}

.picker-row__promo {
  display: inline-flex;
  margin-left: 4px;
  padding: 1px 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--hex-success) 16%, #ffffff);
  color: var(--hex-success);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.picker-qty-sheet__promo-wrap {
  padding: 0 16px 8px;
}

.picker-qty-sheet__promo-wrap .worker-promo-progress {
  margin: 0;
}

.picker-qty-sheet__promo {
  margin: 0 0 4px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--hex-foreground);
}

.picker-qty-sheet__promo--active {
  color: var(--hex-success);
  font-weight: 600;
}

.picker-qty-sheet__promo-note {
  margin: 0 0 8px;
  font-size: 11px;
  line-height: 1.3;
  color: var(--hex-muted-foreground);
}

.promo-section {
  padding: 14px;
  border: 2px solid var(--hex-border);
  border-radius: 12px;
  background: var(--hex-card);
}

.promo-section--buy {
  border-color: color-mix(in srgb, var(--hex-primary) 55%, var(--hex-border));
  background: var(--hex-primary-soft);
}

.promo-section--free {
  border-color: color-mix(in srgb, var(--hex-info) 50%, var(--hex-border));
  background: var(--hex-info-soft);
}

.promo-section-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}

.promo-section-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.promo-section--buy .promo-section-badge {
  background: var(--hex-primary);
  color: #fff;
}

.promo-section--free .promo-section-badge {
  background: var(--hex-info);
  color: #fff;
}

.promo-section-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.promo-section-hint {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--hex-muted-foreground, #64748b);
}

.promo-condition-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.promo-condition-body .seg-tabs {
  width: 100%;
}

.promo-condition-body .promo-form-field {
  margin: 0;
}

.promo-reward-toggle {
  margin: 0 0 10px;
}

.promo-reward-toggle .seg-tabs {
  width: 100%;
}

.promo-section-warn {
  margin: 0 0 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--hex-danger-soft);
  color: var(--hex-danger-text);
  font-size: 12px;
  line-height: 1.4;
}

.promo-section-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  color: #64748b;
}

.promo-section-arrow-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--hex-secondary);
  color: var(--hex-muted-foreground);
  line-height: 1;
}

.promo-section-arrow-icon .ui-icon {
  width: 18px;
  height: 18px;
}

.promo-section-arrow-text {
  max-width: 280px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  word-break: break-word;
}

.promo-section--buy .promo-product-row.is-active {
  border-color: var(--hex-primary);
  background: var(--hex-primary-active);
}

.promo-section--free .promo-product-row.is-active {
  border-color: var(--hex-info);
  background: var(--hex-info-active);
}

.promo-product-list {
  display: grid;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
}

.promo-product-list--search {
  max-height: 280px;
  padding-right: 2px;
  -webkit-overflow-scrolling: touch;
}

.promo-product-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--hex-card);
  border: 1px solid var(--hex-border);
  box-shadow: none;
  cursor: pointer;
  text-align: left;
  transition:
    border-color 0.15s ease,
    background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.promo-product-row:hover,
.promo-product-row:focus-visible {
  border-color: color-mix(in srgb, var(--hex-primary) 40%, var(--hex-border));
  box-shadow: none;
}

.promo-product-row:active:not(:disabled) {
}

.promo-product-row__media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--hex-border);
  overflow: hidden;
  flex-shrink: 0;
}

.promo-product-row__img,
.promo-product-row .product-thumb {
  width: 100% !important;
  height: 100% !important;
  border-radius: 0;
  background: #fff;
  border: none;
  object-fit: contain;
  padding: 3px;
  box-sizing: border-box;
}

.promo-product-row--selected {
  grid-template-columns: 44px minmax(0, 1fr) auto;
  cursor: default;
  border-color: color-mix(in srgb, var(--hex-primary) 35%, var(--hex-border));
  background: color-mix(in srgb, var(--hex-primary) 7%, #fff);
  box-shadow: none;
}

.promo-product-row--selected.promo-product-row--with-qty {
  grid-template-columns: 44px minmax(0, 1fr) auto auto;
  align-items: center;
}

.promo-product-row--with-qty .promo-qty-field--inline {
  align-self: center;
}

.promo-product-row__remove {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--hex-muted-foreground);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.promo-product-row__remove:hover,
.promo-product-row__remove:focus-visible {
  color: var(--hex-danger-text, #b42318);
  background: color-mix(in srgb, var(--hex-danger, #e53935) 8%, #fff);
}

.promo-product-list--selected {
  margin-bottom: 10px;
}

.promo-category-scroll {
  display: flex;
  gap: 6px;
  margin: 0 0 10px;
  padding-bottom: 2px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.promo-category-chip {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--hex-border);
  border-radius: 999px;
  background: var(--hex-card);
  color: var(--hex-muted-foreground);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.promo-category-chip.is-active {
  border-color: var(--hex-primary);
  background: var(--hex-primary);
  color: #fff;
}

.promo-product-empty,
.promo-product-more {
  margin: 0;
  padding: 14px 12px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--hex-card) 72%, transparent);
  color: var(--hex-muted-foreground);
  font-size: 13px;
  text-align: center;
}

.promo-product-empty--hint {
  margin-bottom: 8px;
  border: 1px dashed var(--hex-border);
  background: color-mix(in srgb, var(--hex-card) 55%, transparent);
  font-weight: 500;
}

.promo-product-more {
  padding: 8px 10px;
}

.promo-product-row__text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.promo-product-row__name {
  display: -webkit-box;
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--hex-foreground);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.promo-product-row__meta {
  display: block;
  margin: 0;
  font-size: 12px;
  line-height: 1.25;
  color: var(--hex-muted-foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.promo-product-row__stock {
  display: none;
}

.promo-product-row__price,
.promo-product-row__sep,
.promo-product-row__remain {
  display: none;
}

.promo-qty-form__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.promo-qty-form__foot {
  flex-shrink: 0;
}

.promo-input-row--stack {
  flex-direction: column;
  align-items: stretch;
}

.promo-input-row--stack .promo-qty-field.promo-qty-field--inline {
  flex: none;
  width: 100%;
  min-width: 0;
  max-width: none;
}

.promo-qty-rule-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.promo-qty-rule-list__empty {
  padding: 24px 16px;
  border-radius: 10px;
  background: var(--hex-card);
  color: var(--muted-foreground);
  font-size: 14px;
  text-align: center;
}

.promo-qty-rule-buys {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.promo-qty-rule-card,
.promo-rule-card {
  padding: 14px 16px;
  font-size: 15px;
  border: 1px solid var(--hex-border);
  border-radius: 14px;
  background: var(--hex-card);
  box-shadow: 0 1px 3px rgba(16, 22, 35, 0.04);
}

.promo-qty-rule-card__head,
.promo-rule-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.promo-qty-rule-card__num,
.promo-rule-card__num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  background: var(--hex-primary-soft);
  color: var(--hex-primary);
  border-radius: 999px;
}

.promo-qty-rule-card__formula,
.promo-rule-card__formula {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

.promo-qty-rule-card__delete,
.promo-rule-card__delete {
  flex-shrink: 0;
}

.promo-qty-rule-card__flow,
.promo-rule-card__flow {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.promo-rule-card__lane {
  padding: 10px 12px;
  border-radius: 10px;
}

.promo-rule-card__lane--buy {
  background: color-mix(in srgb, var(--hex-primary) 8%, var(--hex-secondary));
}

.promo-qty-rule-card__lane-label,
.promo-rule-card__lane-label {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.promo-qty-rule-card__lane--free .promo-qty-rule-card__lane-label,
.promo-rule-card__lane--free .promo-rule-card__lane-label {
  color: var(--hex-success-text);
}

.promo-rule-card__lane--free {
  background: color-mix(in srgb, var(--hex-success) 10%, var(--hex-secondary));
}

.promo-qty-rule-card__divider,
.promo-rule-card__divider {
  height: 1px;
  margin: 10px 0;
  background: var(--hex-border);
}

.promo-rule-card__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 0;
  color: var(--hex-muted-foreground);
}

.promo-rule-card__arrow .ui-icon {
  width: 18px;
  height: 18px;
}

.promo-qty-chips {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.promo-qty-chip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.promo-qty-chip__img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--secondary);
}

.promo-qty-chip__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.promo-qty-chip__name {
  min-width: 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  word-break: break-word;
}

.promo-qty-chip__qty,
.promo-qty-chip__meta {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--hex-primary, #16899a);
  padding: 4px 10px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--hex-primary, #16899a) 10%, #fff);
}

.promo-qty-rule-card__empty,
.promo-rule-card__empty {
  margin: 0;
  font-size: 13px;
  color: var(--muted-foreground);
}

.promo-rule-card__amount {
  margin: 8px 0 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--hex-foreground);
  font-variant-numeric: tabular-nums;
}

.promo-rule-card__caption {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 10px;
}

.promo-rule-card__caption .promo-rule-card__amount {
  margin: 0;
  display: inline-block;
  padding: 8px 12px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--hex-primary, #16899a) 10%, #fff);
  color: var(--hex-primary, #16899a);
  text-align: center;
}

.promo-rule-card__lane .promo-qty-chips {
  margin-top: 0;
}

.promo-rule-card__lane--free .promo-qty-chip {
  flex-wrap: wrap;
}

.promo-rule-card__lane--free .promo-qty-chip__meta {
  flex: 1 0 100%;
  justify-content: center;
  text-align: center;
  margin-top: 6px;
}

.promo-rule-card__amount--solo {
  margin: 0;
}

.promo-rule-card__meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.promo-rule-card__pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--hex-primary-soft);
  color: var(--hex-primary);
  font-size: 12px;
  font-weight: 700;
}

.promo-rule-card__pill--muted {
  background: var(--hex-secondary);
  color: var(--hex-muted-foreground);
}

.promo-rule-card__percent {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 8px;
}

.promo-rule-card__percent-value {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--hex-success-text);
  font-variant-numeric: tabular-nums;
}

.promo-rule-card__percent-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--hex-muted-foreground);
}

.promo-rule-card__gift-meta,
.promo-qty-rule-card__gift {
  margin: 10px 0 0;
  padding: 8px 12px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--hex-primary, #16899a) 10%, #fff);
  color: var(--hex-primary, #16899a);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.promo-qty-rule-card__head-text {
  flex: 1;
  min-width: 0;
}

.promo-qty-rule-card__title {
  margin: 0;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.3;
}

.promo-qty-rule-card__summary {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted-foreground);
  word-break: break-word;
}

.promo-qty-rule-card__stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.promo-qty-rule-card__block {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--secondary);
}

.promo-qty-rule-card__block--free {
  background: color-mix(in srgb, var(--hex-success) 8%, var(--secondary));
}

.promo-qty-rule-card__label {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted-foreground);
}

.promo-qty-rule-card__label--example {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: normal;
  text-transform: none;
  color: var(--hex-foreground);
}

.promo-qty-rule-card__names {
  margin: 8px 0 0;
  font-weight: 500;
  line-height: 1.35;
  word-break: break-word;
}

.promo-qty-rule-card__meta {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted-foreground);
  word-break: break-word;
}

.promo-qty-rule-card__meta--sub {
  font-size: 12px;
}

.promo-qty-rule-card__gift {
  margin: 10px 0 0;
  padding: 8px 12px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--hex-primary, #16899a) 10%, #fff);
  color: var(--hex-primary, #16899a);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.promo-qty-rule-card__arrow {
  flex-shrink: 0;
  text-align: center;
  font-size: 18px;
  line-height: 1;
  color: var(--muted-foreground);
}

.promo-qty-rule-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
}

.promo-product-row.is-active {
  border-color: var(--hex-primary);
  background: color-mix(in srgb, var(--hex-primary-soft) 65%, var(--hex-card));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--hex-primary) 18%, transparent);
}

.promo-toolbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.promo-toolbar__search {
  width: 100%;
  min-width: 0;
}

.promo-toolbar__qty {
  width: 100%;
}

.promo-input-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 10px;
}

.promo-search-wrap {
  flex: 1 1 auto;
  min-width: 0;
}

.promo-search-input {
  display: block;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  min-height: 44px;
  height: 44px;
  margin: 0;
  padding: 0 14px;
  font-size: 14px !important;
  line-height: 1.2;
  border: 1px solid var(--hex-border);
  border-radius: 10px;
  background: var(--hex-card);
  color: var(--hex-foreground);
  box-shadow: none;
}

.promo-search-input::placeholder {
  color: var(--hex-muted-foreground);
}

.promo-search-input:focus {
  outline: none;
  border-color: var(--hex-primary);
  box-shadow: 0 0 0 3px rgba(22, 137, 154, 0.16);
}

.promo-qty-field:not(.promo-qty-field--inline):not(.promo-qty-field--bar) {
  display: block;
  width: 100%;
  max-width: 200px;
}

.promo-qty-field--bar {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 6px 10px 6px 14px;
  border: 1px solid var(--hex-border);
  border-radius: 10px;
  background: var(--hex-card);
  box-sizing: border-box;
}

.promo-qty-field--bar .promo-qty-field__label {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
  text-align: left;
  color: var(--hex-foreground);
}

.promo-qty-field--bar .promo-qty-input {
  flex: 0 0 auto;
  width: 72px;
  min-height: 32px;
  height: 32px;
  margin: 0;
  padding: 0 8px;
  border: 1px solid var(--hex-border);
  border-radius: 8px;
  background: var(--hex-secondary);
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.promo-qty-field--bar .promo-qty-input:focus {
  outline: none;
  border-color: var(--hex-primary);
  box-shadow: 0 0 0 2px rgba(22, 137, 154, 0.14);
}

.promo-qty-field.promo-qty-field--inline {
  flex: 0 0 auto;
  width: auto;
  min-width: 52px;
  max-width: 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  padding: 2px 6px 4px;
  border: 1px solid var(--hex-border);
  border-radius: 8px;
  background: #fff;
}

.promo-qty-field__label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--hex-muted-foreground);
  text-align: center;
  line-height: 1.2;
}

.promo-qty-field--inline .promo-qty-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 28px;
  height: 28px;
  padding: 0 4px;
  border: none;
  background: transparent;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.promo-qty-field--inline .promo-qty-input:focus {
  outline: none;
}

.promo-qty-inline {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--hex-border);
}

.promo-qty-input {
  width: 100%;
  padding: 6px 10px;
  font-size: 14px;
  text-align: center;
  box-sizing: border-box;
}

.worker-selected-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 10px 12px;
  align-items: center;
  padding: 14px 0;
}

.worker-selected-row__thumb {
  align-self: center;
  width: 56px !important;
  height: 56px !important;
  margin-top: 0;
}

.worker-selected-row__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.worker-selected-row__name {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--hex-foreground);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.worker-selected-row__tags {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 2px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--hex-muted-foreground);
}

.worker-selected-row__dot {
  margin: 0 4px;
  opacity: 0.4;
}

.worker-selected-row__price {
  margin: 2px 0 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--hex-foreground);
  font-variant-numeric: tabular-nums;
}

.worker-selected-row__total {
  color: var(--hex-primary);
  font-weight: 800;
}

.worker-selected-row__qty {
  align-self: center;
  flex-shrink: 0;
}

.worker-row-qty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-width: 52px;
  min-height: 52px;
  padding: 8px 12px;
  border: none;
  border-radius: 12px;
  background: var(--hex-secondary);
  color: var(--hex-foreground);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: none !important;
}

.worker-row-qty .order-qty-parts {
  max-width: 140px;
  text-align: center;
  white-space: normal;
  line-height: 1.25;
}

.order-qty-parts {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  color: var(--hex-foreground);
}

.detail-row__qty {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  max-width: 46%;
  text-align: right;
}

.detail-row__qty .order-qty-parts {
  font-size: 13px;
}

.worker-row-qty-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.worker-row-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--hex-muted-foreground);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.worker-row-remove:active {
  color: var(--hex-destructive, #dc2626);
  background: color-mix(
    in srgb,
    var(--hex-destructive, #dc2626) 12%,
    transparent
  );
}

.worker-order-edit-badge {
  margin: 6px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--hex-primary);
}

.worker-order-card--edit .worker-order-card__head {
  align-items: flex-start;
}

.worker-order-card--edit .worker-order-card__tools {
  margin-top: 4px;
  margin-bottom: 8px;
}

.worker-row-qty__n {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.worker-row-qty__unit {
  font-size: 11px;
  font-weight: 600;
  color: var(--hex-muted-foreground);
  line-height: 1.2;
}

.worker-selected-row.is-editing {
  background: color-mix(in srgb, var(--hex-primary-soft) 40%, var(--hex-card));
}

.worker-row-edit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 108px;
}

.worker-pack-edit {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  min-width: 0;
  padding: 4px 0;
}

.worker-pack-edit__row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.worker-pack-edit__label {
  font-size: 11px;
  font-weight: 700;
  color: var(--hex-muted-foreground);
}

.worker-pack-edit__sum {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--hex-foreground);
  text-align: right;
}

.worker-pack-edit__pcs {
  color: var(--hex-muted-foreground);
  font-weight: 600;
}

.worker-pack-edit .picker-qty-stepper {
  width: 100%;
  max-width: 160px;
  justify-self: end;
}

.worker-row-done-link {
  border: none;
  background: none;
  padding: 2px 0 0;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--hex-primary);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: none !important;
}

.worker-row-done-link:active {
  opacity: 0.7;
}

.worker-order-qty-stepper {
  width: 108px;
  max-width: 108px;
}

.picker-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px;
  min-height: 0;
}

.picker-step2.picker-panel,
.picker-step1.picker-panel {
  padding: 0;
  gap: 0;
}

.picker-panel__lead {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--hex-foreground);
}

.picker-panel__empty {
  padding: 28px 16px;
  text-align: center;
  font-size: 14px;
  color: var(--hex-muted-foreground);
  background: var(--hex-secondary);
  border-radius: 12px;
}

.picker-row {
  display: grid;
  grid-template-columns: var(--picker-row-thumb) minmax(0, 1fr) auto;
  gap: var(--picker-row-gap);
  align-items: center;
  width: 100%;
  min-height: calc(var(--picker-row-thumb) + var(--picker-row-pad-y) * 2);
  padding: var(--picker-row-pad-y) 12px var(--picker-row-pad-y) 16px;
  margin: 0;
  border: none;
  border-bottom: 1px solid var(--hex-border);
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.15s ease;
  box-shadow: none;
}

.picker-row:active {
  opacity: 0.72;
}

.picker-row__thumb {
  width: var(--picker-row-thumb);
  height: var(--picker-row-thumb);
  flex-shrink: 0;
  align-self: center;
  display: block;
  border-radius: 0;
  object-fit: contain;
  object-position: center;
  padding: 3px;
  box-sizing: border-box;
  background: #fff;
  border: none;
  box-shadow: none;
}

.picker-row__thumb-box {
  display: contents;
}

.picker-row__info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.picker-row__field {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.picker-row__field--name {
  flex-direction: row;
  align-items: center;
  gap: 6px;
  padding-bottom: 0;
  border-bottom: none;
}

.picker-row__label {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--hex-muted-foreground);
  opacity: 0.85;
}

.picker-row__value {
  font-size: var(--picker-row-meta);
  font-weight: 700;
  line-height: 1.25;
  color: var(--hex-foreground);
  font-variant-numeric: tabular-nums;
}

.picker-row__value--name {
  flex: 1;
  min-width: 0;
  font-size: var(--picker-row-name);
  font-weight: 700;
  color: var(--hex-foreground);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.picker-row__stats {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
}

.picker-row__info .picker-row__meta {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0;
  font-weight: 600;
  color: var(--hex-muted-foreground);
}

.picker-row__info .picker-row__meta .picker-row__label {
  margin-right: 3px;
}

.picker-row__stats .picker-row__field {
  display: inline-flex;
  flex-direction: row;
  align-items: baseline;
  gap: 4px;
  padding: 0;
  background: none;
  border-radius: 0;
}

.picker-row__value--price {
  font-size: calc(var(--picker-row-meta) + 1px);
  font-weight: 700;
  color: var(--hex-primary);
}

.picker-row__value--stock {
  font-size: calc(var(--picker-row-meta) + 1px);
  font-weight: 700;
  color: var(--hex-foreground);
}

.picker-row__value--stock-low {
  color: var(--hex-warning-text);
}

.picker-row__value--pack {
  font-size: calc(var(--picker-row-meta) + 1px);
  font-weight: 700;
  color: var(--hex-primary);
}

.picker-qty-sheet__meta-sep {
  margin: 0 4px;
  opacity: 0.55;
}

.picker-row__name {
  margin: 0;
  font-size: var(--picker-row-name);
  font-weight: 700;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--hex-foreground);
  letter-spacing: -0.01em;
}

.picker-row__meta {
  margin: 0;
  font-size: var(--picker-row-meta);
  font-weight: 600;
  line-height: 1.35;
  color: var(--hex-muted-foreground);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.picker-row__meta-sep {
  margin: 0 4px;
  color: #8a94a6;
  font-weight: 500;
}

.picker-row__qty {
  flex-shrink: 0;
  max-width: 42%;
  font-size: var(--picker-row-qty);
  font-weight: 700;
  line-height: 1.2;
  white-space: normal;
  color: var(--hex-primary);
  background: none;
  padding: 0;
  border-radius: 0;
  min-width: 0;
  text-align: right;
}

.picker-qty-stepper--compact {
  display: grid;
  grid-template-columns: 36px minmax(40px, 1fr) 36px;
  gap: 4px;
  width: 118px;
  min-width: 118px;
  max-width: 118px;
  flex-shrink: 0;
  box-sizing: border-box;
}

.picker-qty-stepper--compact .qty-stepper__btn {
  width: 100%;
  min-width: 0;
  min-height: 32px !important;
  height: 32px !important;
  padding: 0 !important;
  font-size: 18px !important;
  line-height: 1;
  border-width: 1px;
  border-radius: 8px;
}

.picker-qty-stepper--compact .qty-stepper__input,
.worker-order-qty-stepper .qty-stepper__input {
  cursor: text;
  -webkit-user-select: text;
  user-select: text;
}

.picker-qty-stepper--compact .qty-stepper__input {
  width: 100%;
  min-width: 0;
  min-height: 32px !important;
  height: 32px !important;
  padding: 0 2px !important;
  font-size: 14px !important;
  text-align: center;
  border-width: 1px;
  border-radius: 8px;
}

.picker-qty-stepper--compact .qty-stepper__input:focus {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--hex-primary) 14%, transparent);
}

.picker-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: var(--hex-secondary);
  color: var(--hex-foreground);
}

.picker-tag--muted {
  color: var(--hex-muted-foreground);
  font-weight: 600;
}

.picker-tag--total {
  background: var(--hex-primary);
  color: var(--hex-primary-foreground);
}

.picker-row.is-selected .picker-row__name {
  color: var(--hex-primary);
}

.picker-layout {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.picker-categories {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 52vh;
  overflow-y: auto;
  padding-right: 4px;
}

.picker-cat-btn {
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--hex-secondary);
  border: 1px solid transparent;
  font-size: 13px;
}

.picker-cat-btn.is-active {
  background: var(--hex-primary);
  color: var(--hex-primary-foreground);
}

.picker-step2__toolbar {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px var(--picker-h-inset, 6px) 6px;
  border-bottom: 1px solid var(--hex-border);
  background: var(--hex-card);
}

.picker-tax-chips {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.category-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 12px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--hex-border);
}

.category-group:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.category-group__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.category-group__name {
  margin: 0;
  font-weight: 700;
  font-size: 14px;
}

.category-group__meta {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--hex-muted-foreground);
}

.category-form__add-row--type {
  flex-wrap: wrap;
}

.category-form__add-row--type select {
  flex: 1 1 7rem;
  min-width: 0;
}

.picker-cat-chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 7px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 2px 0 3px;
  min-height: 36px;
  align-items: center;
  scrollbar-width: none;
}

.picker-cat-chips::-webkit-scrollbar {
  display: none;
}

.picker-cat-chip {
  flex: 0 0 auto;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--hex-secondary);
  border: 1px solid var(--hex-border);
  color: var(--hex-foreground);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  min-height: 34px;
  line-height: 1.2;
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    transform 0.1s ease,
    filter 0.1s ease;
  -webkit-tap-highlight-color: transparent;
}

.picker-cat-chip.is-active {
  background: var(--hex-primary);
  color: var(--hex-primary-foreground);
}

.picker-cat-chip:hover:not(:disabled):not(.is-active) {
  background: color-mix(
    in srgb,
    var(--hex-secondary) 78%,
    var(--hex-primary) 22%
  );
  border-color: color-mix(
    in srgb,
    var(--hex-border) 50%,
    var(--hex-primary) 50%
  );
}

.picker-cat-chip.is-active:hover:not(:disabled) {
  background: #1eb3c7;
  border-color: #1eb3c7;
}

.picker-categories--step1 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: none;
  overflow: visible;
  padding-right: 0;
  flex: 1;
  min-height: 0;
  align-content: start;
}

.picker-step1 {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.picker-cat-btn--step1 {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 600;
  line-height: 1.25;
  padding: 10px 8px;
  word-break: break-word;
}

.picker-step-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.picker-back-btn {
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--hex-secondary);
  font-size: 13px;
  font-weight: 600;
  shrink: 0;
}

.picker-step-cat {
  font-weight: 700;
  font-size: 15px;
}

.category-scroll {
  max-height: 180px;
  overflow-y: auto;
}

.store-picker-list {
  max-height: 320px;
  overflow-y: auto;
}

.delivery-view {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.delivery-view__head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.delivery-view__head--row {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.delivery-view__title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delivery-view__lead {
  margin: 0;
  font-size: 14px;
  color: var(--hex-muted-foreground);
}

.delivery-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: color-mix(
    in srgb,
    var(--hex-warning, #f59e0b) 14%,
    var(--hex-card)
  );
  border: 1px solid
    color-mix(in srgb, var(--hex-warning, #f59e0b) 34%, var(--hex-border));
}

.delivery-alert__icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--hex-warning, #f59e0b) 18%, transparent);
  color: var(--hex-warning, #d97706);
}

.delivery-alert__icon .ui-icon {
  width: 16px;
  height: 16px;
}

.delivery-alert__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
  color: var(--hex-foreground);
}

.delivery-view__toolbar {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--hex-background);
  padding-bottom: 2px;
}

.delivery-view__search {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-height: var(--field-h);
  padding: 10px 14px;
  border: 1.5px solid var(--hex-border);
  border-radius: var(--btn-radius, 10px);
  background: var(--hex-card);
  color: var(--hex-foreground);
  font-size: 16px;
  line-height: 1.25;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: none !important;
}

.delivery-view__search::-webkit-search-decoration,
.delivery-view__search::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.delivery-view__search::placeholder {
  color: var(--hex-muted-foreground);
  opacity: 1;
}

.delivery-view__search:focus {
  border-color: var(--hex-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(22, 137, 154, 0.14) !important;
}

.delivery-view__empty {
  margin: 0;
  padding: 28px 16px;
  text-align: center;
  font-size: 14px;
  color: var(--hex-muted-foreground);
  background: var(--hex-card);
  border: 1px dashed var(--hex-border);
  border-radius: 12px;
}

.delivery-store-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.delivery-store-card-wrap {
  display: contents;
}

.delivery-store-card-wrap.is-active .delivery-store-card {
  border-color: var(--hex-primary);
}

.delivery-store-card__mark {
  width: 100%;
  justify-content: center;
  white-space: normal;
  line-height: 1.3;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 10px;
  transform: none !important;
}

.delivery-store-card__mark:hover,
.delivery-store-card__mark:active,
.delivery-order-row__mark,
.delivery-order-row__mark:hover,
.delivery-order-row__mark:active {
  transform: none !important;
}

.delivery-store-card__mark > *,
.delivery-order-row__mark > * {
  pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
  .delivery-store-card__mark.tone--info:hover:not(:disabled),
  .delivery-order-row__mark.tone--info:hover:not(:disabled) {
    filter: brightness(0.97);
  }
}

.delivery-store-card__mark-note {
  display: block;
  padding: 8px 4px 2px;
  font-size: 12px;
  font-weight: 600;
  color: var(--hex-muted-foreground);
  text-align: center;
}

.delivery-store-grid--compact {
  grid-template-columns: 1fr;
  gap: 10px;
}

.delivery-store-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0;
  border: 1px solid var(--hex-border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--hex-card);
  text-align: left;
  -webkit-tap-highlight-color: transparent;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.delivery-store-card.is-active {
  border-color: var(--hex-primary);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--hex-primary) 25%, transparent);
}

.delivery-store-card__main {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  width: 100%;
  margin: 0;
  padding: 14px 14px 12px;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
}

.delivery-store-card__main:focus-visible {
  outline: 2px solid var(--hex-primary);
  outline-offset: -2px;
}

.delivery-store-card__media,
.delivery-store-card__img,
.delivery-store-card__pin,
.delivery-store-card__badge,
.delivery-store-card__body,
.delivery-store-card__meta {
  display: none !important;
}

.delivery-store-card__name {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--hex-foreground);
}

.delivery-store-card__company {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--hex-muted-foreground);
}

.delivery-store-card__phone {
  margin: 2px 0 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--hex-primary);
}

.delivery-store-card__addr,
.delivery-store-card__note {
  margin: 2px 0 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--hex-muted-foreground);
}

.delivery-store-card__count {
  margin: 6px 0 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--hex-muted-foreground);
}

.delivery-store-card__total {
  margin: 6px 0 0;
  font-size: 17px;
  font-weight: 800;
  color: var(--hex-primary);
  font-variant-numeric: tabular-nums;
}

.delivery-store-card__footer {
  padding: 0 12px 12px;
}

.delivery-map {
  position: relative;
  z-index: 0;
  isolation: isolate;
  height: min(42vh, 320px) !important;
  min-height: 220px !important;
  width: 100% !important;
  display: block !important;
  border-radius: 14px;
  overflow: hidden;
  background: var(--hex-secondary);
  border: 1px solid var(--hex-border);
  /* Keep Leaflet panes/controls inside this box (they use z-index 200–1000). */
  transform: translateZ(0);
}

.delivery-map .leaflet-container {
  width: 100% !important;
  height: 100% !important;
  z-index: 0 !important;
  font: inherit;
}

.delivery-map .leaflet-pane,
.delivery-map .leaflet-top,
.delivery-map .leaflet-bottom,
.delivery-map .leaflet-control {
  /* Contain stacking inside .delivery-map (isolation already set). */
  pointer-events: auto;
}

.delivery-view--map > .delivery-view__head,
.delivery-view--map > .delivery-alert,
.delivery-view--map > .delivery-map__status,
.delivery-view--map > .delivery-store-detail__maps-row,
.delivery-view--map > .delivery-store-detail,
.delivery-view--map > .delivery-orders,
.delivery-view--map > .delivery-view__toolbar,
.delivery-view--map > .delivery-other-stores {
  position: relative;
  z-index: 1;
}

.delivery-map__loading {
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 14px;
  color: var(--hex-muted-foreground);
}

.delivery-map__status {
  margin: -4px 0 0;
  font-size: 12px;
  color: var(--hex-muted-foreground);
}

.delivery-map-pin {
  background: transparent;
  border: none;
}

.delivery-map-pin__dot {
  display: block;
  width: 18px;
  height: 18px;
  margin: 0 auto 2px;
  border-radius: 999px 999px 999px 0;
  transform: rotate(-45deg);
  background: var(--hex-danger, #c43c52);
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.25);
}

.delivery-map-pin--active .delivery-map-pin__dot {
  width: 22px;
  height: 22px;
  background: var(--hex-primary);
}

.delivery-map-pin__label {
  display: block;
  max-width: 112px;
  margin: 0 auto;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgb(255 255 255 / 0.94);
  border: 1px solid var(--hex-border);
  box-shadow: 0 1px 4px rgb(0 0 0 / 0.12);
  color: var(--hex-foreground, #182032);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.delivery-map-pin--active .delivery-map-pin__label {
  border-color: var(--hex-primary);
  color: var(--hex-primary);
}

.delivery-store-detail__maps-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
}

.delivery-store-detail__maps-row--top {
  padding: 0 2px;
}

.delivery-store-detail__maps--apple {
  color: var(--hex-muted-foreground);
  font-weight: 500;
}

.delivery-store-detail {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.delivery-store-detail__extra {
  padding: 0 4px 4px;
}

.delivery-store-detail__addr,
.delivery-store-detail__hint {
  margin: 0 0 6px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--hex-muted-foreground);
}

.delivery-store-detail__maps {
  display: inline-flex;
  font-size: 13px;
  font-weight: 600;
  color: var(--hex-primary);
}

.delivery-orders__title,
.delivery-other-stores__title {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
}

.delivery-orders__list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--hex-border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--hex-card);
}

.delivery-order-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 0;
  border: none;
  border-bottom: 1px solid var(--hex-border);
  background: transparent;
}

.delivery-order-row:last-child {
  border-bottom: none;
}

.delivery-order-row__open {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.delivery-order-row__mark {
  flex-shrink: 0;
  margin-right: 10px;
  min-width: 0;
  max-width: 132px;
  white-space: normal;
  line-height: 1.25;
  text-align: center;
  font-size: 12px;
}

.delivery-order-row__marked {
  flex-shrink: 0;
  margin-right: 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--hex-primary);
}

.delivery-order-row__main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.delivery-order-row__no {
  font-size: 13px;
  font-weight: 700;
}

.delivery-order-row__meta {
  font-size: 12px;
  color: var(--hex-muted-foreground);
}

.delivery-order-row__total {
  font-size: 14px;
  flex-shrink: 0;
}

.delivery-other-stores {
  margin-top: 4px;
}

.delivery-store-card__main:active {
  filter: brightness(0.97);
}

.worker-store-list {
  max-height: min(calc(100vh - 280px), 720px);
  overflow-y: auto;
}

.picker-step2 {
  --picker-h-inset: 6px;
  --picker-row-thumb: 64px;
  --picker-row-gap: 10px;
  --picker-row-pad-y: 10px;
  --picker-row-name: 15px;
  --picker-row-meta: 13px;
  --picker-row-meta-mt: 3px;
  --picker-row-qty: 11px;
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 0;
  max-height: calc(90vh - 55px);
  overflow: hidden;
}

.picker-step2__scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding: 0 var(--picker-h-inset, 6px);
  display: flex;
  flex-direction: column;
  gap: 0;
}

.picker-step2__bottom {
  flex-shrink: 0;
  padding: 12px var(--picker-h-inset, 6px)
    calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--hex-border);
  background: var(--hex-card);
  box-shadow: 0 -6px 20px rgba(16, 22, 35, 0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.picker-step2__bottom--actions {
  gap: 0;
}

.picker-cart-summary {
  padding-bottom: 10px;
}

.picker-cart-summary .worker-order-stats {
  margin-bottom: 0;
}

.picker-cart-summary--empty {
  min-height: 52px;
  visibility: hidden;
  padding-bottom: 10px;
}

.picker-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: none;
  overflow: visible;
  padding: 0;
}

.picker-qty-sheet {
  position: absolute;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: stretch;
}

.picker-step2--qty-open .picker-step2__bottom {
  visibility: hidden;
  pointer-events: none;
}

.picker-qty-sheet__backdrop {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  border: none;
  background: rgba(16, 22, 35, 0.42);
  cursor: pointer;
}

.picker-qty-sheet__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  background: var(--hex-card);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -10px 36px rgba(16, 22, 35, 0.16);
}

.picker-qty-sheet__head {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.picker-qty-sheet__thumb {
  width: 52px;
  height: 52px;
}

.picker-qty-sheet__name {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
}

.picker-qty-sheet__meta {
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: #3d4a5c;
}

.picker-qty-sheet__stepper {
  display: flex;
  justify-content: stretch;
  margin-bottom: 16px;
}

.picker-qty-sheet__qty {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 16px;
}

.picker-qty-sheet__row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.picker-qty-sheet__row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.picker-qty-sheet__row-label {
  font-size: 16px;
  font-weight: 700;
  color: var(--hex-foreground);
}

.picker-qty-sheet__row-hint {
  font-size: 14px;
  font-weight: 600;
  color: #3d4a5c;
}

.picker-qty-stepper--sheet {
  width: 100%;
  min-width: 0;
  max-width: none;
  flex-shrink: 1;
  box-sizing: border-box;
}

.picker-qty-sheet__row .picker-qty-stepper--sheet,
.picker-qty-sheet__stepper .picker-qty-stepper--sheet {
  width: 100%;
  max-width: none;
  margin: 0;
}

.picker-qty-sheet__row .picker-qty-stepper--compact,
.picker-qty-sheet__stepper .picker-qty-stepper--compact {
  width: min(100%, 240px);
  min-width: 0;
  max-width: 240px;
  margin: 0 auto;
  grid-template-columns: 44px minmax(56px, 1fr) 44px;
}

.picker-qty-sheet__total {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  text-align: center;
  font-size: 14px;
  color: var(--hex-muted-foreground);
}

.picker-qty-sheet__total-sep {
  color: #8a94a6;
}

.picker-qty-sheet__total b {
  font-size: 20px;
  font-weight: 800;
  color: var(--hex-foreground);
}

.picker-qty-sheet__total .order-qty-parts {
  font-size: 14px;
  color: var(--hex-foreground);
}

.picker-qty-sheet__row .picker-qty-stepper--compact .qty-stepper__btn,
.picker-qty-sheet__stepper .picker-qty-stepper--compact .qty-stepper__btn {
  min-height: 44px !important;
  height: 44px !important;
}

.picker-qty-sheet__row .picker-qty-stepper--compact .qty-stepper__input,
.picker-qty-sheet__stepper .picker-qty-stepper--compact .qty-stepper__input {
  min-height: 44px !important;
  height: 44px !important;
  font-size: 16px !important;
}

.picker-qty-sheet__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.picker-qty-stepper input {
  font-weight: 700;
}

.picker-summary {
  display: flex;
  align-items: stretch;
  border-top: 1px solid var(--hex-border);
  border-bottom: 1px solid var(--hex-border);
}

.picker-summary__item {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 10px 6px;
  border-radius: 0;
  background: transparent;
  text-align: center;
}

.picker-summary__item + .picker-summary__item {
  border-left: 1px solid var(--hex-border);
}

.picker-summary__item--total {
  background: color-mix(in srgb, var(--hex-primary-soft) 45%, transparent);
}

.picker-summary__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--hex-muted-foreground);
}

.picker-summary__value {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--hex-foreground);
  font-variant-numeric: tabular-nums;
}

.picker-summary__item--total .picker-summary__value {
  color: var(--hex-primary);
}

.picker-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: var(--hex-card);
}

@media (min-width: 1024px) {
  .modal-panel--picker .modal-panel__head {
    padding: 16px 20px;
  }

  .modal-panel--picker .modal-panel__title {
    font-size: 1.125rem;
  }

  #picker-order-title .worker-order-store__name {
    font-size: 1.125rem;
  }

  .picker-step2 {
    --picker-h-inset: 20px;
    --picker-row-thumb: 56px;
    --picker-row-gap: 12px;
    --picker-row-pad-y: 11px;
    --picker-row-name: 15px;
    --picker-row-meta: 13px;
    min-height: min(480px, calc(88vh - 120px));
  }

  .picker-step2__toolbar {
    padding: 12px var(--picker-h-inset) 10px;
  }

  .picker-cat-chips {
    flex-wrap: wrap;
    overflow: visible;
    gap: 8px;
    padding: 0;
  }

  .picker-cat-chip {
    padding: 8px 14px;
    font-size: 13px;
    min-height: 36px;
  }

  .picker-step2__scroll {
    padding: 0 var(--picker-h-inset);
  }

  .picker-row {
    padding: var(--picker-row-pad-y) 4px var(--picker-row-pad-y) 0;
    transition: background 0.12s ease;
  }

  .picker-row:hover {
    background: color-mix(in srgb, var(--hex-secondary) 45%, transparent);
  }

  .picker-row__info {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }

  .picker-row__name {
    flex: 1;
    min-width: 0;
  }

  .picker-row__meta {
    flex-shrink: 0;
    text-align: right;
  }

  .picker-step2__bottom {
    padding: 14px var(--picker-h-inset) 16px;
    box-shadow: none;
  }

  .picker-footer {
    gap: 12px;
  }
}

.picker-barcode-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.barcode-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px auto auto auto;
  gap: 8px;
}

.picker-search-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.picker-search-input {
  box-sizing: border-box;
  width: 100%;
  min-height: var(--field-h);
  padding: 10px 14px;
  border: 1.5px solid var(--hex-border);
  border-radius: var(--btn-radius, 10px);
  background: var(--hex-card);
  color: var(--hex-foreground);
  font-size: 16px;
  line-height: 1.25;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: none !important;
}

.picker-search-input::-webkit-search-decoration,
.picker-search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.picker-search-input::placeholder {
  color: var(--hex-muted-foreground);
  opacity: 1;
}

.picker-search-input:focus {
  border-color: var(--hex-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(22, 137, 154, 0.14) !important;
}

.picker-search-clear {
  align-self: stretch;
  white-space: nowrap;
}

.barcode-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.barcode-input-row--scan {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.barcode-scanner {
  overflow: hidden;
  border-radius: 8px;
  background: #111827;
  color: #fff;
}

.barcode-scanner video {
  width: 100%;
  height: 220px;
  display: block;
  object-fit: cover;
}

.barcode-scanner-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px;
  font-size: 12px;
}

.picker-status {
  border-radius: 8px;
  background: var(--hex-primary-soft);
  color: var(--hex-primary);
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
}

.qty-stepper {
  display: grid;
  grid-template-columns: 44px minmax(52px, 1fr) 44px;
  gap: 6px;
  align-items: center;
}

.qty-stepper.picker-qty-stepper--sheet {
  display: flex;
  align-items: stretch;
  gap: 12px;
  width: 100%;
  min-width: 0;
}

.qty-stepper.picker-qty-stepper--sheet .qty-stepper__btn {
  flex: 0 0 52px;
  width: 52px;
  min-width: 52px;
  max-width: 52px;
  min-height: 48px !important;
  height: 48px !important;
  padding: 0 !important;
  font-size: 28px !important;
  line-height: 1;
  border-width: 2px;
  border-radius: 10px;
  background: var(--hex-card);
  box-sizing: border-box;
}

.qty-stepper.picker-qty-stepper--sheet .qty-stepper__input {
  flex: 1 1 0;
  width: 0;
  min-width: 0;
  min-height: 48px !important;
  height: 48px !important;
  padding: 0 8px !important;
  font-size: 22px !important;
  font-weight: 800;
  text-align: center;
  border-width: 2px;
  border-radius: 10px;
  background: #fff;
  box-sizing: border-box;
}

.qty-stepper.picker-qty-stepper--sheet .qty-stepper__input:focus {
  box-shadow: 0 0 0 3px rgba(22, 137, 154, 0.16);
}

.qty-stepper__btn {
  display: grid;
  place-items: center;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 1.5px solid var(--hex-border);
  border-radius: 10px;
  background: var(--hex-card);
  color: var(--hex-primary);
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow: none !important;
}

.qty-stepper__btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.qty-stepper__input {
  height: 44px;
  min-height: 44px;
  border-radius: 10px;
  border: 1.5px solid var(--hex-border);
  background: var(--hex-card);
  text-align: center;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.qty-stepper__input:focus {
  outline: none;
  border-color: var(--hex-primary);
  box-shadow: 0 0 0 3px rgba(22, 137, 154, 0.16);
  cursor: text;
}

.qty-stepper button:not(.qty-stepper__btn),
.qty-stepper input:not(.qty-stepper__input) {
  height: 40px;
  border-radius: 8px;
  background: var(--hex-card);
  text-align: center;
}

.worker-selected-row .qty-stepper button,
.worker-selected-row .qty-stepper input {
  background: var(--hex-secondary);
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
    line-height: 1.45;
  }

  .page-head__title {
    font-size: 1.1rem !important;
  }

  input,
  select,
  textarea {
    font-size: 16px !important;
    line-height: 1.25 !important;
  }

  .stat-card {
    padding: 10px 12px !important;
  }

  .stat-card__label {
    font-size: 11px !important;
  }

  .stat-card__value {
    font-size: 1rem !important;
  }

  .mobile-stats .stat-card__label {
    font-size: 11px !important;
  }

  .mobile-stats .stat-card__value {
    font-size: 1.05rem !important;
  }

  .worker-store-extra {
    display: none !important;
  }

  .catalog-card__btn {
    min-height: 34px !important;
    padding: 0 6px !important;
    font-size: 11px !important;
  }

  .catalog-card__actions {
    gap: 6px;
  }

  .admin-action {
    padding: 10px !important;
    font-size: 13px !important;
  }

  .mobile-menu-button:not(.mobile-menu-button--sheet) {
    top: max(10px, env(safe-area-inset-top, 0px)) !important;
    left: 10px !important;
    width: 48px;
    height: 48px;
    min-height: 48px;
  }

  .mobile-menu-button--open {
    left: auto !important;
    right: max(10px, env(safe-area-inset-right, 0px)) !important;
  }

  .mobile-menu-button svg {
    width: 22px;
    height: 22px;
  }

  .mobile-sidebar.w-64,
  aside.w-64,
  .app-sidebar {
    width: min(82vw, 280px) !important;
    padding-top: env(safe-area-inset-top, 0px);
  }

  .sidebar-brand {
    padding: max(16px, env(safe-area-inset-top, 0px)) 16px 14px !important;
  }

  aside .p-6:not(.sidebar-brand) {
    padding: 16px !important;
  }

  aside nav.p-4,
  aside .p-4 {
    padding: 12px !important;
  }

  aside nav .sidebar-nav-btn {
    padding: 12px 14px !important;
    min-height: 48px;
  }

  aside nav .sidebar-nav-btn__icon {
    width: 34px;
    height: 34px;
  }

  .tomuda-logo {
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
  }

  .login-brand__logo {
    width: 72px;
    max-height: 72px;
  }

  .space-y-5 > :not([hidden]) ~ :not([hidden]) {
    --tw-space-y-reverse: 0;
    margin-top: calc(9px * calc(1 - var(--tw-space-y-reverse))) !important;
    margin-bottom: calc(9px * var(--tw-space-y-reverse)) !important;
  }

  .space-y-4 > :not([hidden]) ~ :not([hidden]) {
    --tw-space-y-reverse: 0;
    margin-top: calc(8px * calc(1 - var(--tw-space-y-reverse))) !important;
    margin-bottom: calc(8px * var(--tw-space-y-reverse)) !important;
  }

  .gap-4 {
    gap: 8px !important;
  }

  .gap-3 {
    gap: 7px !important;
  }

  .p-8 {
    padding: 14px !important;
  }

  .p-6:not(.modal-panel__head) {
    padding: 13px !important;
  }

  .p-5:not(.modal-panel__head) {
    padding: 12px !important;
  }

  .p-4:not(.modal-panel__head) {
    padding: 10px !important;
  }

  .p-3 {
    padding: 8px !important;
  }

  .px-4 {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .py-3 {
    padding-top: 7px !important;
    padding-bottom: 7px !important;
  }

  .py-2 {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
  }

  .text-xl {
    font-size: 1.02rem !important;
  }

  .text-lg {
    font-size: 0.95rem !important;
  }

  .rounded {
    border-radius: 7px !important;
  }

  #modal > div {
    align-items: stretch !important;
    padding: 0 !important;
  }

  #modal > div > div {
    width: 100% !important;
    max-width: none !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  #modal > div > div > .border-b,
  #modal > div > div > .modal-panel__head {
    padding-top: calc(10px + var(--sat)) !important;
    padding-right: 12px !important;
    padding-bottom: 10px !important;
    padding-left: 12px !important;
    flex-shrink: 0;
  }

  #modal h3 {
    line-height: 1.2;
  }

  #modal [onclick="closeModal()"] {
    min-width: 38px;
    min-height: 34px;
    padding: 6px !important;
  }

  .modal-scroll {
    max-height: calc(100dvh - 55px) !important;
  }

  #modal
    > div
    > div
    > :not(.border-b):not(.picker-step2):not(.picker-step1):not(
      .stock-alert-form
    ):not(.employee-form):not(.product-form) {
    max-height: calc(100dvh - 55px);
    overflow-y: auto;
  }

  #modal > div > div > .picker-step1,
  #modal > div > div > .picker-step2 {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }

  #modal > div > div > .stock-alert-form {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    height: auto !important;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)) !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }

  #modal > div > div > .employee-form {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    height: auto !important;
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }

  #modal > div > div > .product-form {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    height: auto !important;
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .employee-form__body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .product-form__body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .employee-form__foot {
    flex-shrink: 0;
  }

  .product-form__foot {
    flex-shrink: 0;
  }

  .stock-alert-list {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    gap: 3px !important;
  }

  .stock-alert-row {
    grid-template-columns: var(--thumb-md) minmax(0, 1fr) 56px;
    gap: 10px;
    padding: 8px 10px !important;
  }

  .stock-alert-thumb {
    width: var(--thumb-md) !important;
    height: var(--thumb-md) !important;
  }

  .stock-alert-row__name {
    font-size: 13px !important;
  }

  .stock-alert-row__sub {
    font-size: 11px !important;
  }

  .stock-alert-row__limit-label {
    display: none;
  }

  .stock-alert-row__input {
    max-width: 56px !important;
    min-height: 32px;
    padding: 6px 6px !important;
  }

  .stock-alert-form__foot button {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
  }

  .picker-step2 {
    --picker-h-inset: 6px;
    --picker-row-thumb: 60px;
    --picker-row-gap: 8px;
    --picker-row-pad-y: 8px;
    --picker-row-name: 14px;
    --picker-row-meta: 12px;
    --picker-row-meta-mt: 2px;
    --picker-row-qty: 11px;
  }

  .picker-step2__toolbar {
    padding: 8px var(--picker-h-inset) 6px;
    gap: 6px;
  }

  .picker-cat-chips {
    min-height: 34px;
    gap: 6px;
  }

  .picker-cat-chip {
    padding: 6px 11px;
    min-height: 32px;
    font-size: 12px;
  }

  .picker-step2__scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto !important;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 0 var(--picker-h-inset);
    padding-bottom: calc(170px + env(safe-area-inset-bottom, 0px));
    gap: 0;
  }

  .picker-step2__bottom {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    padding: 10px var(--picker-h-inset)
      calc(10px + env(safe-area-inset-bottom, 0px));
    gap: 8px;
    border-top: 1px solid var(--hex-border);
    background: var(--hex-card);
    box-shadow: none;
  }

  .picker-step1 {
    height: calc(100dvh - 55px);
    max-height: calc(100dvh - 55px);
    overflow: hidden;
  }

  .customer-map {
    height: 220px !important;
    min-height: 220px !important;
  }

  .product-thumb {
    width: 48px;
    height: 48px;
    border-radius: 0;
  }

  .detail-row .product-thumb {
    width: 64px;
    height: 64px;
  }

  .worker-add-plus--compact {
    width: 44px;
    height: 44px;
    font-size: 24px;
  }

  .app-shell--bottom-nav .worker-order-card {
    display: flex;
    flex-direction: column;
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .app-shell--bottom-nav .worker-order-card__body {
    flex: 0 0 auto;
    overflow: visible;
    max-height: none;
  }

  .app-shell--bottom-nav .worker-order-lines-wrap {
    overflow: visible;
    max-height: none;
  }

  .app-shell--bottom-nav .worker-order-card__foot {
    position: relative;
    flex-shrink: 0;
    z-index: 12;
    margin-top: 8px;
    padding-top: 12px;
    padding-bottom: 10px;
    background: var(--hex-background);
    box-shadow: 0 -8px 20px rgba(16, 22, 35, 0.06);
  }

  .app-shell--bottom-nav .worker-order-lines {
    overflow: visible;
    min-height: 0;
  }

  .app-shell--bottom-nav .worker-view--ordering {
    display: block;
    flex: none;
    min-height: 0;
    height: auto;
    align-items: stretch;
    gap: 0;
  }

  .app-shell--bottom-nav .worker-view--ordering .worker-view__tabs {
    margin-bottom: 8px;
  }

  .app-shell--bottom-nav .worker-view--ordering .worker-order-top-meta {
    flex-shrink: 0;
    margin: 0 0 8px;
  }

  .app-shell--bottom-nav .worker-view--ordering .worker-order-card {
    flex: none;
    min-height: 0;
    overflow: visible;
    padding-bottom: 0;
  }

  .app-shell--bottom-nav .worker-view--ordering .worker-order-card__head {
    flex-shrink: 0;
  }

  .app-shell--bottom-nav .worker-view--ordering .worker-order-card__body {
    flex: none;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: visible;
  }

  .app-shell--bottom-nav .worker-view--ordering .worker-order-summary {
    flex-shrink: 0;
  }

  .app-shell--bottom-nav .worker-view--ordering .worker-order-card__tools {
    flex-shrink: 0;
  }

  .app-shell--bottom-nav
    .worker-view--ordering
    .worker-order-card__body
    > .worker-order-stats {
    position: static;
    flex-shrink: 0;
  }

  .app-shell--bottom-nav .worker-view--ordering .worker-order-lines-wrap {
    flex: none;
    min-height: 0;
    overflow: visible;
    max-height: none;
  }

  .app-shell--bottom-nav
    .worker-view--ordering
    .worker-order-card__foot--below-tabs {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    z-index: 12;
    margin: 0 0 8px;
    padding: 0 0 10px;
    background: var(--hex-background);
    box-shadow: none;
  }

  .app-shell--bottom-nav .worker-order-savebar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: var(--mobile-nav-offset);
    z-index: 40;
    margin: 0;
    padding: 10px var(--app-gutter) 10px;
    background: var(--hex-card);
    border-top: 1px solid var(--hex-border);
    box-shadow: 0 -8px 20px rgba(16, 22, 35, 0.08);
  }

  .worker-selected-row {
    grid-template-columns: 52px minmax(0, 1fr) minmax(48px, auto);
    gap: 10px 12px;
    padding: 14px 2px;
  }

  .worker-selected-row .worker-selected-row__thumb {
    width: 52px !important;
    height: 52px !important;
  }

  .worker-selected-row__name {
    font-size: 14px;
    -webkit-line-clamp: 2;
  }

  .worker-selected-row__tags {
    font-size: 12px;
  }

  .worker-selected-row__price {
    font-size: 13px;
  }

  .worker-order-lines-wrap {
    margin: 6px 0 14px;
    padding: 6px 0 10px;
  }

  .worker-order-card__foot {
    padding-top: 16px;
  }

  .worker-row-edit {
    min-width: 96px;
  }

  .worker-order-qty-stepper {
    max-width: 96px;
    width: 96px;
  }

  .worker-selected-row .qty-stepper button,
  .worker-selected-row .qty-stepper input {
    min-height: 32px !important;
    height: 32px !important;
  }

  .worker-selected-row.is-editing {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .worker-selected-row.is-editing .worker-selected-row__qty {
    grid-column: 1 / -1;
    justify-self: stretch;
    width: 100%;
    max-width: none;
  }

  .picker-list {
    gap: 0;
    max-height: none;
    overflow: visible;
  }

  .picker-qty-stepper--compact {
    width: 118px;
    min-width: 118px;
    max-width: 118px;
    grid-template-columns: 36px minmax(40px, 1fr) 36px;
  }

  .picker-qty-stepper--compact .qty-stepper__btn {
    min-height: 36px !important;
    height: 36px !important;
  }

  .picker-qty-stepper--compact .qty-stepper__input,
  .worker-order-qty-stepper .qty-stepper__input {
    min-height: 36px !important;
    height: 36px !important;
    font-size: 15px !important;
  }

  .picker-layout {
    grid-template-columns: 1fr;
  }

  .picker-categories:not(.picker-categories--step1) {
    max-height: 140px;
  }

  .picker-categories--step1 {
    max-height: none !important;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }

  .picker-cat-btn--step1 {
    min-height: 48px;
    font-size: 13px;
  }

  .picker-search-tools {
    grid-template-columns: 1fr auto;
    gap: 7px;
  }

  .barcode-tools {
    grid-template-columns: 1fr 82px;
    gap: 7px;
  }

  .barcode-tools [data-picker-barcode] {
    grid-column: 1 / -1;
  }

  .barcode-tools button {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  .barcode-input-row {
    grid-template-columns: minmax(0, 1fr) 74px;
    gap: 7px;
  }

  .barcode-input-row--scan {
    grid-template-columns: minmax(0, 1fr) 64px 64px;
  }

  .barcode-input-row button {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  .barcode-scanner video {
    height: 160px;
  }

  .barcode-scanner-actions {
    padding: 8px;
    align-items: stretch;
    flex-direction: column;
  }

  .picker-status {
    padding: 8px 10px;
    font-size: 12px;
  }

  .picker-summary div {
    padding: 10px 8px;
  }

  .picker-summary p {
    font-size: 12px;
  }

  .picker-summary b {
    font-size: 1.05rem;
  }

  .picker-footer {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding-top: 0;
  }

  .qty-stepper:not(.picker-qty-stepper--sheet) {
    grid-template-columns: 36px 52px 36px;
    gap: 6px;
  }

  .qty-stepper:not(.picker-qty-stepper--sheet) button,
  .qty-stepper:not(.picker-qty-stepper--sheet) input {
    height: 44px;
    min-height: 44px;
    font-size: 16px !important;
  }

  .overflow-x-auto table:not(.allow-scroll-table) {
    min-width: 0;
    width: 100%;
  }

  .grid.grid-cols-3 {
    gap: 6px !important;
  }
}

.receipt-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: 8px;
  border: 1px solid
    color-mix(in srgb, var(--hex-primary) 42%, var(--hex-border));
  color: var(--hex-primary);
  background: color-mix(in srgb, var(--hex-primary-soft) 70%, var(--hex-card));
  line-height: 1;
}

.receipt-no--xs {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 6px;
}

.receipt-no--sm {
  font-size: 12px;
  padding: 3px 8px;
  min-width: 2.25rem;
}

.receipt-no--md {
  font-size: 14px;
  padding: 4px 10px;
  min-width: 2.5rem;
}

.receipt-no--lg {
  font-size: 1.1rem;
  padding: 5px 12px;
  border-radius: 9px;
}

/* Агуулах — баримтууд */
.wh-receipts {
  border-radius: 0;
  overflow: visible;
  background: transparent;
  border: none;
  border-top: 1px solid var(--hex-border);
  border-bottom: 1px solid var(--hex-border);
  min-width: 0;
  max-width: 100%;
}

.wh-receipts__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--hex-border);
  overflow: visible;
  position: relative;
  z-index: 5;
}

.wh-receipts__head-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.wh-receipts__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.wh-receipts__head-filters {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-shrink: 1;
  min-width: 0;
  justify-content: flex-end;
  overflow: visible;
  position: relative;
  z-index: 6;
}

.wh-receipt-field--picker {
  flex: 1 1 180px;
  max-width: min(46vw, 240px);
}

.wh-receipt-picker {
  position: relative;
  width: 100%;
  min-width: 0;
}

.wh-receipt-picker.is-open {
  z-index: 90;
}

.wh-receipt-picker__trigger {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  max-height: 46px;
  padding: 8px 12px;
  border: 1px solid var(--hex-border);
  border-radius: 12px;
  background: var(--hex-card);
  color: var(--hex-foreground);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.wh-receipt-picker.is-open .wh-receipt-picker__trigger,
.wh-receipt-picker__trigger:hover {
  border-color: color-mix(in srgb, var(--hex-primary) 35%, var(--hex-border));
}

.wh-receipt-picker.is-open .wh-receipt-picker__trigger {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--hex-primary) 12%, transparent);
}

.wh-receipt-picker__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--hex-primary-soft);
  color: var(--hex-primary);
  flex-shrink: 0;
}

.wh-receipt-picker__value {
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.wh-receipt-picker__value.is-placeholder {
  color: var(--hex-muted-foreground);
  font-weight: 600;
}

.wh-receipt-picker__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}

.wh-receipt-picker__chip {
  max-width: 100%;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--hex-secondary);
  color: var(--hex-foreground);
  font-size: 11px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wh-receipt-picker__chev {
  color: var(--hex-muted-foreground);
  transition: transform 0.18s ease;
}

.wh-receipt-picker.is-open .wh-receipt-picker__chev {
  transform: rotate(180deg);
}

.wh-receipt-picker__panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: auto;
  z-index: 80;
  min-width: 100%;
  width: min(92vw, 320px);
  border: 1px solid var(--hex-border);
  border-radius: 16px;
  background: var(--hex-card);
  box-shadow:
    0 18px 44px rgba(15, 23, 42, 0.16),
    0 2px 8px rgba(15, 23, 42, 0.06);
  overflow: hidden;
  animation: wh-receipt-picker-in 0.18s ease;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

@keyframes wh-receipt-picker-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wh-receipt-picker__panel--steady {
  animation: none !important;
}

.wh-receipt-picker__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 14px 10px;
}

.wh-receipt-picker__head-title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.wh-receipt-picker__clear {
  border: 0;
  background: transparent;
  color: var(--hex-primary);
  font-size: 12px;
  font-weight: 800;
  padding: 4px 2px;
  cursor: pointer;
}

.wh-receipt-picker__clear:hover {
  opacity: 0.82;
}

.wh-receipt-picker__list {
  display: grid;
  gap: 6px;
  max-height: min(52vh, 280px);
  overflow-y: auto;
  padding: 0 10px 10px;
  scrollbar-gutter: stable;
}

.wh-receipt-picker__item {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--hex-border) 88%, transparent);
  background: color-mix(in srgb, var(--hex-secondary) 74%, var(--hex-card));
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.wh-receipt-picker__item:hover {
  border-color: color-mix(in srgb, var(--hex-primary) 22%, var(--hex-border));
  background: color-mix(in srgb, var(--hex-secondary) 88%, var(--hex-card));
}

.wh-receipt-picker__item.is-active {
  background: color-mix(in srgb, var(--hex-primary) 11%, var(--hex-card));
  border-color: color-mix(in srgb, var(--hex-primary) 34%, var(--hex-border));
  box-shadow: 0 1px 0 rgba(22, 137, 154, 0.08);
}

.wh-receipt-picker__item input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin: 0;
  flex-shrink: 0;
  border: 2px solid
    color-mix(in srgb, var(--hex-muted-foreground) 32%, var(--hex-border));
  border-radius: 5px;
  background: var(--hex-card);
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}

.wh-receipt-picker__item input[type="checkbox"]:checked {
  border-color: var(--hex-primary);
  background-color: var(--hex-primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.5 8.2 6.4 11 12.5 5' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px 12px;
}

.wh-receipt-picker__avatar-wrap {
  display: inline-flex;
}

.wh-receipt-picker__avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
}

.wh-receipt-picker__meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.wh-receipt-picker__name {
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wh-receipt-picker__role {
  font-size: 11px;
  font-weight: 800;
  color: var(--hex-muted-foreground);
}

.wh-receipt-picker__role--admin {
  color: var(--hex-primary);
}

.wh-receipt-picker__empty {
  margin: 0;
  padding: 18px 12px;
  text-align: center;
  color: var(--hex-muted-foreground);
  font-size: 13px;
}

.wh-receipt-picker__foot {
  padding: 10px 12px 12px;
  border-top: 1px solid var(--hex-border);
  background: linear-gradient(to top, var(--hex-card) 88%, transparent);
}

.wh-receipt-picker__foot .btn {
  min-height: 42px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.wh-receipt-field {
  display: grid;
  gap: 4px;
  flex: 1 1 160px;
  min-width: min(100%, 160px);
  max-width: min(42vw, 200px);
}

.wh-receipt-field__label {
  font-size: 11px;
  font-weight: 700;
  color: var(--hex-muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.wh-receipt-field__control {
  position: relative;
  display: block;
}

.wh-receipt-field__icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--hex-primary);
  pointer-events: none;
}

.wh-receipt-field__chev {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--hex-muted-foreground);
  pointer-events: none;
}

.wh-receipt-field__select {
  width: 100%;
  min-height: 46px;
  padding: 8px 34px 8px 36px;
  border-radius: 12px;
  border: 1px solid var(--hex-border);
  background: var(--hex-card);
  font-size: 13px;
  font-weight: 700;
  appearance: none;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.wh-receipt-field__select:focus {
  border-color: color-mix(in srgb, var(--hex-primary) 35%, var(--hex-border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--hex-primary) 12%, transparent);
  outline: none;
}

.wh-receipt-field__hint {
  font-size: 11px;
  font-weight: 600;
  color: var(--hex-muted-foreground);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wh-receipts__head-aside {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.wh-receipts__export {
  flex-shrink: 0;
}

.wh-receipts__print {
  flex-shrink: 0;
}

.wh-receipts__worker-select {
  font-weight: 700;
}

.wh-receipts__total {
  font-size: 14px;
  font-weight: 800;
  color: var(--hex-primary);
  font-variant-numeric: tabular-nums;
}

.wh-receipts__filters {
  display: block;
  padding: 10px 14px;
  border-bottom: 1px solid var(--hex-border);
}

.receipt-people-filters {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.receipt-filter-group {
  display: grid;
  gap: 6px;
  padding: 8px;
  border-radius: 8px;
  background: var(--hex-secondary);
}

.receipt-filter-group__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--hex-muted-foreground);
  font-size: 12px;
  font-weight: 700;
}

.receipt-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.receipt-filter-chip {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--hex-border);
  border-radius: 8px;
  background: var(--hex-card);
  color: var(--hex-foreground);
  font-size: 13px;
  font-weight: 700;
}

.receipt-filter-chip.is-active {
  border-color: var(--hex-primary);
  background: var(--hex-primary);
  color: var(--hex-primary-foreground);
}

.receipt-filter-clear {
  border: 0;
  background: transparent;
  color: var(--hex-primary);
  font-size: 12px;
  font-weight: 800;
}

.receipt-filter-clear--all {
  align-self: flex-end;
}

.wh-date-filters {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.wh-worker-chooser {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 10px 12px;
  border: 1px solid
    color-mix(in srgb, var(--hex-primary) 28%, var(--hex-border));
  border-radius: 12px;
  background: var(--hex-card);
  color: var(--hex-foreground);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
  -webkit-tap-highlight-color: transparent;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

.wh-worker-chooser:hover,
.wh-worker-chooser:focus-visible {
  border-color: color-mix(in srgb, var(--hex-primary) 45%, var(--hex-border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--hex-primary) 12%, transparent);
  outline: none;
}

.wh-worker-chooser:active {
  background: color-mix(in srgb, var(--hex-primary-soft) 35%, var(--hex-card));
}

.wh-worker-chooser--static {
  cursor: default;
  border-color: var(--hex-border);
  background: var(--hex-secondary);
  box-shadow: none;
}

.wh-worker-chooser--static:hover,
.wh-worker-chooser--static:focus-visible,
.wh-worker-chooser--static:active {
  border-color: var(--hex-border);
  box-shadow: none;
  background: var(--hex-secondary);
}

.wh-worker-chooser__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--hex-primary-soft);
  color: var(--hex-primary);
  flex-shrink: 0;
}

.wh-worker-chooser__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}

.wh-worker-chooser__label {
  font-size: 11px;
  font-weight: 700;
  color: var(--hex-muted-foreground);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.wh-worker-chooser__value {
  width: 100%;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--hex-foreground);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wh-worker-chooser__value.is-placeholder {
  color: var(--hex-primary);
  font-weight: 700;
}

.wh-worker-chooser__chev {
  flex-shrink: 0;
  color: var(--hex-primary);
}

.wh-date-filters__live {
  min-height: var(--field-h);
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--hex-border);
  background: var(--hex-secondary);
  font-size: 13px;
  font-weight: 600;
  color: var(--hex-foreground);
  white-space: nowrap;
}

.wh-date-filters__live.is-active {
  background: var(--hex-primary);
  border-color: var(--hex-primary);
  color: var(--hex-primary-foreground);
}

.wh-date-filters__date {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: var(--field-h);
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--hex-border);
  background: var(--hex-card);
  font-size: 14px;
  font-weight: 700;
  width: 100%;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.wh-date-filters__native {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
  background: transparent;
  color: transparent;
  -webkit-appearance: none;
  appearance: none;
}

.wh-date-filters__native::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  cursor: pointer;
  opacity: 0;
}

.wh-date-filters__date:hover {
  border-color: color-mix(in srgb, var(--hex-primary) 35%, var(--hex-border));
}

.wh-date-filters__date-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wh-date-filters__date-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--hex-muted-foreground);
}

.wh-date-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--hex-primary) 10%, var(--hex-card));
  border: 1px solid
    color-mix(in srgb, var(--hex-primary) 24%, var(--hex-border));
  font-size: 12px;
  line-height: 1.4;
  color: var(--hex-foreground);
}

.wh-date-banner strong {
  font-weight: 700;
}

.data-save-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 12px;
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff4e5;
  border: 1px solid #f0c36d;
  color: #7a4d00;
}

.data-save-banner__copy strong {
  display: block;
  font-size: 13px;
  margin-bottom: 2px;
}

.data-save-banner__copy p {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
}

.wh-date-modal__desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--hex-muted-foreground);
}

.wh-date-modal__field {
  display: grid;
  gap: 6px;
}

.wh-date-modal__label {
  font-size: 12px;
  font-weight: 700;
  color: var(--hex-muted-foreground);
}

.wh-date-modal__input {
  width: 100%;
  min-height: var(--field-h);
  font-size: 16px;
}

.wh-date-modal__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding-top: 4px;
}

.wh-receipts__filter {
  min-height: var(--field-h);
  font-size: 14px;
  width: 100%;
  min-width: 8.5rem;
}

.wh-receipts__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  max-width: 100%;
}

.wh-receipt-list {
  display: flex;
  flex-direction: column;
  max-height: min(36vh, 280px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-bottom: 1px solid var(--hex-border);
  min-width: 0;
  max-width: 100%;
}

.wh-receipt-list__bulk {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--hex-border);
  background: var(--hex-secondary, #f4f4f5);
  position: sticky;
  top: 0;
  z-index: 1;
  flex-wrap: wrap;
}

.wh-receipt-list__bulk-count {
  font-size: 12px;
  color: var(--hex-muted-foreground, #64748b);
  margin-right: auto;
}

.wh-receipt-list__bulk-btn {
  border: none;
  background: transparent;
  color: var(--hex-primary, #0f7a3f);
  font-size: 12px;
  font-weight: 600;
  padding: 2px 4px;
  cursor: pointer;
}

.wh-receipt-list__bulk-btn:hover {
  text-decoration: underline;
}

.wh-receipt-list__item--selectable {
  grid-template-columns: auto minmax(0, 1fr);
}

.wh-receipt-list__check {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.wh-receipt-list__check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--hex-primary);
  cursor: pointer;
}

.wh-receipt-list__body-btn {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
}

.wh-receipt-list__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 11px 14px;
  border: none;
  border-bottom: 1px solid var(--hex-border);
  background: var(--hex-card);
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.wh-receipt-list__item:last-child {
  border-bottom: none;
}

.wh-receipt-list__item.is-active {
  background: var(--hex-primary-soft);
  box-shadow: inset 3px 0 0 var(--hex-primary);
}

.wh-receipt-list__body {
  min-width: 0;
}

.wh-receipt-list__name {
  display: block;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wh-receipt-list__meta {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--hex-muted-foreground);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wh-receipt-list__empty {
  margin: 0;
  padding: 24px 14px;
  text-align: center;
  font-size: 14px;
  color: var(--hex-muted-foreground);
}

.wh-receipt-detail-wrap {
  min-width: 0;
}

.wh-receipt-detail {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wh-receipt-detail--empty {
  align-items: center;
  justify-content: center;
  min-height: 160px;
  color: var(--hex-muted-foreground);
  font-size: 14px;
}

.wh-receipt-detail__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.wh-receipt-detail__lead {
  min-width: 0;
}

.wh-receipt-detail__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25;
}

.wh-receipt-detail__sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--hex-muted-foreground);
  line-height: 1.35;
}

.wh-receipt-detail__total {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--hex-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  flex-shrink: 0;
}

.wh-receipt-sheet {
  gap: 14px;
  font-family: "Roboto", Arial, sans-serif;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--hex-primary-soft) 28%, var(--hex-card)) 0%,
    var(--hex-card) 120px
  );
  border: 1px solid var(--hex-border);
  border-radius: 14px;
}

.wh-receipt-sheet__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.wh-receipt-sheet__brand > div {
  min-width: 0;
  flex: 1 1 auto;
}

.wh-receipt-sheet__logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}

.wh-receipt-sheet__company {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}

.wh-receipt-sheet__doc {
  margin: 2px 0 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--hex-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wh-receipt-sheet__brand .wh-receipt-detail__pill {
  margin-left: auto;
}

.wh-receipt-sheet__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
  padding: 12px;
  border-radius: 10px;
  background: var(--hex-secondary);
}

.wh-receipt-sheet__col p {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.35;
}

.wh-receipt-sheet__col p:last-child {
  margin-bottom: 0;
}

.wh-receipt-sheet__col span {
  display: block;
  color: var(--hex-muted-foreground);
  font-size: 11px;
  margin-bottom: 2px;
}

.wh-receipt-sheet__col b {
  font-weight: 600;
}

.wh-receipt-sheet__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: fixed;
}

.wh-receipt-sheet__table td.wh-receipt-sheet__name {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.wh-receipt-sheet__table th,
.wh-receipt-sheet__table td {
  padding: 8px 6px;
  border-bottom: 1px solid var(--hex-border);
  text-align: left;
}

.wh-receipt-sheet__table th {
  font-size: 11px;
  font-weight: 700;
  color: var(--hex-muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.wh-receipt-sheet__table th:last-child,
.wh-receipt-sheet__table td.wh-receipt-sheet__sum {
  text-align: right;
}

.wh-receipt-sheet__table th:nth-child(2),
.wh-receipt-sheet__table td.wh-receipt-sheet__qty {
  text-align: center;
  width: 64px;
}

.wh-receipt-sheet__product {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.wh-receipt-sheet__product-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.wh-receipt-sheet__item-img {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  object-fit: contain;
  object-position: center;
  border-radius: 0;
  border: 1px solid var(--hex-border);
  background: #fff;
  padding: 4px;
  box-sizing: border-box;
}

.wh-receipt-sheet__item-name {
  display: block;
  font-weight: 700;
  line-height: 1.35;
}

.wh-receipt-sheet__item-detail,
.wh-receipt-sheet__item-qty-label,
.wh-receipt-sheet__item-sum-label {
  display: none;
}

.wh-receipt-sheet__item-qty-value,
.wh-receipt-sheet__item-sum-value {
  display: inline;
}

.wh-receipt-sheet__products {
  min-width: 0;
}

.wh-receipt-sheet__row--promo {
  border-left: 4px solid var(--hex-success);
  background: color-mix(in srgb, var(--hex-success) 14%, #ffffff);
  color: color-mix(in srgb, var(--hex-success) 72%, #182032);
  font-weight: 700;
}

.wh-receipt-sheet__promo-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
  background: var(--hex-success);
}

.wh-receipt-sheet__totals {
  padding: 12px;
  border-radius: 10px;
  background: var(--hex-secondary);
}

.wh-receipt-sheet__totals .receipt-gross-note {
  margin: 8px 0 4px;
  border-radius: 8px;
  font-size: 12px;
}

.wh-receipt-sheet__total-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  margin-bottom: 6px;
}

.wh-receipt-sheet__total-line:last-of-type {
  margin-bottom: 0;
}

.wh-receipt-sheet__total-line--discount b {
  color: var(--hex-danger);
}

.wh-receipt-sheet__total-line--pay {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--hex-border);
  font-size: 15px;
  font-weight: 800;
}

.wh-receipt-sheet__total-line--pay b {
  color: var(--hex-primary);
}

.wh-receipt-sheet__pay-term {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--hex-muted-foreground);
  text-align: right;
}

.wh-receipt-detail__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.wh-receipt-detail__pill {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
}

.wh-receipt-detail__btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
  align-items: center;
}

.wh-receipt-detail__status {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-right: auto;
}

.wh-receipt-detail__items {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--hex-border);
}

.wh-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px 84px;
  gap: 8px;
  align-items: center;
  padding: 10px 0;
  font-size: 14px;
  border-bottom: 1px solid
    color-mix(in srgb, var(--hex-border) 65%, transparent);
}

.wh-line:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.wh-line__name {
  font-weight: 600;
  line-height: 1.3;
}

.wh-line__qty,
.wh-line__sum {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.wh-line__qty {
  font-size: 13px;
  color: var(--hex-muted-foreground);
}

.wh-line__sum {
  font-weight: 700;
  color: var(--hex-foreground);
}

@media (min-width: 1024px) {
  .wh-receipts__layout {
    grid-template-columns: 248px minmax(0, 1fr);
  }

  .wh-receipt-list {
    max-height: min(64vh, 520px);
    border-bottom: none;
    border-right: 1px solid var(--hex-border);
  }
}

@media (max-width: 1023px) {
  .app-shell--bottom-nav .wh-receipts__title {
    display: none;
  }

  .wh-receipts__head {
    flex-wrap: wrap;
  }

  .wh-receipts__head-filters {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    overflow: visible;
  }

  .wh-receipt-picker,
  .wh-receipt-field,
  .wh-receipt-field--picker {
    max-width: none;
    min-width: 0;
    width: 100%;
    flex: 1 1 auto;
    overflow: visible;
    position: relative;
    z-index: 7;
  }

  .wh-receipt-picker.is-open {
    z-index: 90;
  }

  /* Keep the open list in document flow so it does not cover the next filter
     (Түгээгч label/trigger was sitting on top of ХТ picker panel). */
  .wh-receipt-picker.is-open .wh-receipt-picker__panel {
    position: static;
    left: auto;
    right: auto;
    width: 100%;
    max-height: min(50vh, 360px);
    margin-top: 6px;
    z-index: auto;
    -webkit-transform: none;
    transform: none;
    animation: none;
  }

  .wh-receipt-field--picker + .wh-receipt-field--picker {
    margin-top: 4px;
  }

  .wh-receipt-picker__panel {
    left: 0;
    right: 0;
    width: auto;
    max-height: min(70vh, 420px);
    z-index: 100;
  }

  .wh-receipt-list {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0;
    max-height: min(36vh, 280px);
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .wh-receipt-list__item {
    flex: none;
    width: 100%;
    max-width: 100%;
    padding: 11px 14px;
    border: none;
    border-bottom: 1px solid var(--hex-border);
    border-radius: 0;
    box-shadow: none;
  }

  .wh-receipt-list__item--selectable {
    width: 100%;
    max-width: 100%;
  }

  .wh-receipt-list__item.is-active {
    border-color: var(--hex-border);
    box-shadow: inset 3px 0 0 var(--hex-primary);
  }

  .wh-receipt-list__name {
    font-size: 13px;
  }
}

@media (max-width: 640px) {
  .wh-receipt-detail__btns {
    width: 100%;
    margin-left: 0;
  }

  .wh-receipt-detail__btns .btn {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
  }

  /* Golden-ratio product cards on phone (φ ≈ 1.618) */
  .wh-receipt-sheet {
    gap: 13px;
    padding: 13px;
    border-radius: 13px;
  }

  .wh-receipt-sheet__logo {
    width: 42px;
    height: 42px;
  }

  .wh-receipt-sheet__company {
    font-size: 14px;
  }

  .wh-receipt-sheet__meta {
    grid-template-columns: 1fr;
    gap: 13px;
    padding: 13px;
    border-radius: 13px;
  }

  .wh-receipt-sheet__table--golden thead {
    display: none;
  }

  .wh-receipt-sheet__table--golden tbody {
    display: flex;
    flex-direction: column;
    gap: 13px;
  }

  .wh-receipt-sheet__table--golden tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 0.618fr;
    gap: 8px 13px;
    padding: 13px;
    border-radius: 13px;
    background: color-mix(
      in srgb,
      var(--hex-card) 94%,
      var(--hex-primary-soft)
    );
    box-shadow: inset 0 0 0 1px
      color-mix(in srgb, var(--hex-border) 88%, transparent);
  }

  .wh-receipt-sheet__table--golden td {
    border: none;
    padding: 0;
  }

  .wh-receipt-sheet__name {
    grid-column: 1 / -1;
    min-width: 0;
  }

  .wh-receipt-sheet__product {
    gap: 13px;
  }

  .wh-receipt-sheet__item-img {
    width: 89px;
    height: 89px;
    padding: 5px;
  }

  .wh-receipt-sheet__item-name {
    font-size: 14px;
  }

  .wh-receipt-sheet__item-detail {
    display: block;
    font-size: 11px;
    line-height: 1.45;
    color: var(--hex-muted-foreground);
  }

  .wh-receipt-sheet__qty,
  .wh-receipt-sheet__sum {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: auto;
  }

  .wh-receipt-sheet__qty {
    grid-column: 1;
    text-align: left;
    align-self: end;
  }

  .wh-receipt-sheet__sum {
    grid-column: 2;
    text-align: right;
    align-items: flex-end;
    align-self: end;
  }

  .wh-receipt-sheet__item-qty-label,
  .wh-receipt-sheet__item-sum-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--hex-muted-foreground);
  }

  .wh-receipt-sheet__item-qty-value {
    font-size: 13px;
    font-weight: 600;
  }

  .wh-receipt-sheet__item-sum-value {
    font-size: 15px;
    font-weight: 800;
    color: var(--hex-primary);
  }

  .wh-receipt-sheet__row--promo {
    border-left: none;
    box-shadow:
      inset 4px 0 0 var(--hex-success),
      inset 0 0 0 1px color-mix(in srgb, var(--hex-border) 88%, transparent);
  }

  .wh-receipt-sheet__totals {
    padding: 13px;
    border-radius: 13px;
  }

  .wh-receipt-sheet__total-line--pay {
    font-size: 16px;
  }
}

.customer-province-select {
  min-height: var(--field-h);
  cursor: pointer;
  font-weight: 600;
}

.province-picker-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.province-picker-btn {
  padding: 12px 10px;
  border-radius: 10px;
  background: var(--hex-secondary);
  color: var(--hex-foreground);
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  transition: background 0.15s ease;
}

.province-picker-btn:hover {
  background: color-mix(in srgb, var(--hex-secondary) 75%, var(--hex-border));
}

.province-picker-btn.is-active {
  background: #16899a;
  color: #fff;
}

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

.delivery-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.delivery-field__label {
  font-size: 13px;
  font-weight: 700;
  color: var(--hex-muted-foreground);
  letter-spacing: 0.02em;
}

.delivery-field__trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--hex-border);
  background: var(--hex-card);
  color: var(--hex-foreground);
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.delivery-field__trigger:hover,
.delivery-field__trigger:focus-visible {
  border-color: #16899a;
  box-shadow: 0 0 0 3px rgba(22, 137, 154, 0.18);
  outline: none;
}

.delivery-field__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(22, 137, 154, 0.12);
  color: var(--hex-primary);
  box-shadow: none;
}

.delivery-field__icon .ui-icon {
  width: 20px;
  height: 20px;
}

.delivery-field__avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #16899a;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.delivery-field__trigger:not(.delivery-field__trigger--empty)
  .delivery-field__icon {
  display: none;
}

.delivery-field__trigger--empty .delivery-field__avatar {
  background: var(--hex-secondary);
  color: var(--hex-muted-foreground);
}

.delivery-field__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.delivery-field__value {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--hex-foreground);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delivery-field__value--empty {
  color: var(--hex-muted-foreground);
  font-weight: 600;
}

.delivery-field__hint {
  font-size: 12px;
  line-height: 1.3;
  color: var(--hex-muted-foreground);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delivery-field__chevron {
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  margin-right: 4px;
  border-right: 2px solid var(--hex-muted-foreground);
  border-bottom: 2px solid var(--hex-muted-foreground);
  transform: rotate(-45deg);
  opacity: 0.65;
}

.delivery-picker {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.delivery-picker__desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--hex-muted-foreground);
}

.delivery-picker__search-wrap {
  position: relative;
}

.delivery-picker__search {
  width: 100%;
  padding: 12px 14px 12px 40px !important;
  border-radius: 10px;
  border: 1.5px solid var(--hex-border);
  background: var(--hex-secondary);
}

.delivery-picker__search:focus {
  border-color: #16899a;
  outline: none;
  box-shadow: 0 0 0 3px rgba(22, 137, 154, 0.18);
}

.delivery-picker__search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--hex-muted-foreground);
  pointer-events: none;
}

.delivery-picker-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: min(52vh, 360px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.delivery-picker-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid transparent;
  background: var(--hex-secondary);
  color: var(--hex-foreground);
  text-align: left;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}

.delivery-picker-option:hover,
.delivery-picker-option:focus-visible {
  border-color: rgba(22, 137, 154, 0.45);
  outline: none;
}

.delivery-picker-option.is-active {
  background: #16899a;
  color: #fff;
  border-color: #16899a;
}

.delivery-picker-option__avatar {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(22, 137, 154, 0.15);
  color: #16899a;
  font-size: 18px;
  font-weight: 800;
  display: grid;
  place-items: center;
  box-shadow: var(--thumb-shadow);
}

.delivery-picker-option.is-active .delivery-picker-option__avatar {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.delivery-picker-option__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.delivery-picker-option__name {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  color: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delivery-picker-option__phone {
  font-size: 13px;
  color: var(--hex-muted-foreground);
  line-height: 1.3;
}

.delivery-picker-option.is-active .delivery-picker-option__phone {
  color: rgba(255, 255, 255, 0.92);
}

.delivery-picker-option__check {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid
    color-mix(in srgb, var(--hex-muted-foreground) 45%, transparent);
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}

.delivery-picker-option.is-active .delivery-picker-option__check {
  border-color: #fff;
  background: #fff;
  color: #16899a;
}

.delivery-picker-empty {
  margin: 0;
  padding: 20px 12px;
  text-align: center;
  font-size: 14px;
  color: var(--hex-muted-foreground);
}

.delivery-picker-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 28px 16px;
  text-align: center;
  border-radius: 12px;
  background: color-mix(in srgb, var(--hex-secondary) 55%, transparent);
  color: var(--hex-foreground);
}

.delivery-picker-empty-state__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--hex-primary);
  line-height: 1;
}

.delivery-picker-empty-state__title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.delivery-picker-empty-state__text {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--hex-muted-foreground);
}

.delivery-picker-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding-top: 4px;
}

.delivery-picker-footer__btn {
  min-height: var(--btn-h-md);
  padding: 0 14px;
  border-radius: var(--btn-radius);
  font-size: 14px;
  font-weight: 600;
}

.delivery-picker-footer__btn--secondary {
  background: var(--hex-secondary);
  color: var(--hex-foreground);
}

.delivery-picker-footer__btn--primary {
  background: var(--hex-primary);
  color: var(--hex-primary-foreground);
}

.delivery-picker-footer__btn--primary:active:not(:disabled) {
  background: #0d5f6c;
}

.delivery-picker-footer__btn--secondary:active:not(:disabled) {
  background: color-mix(
    in srgb,
    var(--hex-foreground) 10%,
    var(--hex-secondary)
  );
}

@media (min-width: 480px) {
  .province-picker-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

#print-root {
  position: fixed;
  left: -10000px;
  top: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  pointer-events: none;
}

@media print {
  /* Page size/fonts for ЗАРЛАГЫН БАРИМТ come from RECEIPT_EXCEL_STYLES (A4).
     Keep only print-root chrome here — do not override .receipt-page / logo / title. */
  @page {
    size: A4 portrait;
    /* Match RECEIPT_EXCEL_STYLES / Excel download */
    margin: 18mm 8mm 12mm 18mm;
  }
  html.thermal-receipt-print @page {
    size: 58mm auto;
    margin: 2mm;
  }
  html.receipt-a4-print @page {
    size: A4 portrait;
    margin: 18mm 8mm 12mm 18mm;
  }
  html.receipt-a4-print {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    color: #000;
    background: #fff;
  }
  /* Excel-layout print: undo legacy print grids without wiping RECEIPT_EXCEL_STYLES. */
  html.receipt-a4-print .receipt-header {
    display: block;
    grid-template-columns: none;
    gap: 0;
    margin-bottom: 0;
  }
  html.receipt-a4-print .receipt-info {
    display: block !important;
    grid-template-columns: none !important;
    gap: 0 !important;
    margin-bottom: 0 !important;
  }
  html.receipt-a4-print .receipt-info p {
    display: block;
    grid-template-columns: none;
    gap: 0;
    margin: 0;
  }
  body > *:not(#print-root) {
    display: none !important;
  }
  #print-root {
    display: block !important;
    position: static !important;
    left: auto !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
    pointer-events: auto !important;
  }
  .print-receipt,
  .receipt-excel-sheet {
    display: block !important;
    background: white;
    color: black;
  }
  .print-receipt + .print-receipt,
  .receipt-excel-sheet + .receipt-excel-sheet {
    page-break-before: always;
    break-before: page;
  }
  /* Legacy markup only (old .receipt-header / .receipt-info layout). */
  .receipt-header {
    display: grid;
    grid-template-columns: 18mm 1fr;
    gap: 2.5mm;
    align-items: start;
    justify-items: end;
    margin-bottom: 2mm;
  }
  .receipt-header .receipt-company {
    justify-self: start;
  }
  .receipt-company h1 {
    font-size: 12px;
    margin: 0 0 1mm;
    font-weight: 800;
  }
  .receipt-company p {
    margin: 0.3mm 0;
    font-size: 8px;
  }
  .receipt-info {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 16mm;
    margin-bottom: 4mm;
  }
  .receipt-info p {
    display: grid;
    grid-template-columns: 38mm 1fr;
    gap: 3mm;
    margin: 1.2mm 0;
  }
  .receipt-info b {
    font-weight: 800;
  }
  .receipt-info span {
    color: #444;
  }
  .receipt-address {
    align-items: start;
  }
  .receipt-check {
    font-size: 13px;
  }
  .receipt-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
    table-layout: fixed;
  }
  .receipt-table thead {
    display: table-header-group;
  }
  .receipt-table tbody {
    display: table-row-group;
  }
  .receipt-table tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .receipt-table th,
  .receipt-table td {
    border: 1px solid #777;
    padding: 1.15mm 1mm;
    text-align: left;
    vertical-align: middle;
  }
  .receipt-table th {
    font-weight: 800;
    text-align: center;
    background: #f3f3f3;
  }
  .receipt-footer-block {
    break-inside: avoid;
    page-break-inside: avoid;
    -webkit-region-break-inside: avoid;
  }
  .receipt-table th:nth-child(1),
  .receipt-table td:nth-child(1) {
    width: 7mm;
    text-align: right;
  }
  .receipt-table th:nth-child(2),
  .receipt-table td:nth-child(2) {
    width: 66mm;
  }
  .receipt-table th:nth-child(3),
  .receipt-table td:nth-child(3) {
    width: 24mm;
  }
  .receipt-table th:nth-child(4),
  .receipt-table td:nth-child(4) {
    width: 32mm;
  }
  .receipt-table th:nth-child(n + 5),
  .receipt-table td:nth-child(n + 5) {
    text-align: right;
  }
  .receipt-gross-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 4mm;
    background: #e8ebee;
    padding: 2.2mm 3mm;
    font-weight: 800;
    margin-bottom: 2mm;
  }
  .receipt-gross-bar strong {
    font-size: 15px;
    white-space: nowrap;
  }
  .receipt-gross-note {
    background: #fff2cc;
    color: #7a5b00;
    text-align: center;
    padding: 2.5mm 3mm;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
    margin: 2mm 0 3mm;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .receipt-settlement-note {
    background: #fff2cc;
    text-align: center;
    padding: 2.5mm 3mm;
    font-weight: 700;
    margin-bottom: 3mm;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .receipt-promo-block {
    margin-bottom: 3mm;
    padding: 1.5mm 2mm;
    border: 1px solid #777;
    background: #fff;
    color: #111;
    font-size: 11px;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .receipt-promo-head,
  .receipt-promo-row {
    display: grid;
    grid-template-columns: 1fr 28mm 24mm;
    gap: 2mm;
    align-items: center;
    padding: 1mm 0;
  }
  .receipt-promo-head {
    font-weight: 800;
    color: #111;
  }
  .receipt-promo-head b {
    font-size: 15px;
    line-height: 1.1;
  }
  .receipt-promo-row strong {
    text-align: right;
    font-weight: 800;
  }
  .receipt-totals {
    margin-top: 2mm;
  }
  .receipt-total-line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 4mm;
    padding: 1.2mm 0;
    font-size: 12px;
  }
  .receipt-total-line strong {
    font-weight: 800;
    white-space: nowrap;
  }
  .receipt-grand-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 5mm;
    background: #eef0f2;
    color: #111827;
    padding: 3.5mm 4mm;
    margin-top: 2mm;
    font-weight: 800;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .receipt-grand-total__label {
    flex: 1;
    font-size: 12px;
    line-height: 1.35;
  }
  .receipt-grand-total__amount {
    font-size: 24px;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
  }
  .receipt-warning {
    background: #edf0f2;
    text-align: center;
    padding: 3mm 5mm;
    margin: 5mm 0;
    font-size: 10.5px;
  }
  .receipt-warning p {
    margin: 1mm 0;
  }
  .receipt-sign {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4mm;
    margin-top: 5mm;
    font-size: 12px;
  }
  .receipt-sign p {
    display: grid;
    grid-template-columns: 62mm 1fr;
    gap: 3mm;
    margin: 0;
  }
  .receipt-sign b {
    min-height: 6mm;
    display: block;
  }
  .employee-report-page {
    width: 190mm;
    min-height: 277mm;
    margin: 0 auto;
    padding: 12mm 10mm;
    font-family: Arial, sans-serif;
    color: #111827;
    background: #fff;
    font-size: 11px;
  }
  .employee-report-header {
    display: grid;
    grid-template-columns: 1fr 32mm;
    align-items: start;
    gap: 8mm;
    border-bottom: 2px solid #111827;
    padding-bottom: 5mm;
    margin-bottom: 5mm;
  }
  .employee-report-brand {
    margin: 0 0 2mm;
    color: #16899a;
    font-weight: 800;
    font-size: 12px;
  }
  .employee-report-header h2 {
    margin: 0;
    font-size: 20px;
    line-height: 1.15;
    text-transform: uppercase;
  }
  .employee-report-date {
    text-align: right;
    font-size: 10px;
  }
  .employee-report-date span {
    display: block;
    color: #6b7280;
    margin-bottom: 1mm;
  }
  .employee-report-date b {
    font-size: 12px;
  }
  .employee-report-meta {
    display: grid;
    grid-template-columns: 1.5fr 28mm 32mm 32mm;
    gap: 2mm;
    margin-bottom: 5mm;
  }
  .employee-report-meta p {
    margin: 0;
    border: 1px solid #d1d5db;
    padding: 2.2mm;
    min-height: 12mm;
  }
  .employee-report-meta span {
    display: block;
    color: #6b7280;
    font-size: 9px;
    margin-bottom: 1mm;
  }
  .employee-report-meta b {
    font-size: 12px;
  }
  .employee-report-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
  }
  .employee-report-table th,
  .employee-report-table td {
    border: 1px solid #c8cdd5;
    padding: 1.8mm 1.5mm;
    vertical-align: middle;
  }
  .employee-report-table th {
    background: #eef2f5;
    color: #111827;
    font-weight: 800;
    text-align: left;
  }
  .employee-report-table th:nth-child(1),
  .employee-report-table td:nth-child(1) {
    width: 8mm;
    text-align: right;
  }
  .employee-report-table th:nth-child(2),
  .employee-report-table td:nth-child(2) {
    width: 21mm;
    text-align: center;
  }
  .employee-report-table th:nth-child(3),
  .employee-report-table td:nth-child(3) {
    width: auto;
  }
  .employee-report-table th:nth-child(4),
  .employee-report-table td:nth-child(4) {
    width: 28mm;
  }
  .employee-report-table th:nth-child(5),
  .employee-report-table td:nth-child(5) {
    width: 20mm;
    text-align: right;
    font-weight: 800;
  }
  .employee-report-table th:nth-child(6),
  .employee-report-table td:nth-child(6) {
    width: 28mm;
    text-align: right;
    font-weight: 800;
  }
  .employee-report-table small {
    display: block;
    color: #6b7280;
    font-size: 9px;
    margin-top: 0.8mm;
    font-weight: 400;
  }
  .employee-report-table tfoot td {
    background: #e8f4f6;
    font-weight: 900;
  }
  .employee-report-img {
    width: 16mm;
    height: 16mm;
    object-fit: cover;
    display: block;
    margin: 0 auto;
    border: 1px solid #d1d5db;
  }
  .employee-report-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8mm;
    margin-top: 10mm;
    font-size: 11px;
  }
  .employee-report-footer p {
    margin: 0;
  }
}

/* ——— Line UI: metrics, menus, lists ——— */
.metrics-bar {
  display: flex;
  align-items: stretch;
  border-top: 1px solid var(--hex-border);
  border-bottom: 1px solid var(--hex-border);
}

.metrics-bar--2 .metrics-bar__item {
  flex: 1;
}

.metrics-bar--3 .metrics-bar__item {
  flex: 1;
}

.metrics-bar--4 .metrics-bar__item {
  flex: 1;
}

.metrics-bar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 10px 8px;
  min-width: 0;
  text-align: center;
  position: relative;
}

.metrics-bar__item--notify {
  padding-top: 8px;
}

.metrics-bar__notify {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: var(--hex-muted-foreground);
  flex-shrink: 0;
}

.metrics-bar__notify-icon {
  width: 18px;
  height: 18px;
}

.metrics-bar__notify--active {
  color: var(--hex-primary);
}

.metrics-bar__notify--active::after {
  content: "";
  position: absolute;
  top: 1px;
  right: 0;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--hex-danger);
  border: 1.5px solid var(--hex-card);
}

.metrics-bar__item + .metrics-bar__item {
  border-left: 1px solid var(--hex-border);
}

.metrics-bar__label {
  font-size: 11px;
  font-weight: 600;
  color: var(--hex-muted-foreground);
  line-height: 1.2;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metrics-bar__value {
  max-width: 100%;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  letter-spacing: -0.01em;
}

.metrics-bar__sub {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
}

/* 4 багана: мөнгөн дүн урт үед давхцахгүй — доош мөрлөхгүй */
.metrics-bar--4 .metrics-bar__item {
  flex: 1 1 0;
  min-width: 0;
  padding: 10px 3px;
  overflow: hidden;
}

.metrics-bar--4 .metrics-bar__item:nth-child(1),
.metrics-bar--4 .metrics-bar__item:nth-child(2) {
  flex: 1.4 1 0;
}

.metrics-bar--4 .metrics-bar__item:nth-child(3),
.metrics-bar--4 .metrics-bar__item:nth-child(4) {
  flex: 0.7 1 0;
}

.metrics-bar--4 .metrics-bar__label {
  font-size: 10px;
}

.metrics-bar--4 .metrics-bar__value {
  font-size: clamp(0.62rem, 2.45vw, 0.92rem);
  letter-spacing: -0.03em;
}

.metrics-bar--equal.metrics-bar--4 .metrics-bar__item,
.metrics-bar--equal.metrics-bar--4 .metrics-bar__item:nth-child(1),
.metrics-bar--equal.metrics-bar--4 .metrics-bar__item:nth-child(2),
.metrics-bar--equal.metrics-bar--4 .metrics-bar__item:nth-child(3),
.metrics-bar--equal.metrics-bar--4 .metrics-bar__item:nth-child(4) {
  flex: 1 1 0;
}

.metrics-bar--3 .metrics-bar__item {
  min-width: 0;
  overflow: hidden;
  padding-left: 4px;
  padding-right: 4px;
}

.metrics-bar--3 .metrics-bar__value {
  font-size: clamp(0.72rem, 2.7vw, 1.05rem);
  letter-spacing: -0.02em;
}

@media (max-width: 380px) {
  .metrics-bar--4 .metrics-bar__value {
    font-size: clamp(0.55rem, 2.2vw, 0.78rem);
  }

  .metrics-bar--4 .metrics-bar__item {
    padding-left: 2px;
    padding-right: 2px;
  }
}

.metrics-bar--count {
  background: #e8f3f7;
  border: 2px solid #b8d9e4;
  border-radius: 0;
}

.metrics-bar--count .metrics-bar__item {
  padding: 12px 8px;
  gap: 4px;
}

.metrics-bar--count .metrics-bar__item + .metrics-bar__item {
  border-left: 2px solid #b8d9e4;
}

.metrics-bar--count .metrics-bar__label {
  font-size: 12px;
  font-weight: 600;
  color: #6b7c91;
  letter-spacing: 0.01em;
}

.metrics-bar--count .metrics-bar__value {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--hex-foreground);
}

.metrics-bar--count .metrics-bar__value.text-tone-danger {
  color: #9a3d34;
}

.metrics-bar--count.metrics-bar--4 .metrics-bar__label {
  font-size: 10px;
}

.metrics-bar--count.metrics-bar--4 .metrics-bar__value {
  font-size: 1.15rem;
}

.count-result-panel {
  overflow: hidden;
  border: 1px solid var(--hex-border);
  border-radius: 16px;
  background: var(--hex-card);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.count-result-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--hex-border);
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--hex-primary) 7%, var(--hex-card)) 0%,
    var(--hex-card) 100%
  );
}

.count-result-panel__head-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.count-result-panel__title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--hex-foreground);
}

.count-result-panel__sub {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
  color: var(--hex-muted-foreground);
}

.count-result-panel__badge {
  flex-shrink: 0;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.count-result-panel__badge--ok {
  background: color-mix(in srgb, #16a34a 14%, var(--hex-card));
  color: #15803d;
  border: 1px solid color-mix(in srgb, #16a34a 28%, var(--hex-border));
}

.count-result-panel__badge--warn {
  background: color-mix(in srgb, #e53935 12%, var(--hex-card));
  color: #c62828;
  border: 1px solid color-mix(in srgb, #e53935 24%, var(--hex-border));
}

.count-result-panel__empty {
  padding: 20px 16px;
  font-size: 14px;
  color: var(--hex-muted-foreground);
  text-align: center;
}

.count-result-panel__success {
  padding: 12px 16px;
  border-top: 1px solid var(--hex-border);
  background: color-mix(in srgb, #16a34a 8%, var(--hex-card));
  color: #15803d;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.count-result-panel__foot {
  padding: 14px 16px 16px;
  border-top: 1px solid var(--hex-border);
}

.count-result-row__cell {
  text-align: left;
}

.count-result-table {
  border-top: none;
}

.count-result-table__hint {
  display: none;
  margin: 0;
  padding: 8px 16px 0;
  font-size: 11px;
  line-height: 1.35;
  color: var(--hex-muted-foreground);
}

@media (max-width: 1199px) and (min-width: 640px) {
  .count-result-table__hint {
    display: block;
  }
}

.count-result-table__scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  padding-bottom: 2px;
  background:
    linear-gradient(90deg, var(--hex-card) 0%, transparent 12px) 0 0 / 24px 100%
      no-repeat,
    linear-gradient(270deg, var(--hex-card) 0%, transparent 12px) 100% 0 / 24px
      100% no-repeat;
}

.count-result-table__head,
.count-result-table__row {
  --count-result-cols: minmax(120px, 1.45fr) minmax(96px, 1fr)
    minmax(104px, 1.05fr) minmax(96px, 1fr) minmax(112px, 1.08fr)
    minmax(92px, 1fr) minmax(80px, 0.9fr) minmax(104px, 1.05fr);
  display: grid;
  grid-template-columns: var(--count-result-cols);
  gap: 10px 12px;
  align-items: center;
  width: max(100%, 980px);
  min-width: 980px;
  padding: 12px 16px;
  box-sizing: border-box;
}

.count-result-table__head {
  position: sticky;
  top: 0;
  z-index: 1;
  background: color-mix(in srgb, var(--hex-secondary) 55%, var(--hex-card));
  border-bottom: 1px solid var(--hex-border);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--hex-muted-foreground);
}

.count-result-table__head-name,
.count-result-table__head-num {
  white-space: nowrap;
  overflow: visible;
}

.count-result-table__head-num {
  text-align: right;
  font-size: 10.5px;
  letter-spacing: 0.01em;
}

.count-result-table__body {
  border-top: 1px solid var(--hex-border);
}

.count-result-table__row {
  font-size: 13px;
  border-bottom: 1px solid var(--hex-border);
}

.count-result-table__row:last-child {
  border-bottom: none;
}

.count-result-table__name {
  font-weight: 600;
  line-height: 1.3;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.count-result-table__num,
.count-result-table__diff,
.count-result-table__amount {
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.count-result-table__diff {
  color: var(--hex-muted-foreground);
}

.count-result-table__diff--bad {
  color: #e53935 !important;
  font-weight: 800;
}

.count-result-table__row--mismatch {
  background: color-mix(in srgb, #e53935 4%, var(--hex-card));
}

@media (min-width: 1200px) {
  .count-result-table__head,
  .count-result-table__row {
    padding-left: 20px;
    padding-right: 20px;
  }

  .count-result-table__head {
    font-size: 12px;
  }

  .count-result-table__head-num {
    font-size: 11px;
  }

  .count-result-table__row {
    font-size: 14px;
  }
}

@media (max-width: 639px) {
  .count-view {
    overflow-x: hidden;
    max-width: 100%;
  }

  .count-result-panel {
    overflow: hidden;
    max-width: 100%;
  }

  .count-result-panel__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
  }

  .count-result-panel__badge {
    align-self: flex-start;
  }

  .count-result-table {
    max-width: 100%;
  }

  .count-result-table__scroll {
    overflow: hidden;
    max-width: 100%;
    padding: 0 12px 12px;
    box-sizing: border-box;
  }

  .count-result-table__head {
    display: none;
  }

  .count-result-table__body {
    display: grid;
    gap: 10px;
    border-top: none;
    max-width: 100%;
  }

  .count-result-table__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    padding: 0;
    border: 1px solid var(--hex-border);
    border-radius: 12px;
    background: var(--hex-card);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
    overflow: hidden;
  }

  .count-result-table__row:last-child {
    border-bottom: 1px solid var(--hex-border);
  }

  .count-result-table__row--mismatch {
    border-color: color-mix(in srgb, #e53935 35%, var(--hex-border));
    background: color-mix(in srgb, #e53935 3%, var(--hex-card));
  }

  .count-result-table__name {
    display: block;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    padding: 12px 14px 10px;
    border-bottom: 1px solid var(--hex-border);
    background: color-mix(in srgb, var(--hex-secondary) 35%, var(--hex-card));
    white-space: normal;
    word-break: break-word;
  }

  .count-result-table__num,
  .count-result-table__diff,
  .count-result-table__amount {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    padding: 9px 14px;
    border-bottom: 1px solid
      color-mix(in srgb, var(--hex-border) 75%, transparent);
    text-align: right;
    font-size: 15px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
  }

  .count-result-table__num:last-of-type {
    border-bottom: 1px solid
      color-mix(in srgb, var(--hex-border) 75%, transparent);
  }

  .count-result-table__diff {
    border-bottom: none;
    padding-top: 10px;
    padding-bottom: 10px;
    background: color-mix(in srgb, var(--hex-secondary) 20%, var(--hex-card));
  }

  .count-result-table__num::before,
  .count-result-table__diff::before,
  .count-result-table__amount::before {
    content: attr(data-label);
    flex: 1 1 auto;
    min-width: 0;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--hex-muted-foreground);
    text-align: left;
    white-space: normal;
  }

  .count-result-table__diff--bad {
    font-size: 16px;
    color: #e53935 !important;
    background: color-mix(in srgb, #e53935 6%, var(--hex-card));
  }

  .count-result-panel__foot {
    padding: 12px 14px 14px;
  }
}

@media (min-width: 1024px) {
  .count-result-table__head,
  .count-result-table__row {
    min-width: 0;
    padding-left: 20px;
    padding-right: 20px;
  }

  .count-result-table__head {
    font-size: 12px;
  }

  .count-result-table__row {
    font-size: 14px;
  }
}

@media (max-width: 1023px) {
  .count-view > .metrics-bar--count {
    margin-left: calc(-1 * var(--app-gutter));
    margin-right: calc(-1 * var(--app-gutter));
    width: calc(100% + 2 * var(--app-gutter));
  }
}

.promo-type-menu__item {
  justify-content: space-between;
  gap: 12px;
}

.promo-type-menu__item.is-active {
  background: var(--hex-primary-soft);
  color: var(--hex-primary-dark);
  border-color: color-mix(in srgb, var(--hex-primary) 35%, var(--hex-border));
}

.promo-type-menu__item.is-active .promo-type-menu__count {
  background: var(--hex-primary);
  color: #fff;
}

.promo-type-menu__label {
  flex: 1;
  min-width: 0;
  line-height: 1.35;
  font-weight: 500;
}

.promo-type-menu__count {
  flex-shrink: 0;
  min-width: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--hex-primary-soft);
  color: var(--hex-primary);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.promo-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.promo-hub {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.promo-hub-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 14px 16px;
  border: 1px solid var(--hex-border);
  border-radius: 14px;
  background: var(--hex-card);
  color: var(--hex-foreground);
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  box-shadow: 0 1px 3px rgba(16, 22, 35, 0.06);
  transition:
    transform 0.12s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.promo-hub-card:hover,
.promo-hub-card:focus-visible {
  border-color: color-mix(in srgb, var(--hex-primary) 35%, var(--hex-border));
  box-shadow: 0 4px 14px rgba(16, 22, 35, 0.08);
}

.promo-hub-card:active:not(:disabled) {
  background: color-mix(in srgb, var(--hex-primary) 6%, var(--hex-card));
}

.promo-hub-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--hex-primary) 14%, var(--hex-card));
  color: var(--hex-primary);
}

.promo-hub-card--price .promo-hub-card__icon,
.promo-hub-card--quantity .promo-hub-card__icon,
.promo-hub-card--payment .promo-hub-card__icon {
  background: color-mix(in srgb, var(--hex-primary) 14%, var(--hex-card));
  color: var(--hex-primary);
}

.promo-hub-card__icon .ui-icon {
  width: 20px;
  height: 20px;
}

.promo-hub-card__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.promo-hub-card__label {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

.promo-hub-card__meta {
  font-size: 12px;
  font-weight: 600;
  color: var(--hex-muted-foreground);
  font-variant-numeric: tabular-nums;
}

.promo-hub-card__count {
  flex-shrink: 0;
  min-width: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--hex-primary-soft);
  color: var(--hex-primary);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.promo-hub-card__count--empty {
  background: var(--hex-primary-soft);
  color: var(--hex-primary);
  font-weight: 700;
}

.promo-hub-card__chevron {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: var(--hex-muted-foreground);
  opacity: 0.7;
}

.promo-detail-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--hex-border);
  background: var(--hex-card);
  box-shadow: 0 1px 3px rgba(16, 22, 35, 0.04);
}

.promo-detail-banner__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--hex-primary) 14%, var(--hex-card));
  color: var(--hex-primary);
}

.promo-detail-banner--price .promo-detail-banner__icon,
.promo-detail-banner--quantity .promo-detail-banner__icon,
.promo-detail-banner--payment .promo-detail-banner__icon {
  background: color-mix(in srgb, var(--hex-primary) 14%, var(--hex-card));
  color: var(--hex-primary);
}

.promo-detail-banner__icon .ui-icon {
  width: 22px;
  height: 22px;
}

.promo-detail-banner__body {
  min-width: 0;
  flex: 1;
}

.promo-detail-banner__title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}

.promo-detail-banner__meta {
  margin: 3px 0 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--hex-muted-foreground);
  font-variant-numeric: tabular-nums;
}

.promo-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.promo-panel__lead {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--hex-primary) 8%, var(--hex-card));
  border: 1px solid
    color-mix(in srgb, var(--hex-primary) 18%, var(--hex-border));
  color: var(--hex-foreground);
  font-size: 13px;
  line-height: 1.45;
}

.promo-panel__toolbar {
  display: flex;
  align-items: center;
}

.promo-panel__clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 40px;
  margin-bottom: 4px;
  padding: 8px 14px;
  border: 1px solid
    color-mix(in srgb, var(--hex-destructive, #dc2626) 35%, var(--hex-border));
  border-radius: 12px;
  background: color-mix(
    in srgb,
    var(--hex-destructive, #dc2626) 8%,
    var(--hex-card)
  );
  color: var(--hex-destructive, #b91c1c);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.promo-panel__add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  width: 100%;
  padding: 10px 16px;
  border: none;
  border-radius: 12px;
  background: var(--hex-primary);
  color: var(--hex-primary-foreground);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(16, 22, 35, 0.12);
  transition:
    transform 0.12s ease,
    filter 0.15s ease;
}

.promo-panel__add:hover,
.promo-panel__add:focus-visible {
  filter: brightness(1.05);
}

.promo-panel__add:active:not(:disabled) {
  filter: brightness(0.94);
}

.promo-panel__add .ui-icon {
  width: 18px;
  height: 18px;
}

.promo-rule-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.promo-rule-list__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 36px 20px;
  border-radius: 14px;
  border: 1px dashed var(--hex-border);
  background: color-mix(in srgb, var(--hex-card) 70%, var(--hex-secondary));
  color: var(--hex-muted-foreground);
  font-size: 14px;
  text-align: center;
}

.promo-rule-list__empty p {
  margin: 0;
}

.promo-rule-list__empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--hex-secondary);
  color: var(--hex-primary);
}

.promo-rule-list__empty-icon .ui-icon {
  width: 22px;
  height: 22px;
}

.modal-panel--promo {
  display: flex;
  flex-direction: column;
  max-height: min(90vh, 860px);
}

.modal-panel--promo .promo-form {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* Багц урамшуулал — алхамчилсан, ойлгомжтой sheet */
.modal-panel--promo-qty {
  --promo-sheet-bg: #f3f5f8;
  --promo-sheet-card: #ffffff;
  --promo-sheet-line: #e2e8ef;
  --promo-sheet-ink: #1a2736;
  --promo-sheet-muted: #667788;
  --promo-sheet-head: var(--hex-primary, #16899a);
  --promo-sheet-accent: var(--hex-primary, #16899a);
  --promo-sheet-gift: #16a34a;
  --promo-sheet-gift-soft: color-mix(in srgb, #16a34a 10%, #ffffff);
  display: flex;
  flex-direction: column;
  max-height: min(92vh, 760px);
  border: 0;
  border-radius: 16px;
  background: var(--promo-sheet-bg);
  box-shadow: 0 18px 48px rgba(16, 22, 35, 0.28);
}

.modal-panel--promo-qty .promo-form {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.modal-panel--promo-qty .modal-panel__head {
  flex-shrink: 0;
  padding: 14px 16px;
  border-bottom: 0;
  background: var(--promo-sheet-head);
  color: #fff;
}

.modal-panel--promo-qty .modal-panel__title {
  margin: 0;
  color: #fff;
  font-size: clamp(15px, 4vw, 17px);
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.modal-panel--promo-qty .modal-close {
  background: rgba(255, 255, 255, 0.14) !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 10px !important;
  min-width: 36px;
  min-height: 36px;
}

.modal-panel--promo-qty .modal-close:hover,
.modal-panel--promo-qty .modal-close:active {
  background: rgba(255, 255, 255, 0.22) !important;
}

.modal-panel--promo-qty .promo-form__body {
  gap: 12px;
  padding: 14px 14px 10px;
  background: var(--promo-sheet-bg);
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.modal-panel--promo-qty .promo-form__foot {
  position: sticky;
  bottom: 0;
  z-index: 2;
  padding: 12px 14px calc(14px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--promo-sheet-line);
  background: var(--promo-sheet-card);
  box-shadow: 0 -8px 24px rgba(16, 22, 35, 0.08);
}

.modal-panel--promo-qty .promo-form__save {
  min-height: 48px;
  border-radius: 12px;
  background: var(--promo-sheet-accent);
  font-weight: 800;
  box-shadow: none;
}

.modal-panel--promo-qty .promo-qty-tabs {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.modal-panel--promo-qty .promo-qty-summary {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  color: var(--promo-sheet-accent);
  line-height: 1.3;
}

.modal-panel--promo-qty .promo-qty-summary.is-empty,
.modal-panel--promo-qty .promo-qty-summary[hidden] {
  display: none;
}

.modal-panel--promo-qty .promo-qty-threshold {
  padding: 12px;
  border-radius: 12px;
  background: var(--promo-sheet-card);
  border: 1px solid var(--promo-sheet-line);
}

.modal-panel--promo-qty .promo-section,
.modal-panel--promo-qty .promo-form-group {
  border: 1px solid var(--promo-sheet-line);
  border-radius: 12px;
  background: var(--promo-sheet-card);
  overflow: visible;
  box-shadow: none;
}

.modal-panel--promo-qty .promo-section--compact {
  padding: 0;
}

.modal-panel--promo-qty .promo-product-block {
  padding: 12px;
}

.modal-panel--promo-qty .promo-section-plain-head {
  margin-bottom: 8px;
}

.modal-panel--promo-qty .promo-section-title {
  color: var(--promo-sheet-ink);
  font-size: 13px;
  font-weight: 800;
}

.modal-panel--promo-qty .promo-section-hint {
  display: block;
  margin: 2px 0 0;
  font-size: 12px;
  line-height: 1.35;
  color: var(--promo-sheet-muted);
}

.modal-panel--promo-qty .promo-section--free {
  border-color: color-mix(
    in srgb,
    var(--promo-sheet-gift) 42%,
    var(--promo-sheet-line)
  );
  background: var(--promo-sheet-gift-soft);
}

.modal-panel--promo-qty .promo-section--free .promo-section-title {
  color: color-mix(in srgb, var(--promo-sheet-gift) 82%, #0f172a);
}

.modal-panel--promo-qty .promo-section--buy {
  border-color: color-mix(
    in srgb,
    var(--promo-sheet-accent) 38%,
    var(--promo-sheet-line)
  );
  background: color-mix(in srgb, var(--promo-sheet-accent) 6%, #ffffff);
}

.modal-panel--promo-qty .promo-qty-setup-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--promo-sheet-line);
  background: var(--promo-sheet-card);
}

.modal-panel--promo-qty .promo-qty-mode__label,
.modal-panel--promo-qty .promo-qty-unit__label {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 800;
  color: var(--promo-sheet-ink);
}

.modal-panel--promo-qty .promo-mode-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.modal-panel--promo-qty .promo-mode-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-height: 56px;
  padding: 10px 8px;
  border: 2px solid var(--promo-sheet-line);
  border-radius: 12px;
  background: #f7f9fb;
  text-align: left;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.modal-panel--promo-qty .promo-mode-card.is-active {
  border-color: var(--promo-sheet-accent);
  background: color-mix(in srgb, var(--promo-sheet-accent) 10%, #ffffff);
  box-shadow: 0 0 0 3px
    color-mix(in srgb, var(--promo-sheet-accent) 14%, transparent);
}

.modal-panel--promo-qty .promo-mode-card__title {
  font-size: 13px;
  font-weight: 800;
  color: var(--promo-sheet-ink);
  line-height: 1.2;
}

.modal-panel--promo-qty .promo-mode-card__hint {
  font-size: 11px;
  line-height: 1.25;
  color: var(--promo-sheet-muted);
}

.modal-panel--promo-qty .promo-mode-helper {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--promo-sheet-accent) 8%, #ffffff);
  border: 1px solid
    color-mix(in srgb, var(--promo-sheet-accent) 18%, var(--promo-sheet-line));
  font-size: 12px;
  line-height: 1.45;
  color: var(--promo-sheet-ink);
}

.modal-panel--promo-qty .promo-qty-unit__note {
  margin: 8px 0 0;
  font-size: 11px;
  line-height: 1.35;
  color: var(--promo-sheet-muted);
}

.modal-panel--promo-qty .promo-qty-preview {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--promo-sheet-accent) 6%, #ffffff);
  border: 1px dashed
    color-mix(in srgb, var(--promo-sheet-accent) 28%, var(--promo-sheet-line));
}

.modal-panel--promo-qty .promo-qty-preview.is-empty,
.modal-panel--promo-qty .promo-qty-preview[hidden] {
  display: none;
}

.modal-panel--promo-qty .promo-qty-preview__short {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  color: var(--promo-sheet-accent);
  line-height: 1.3;
}

.modal-panel--promo-qty .promo-qty-preview__full {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--promo-sheet-ink);
}

.modal-panel--promo-qty .promo-pick-selected {
  margin-bottom: 10px;
}

.modal-panel--promo-qty .promo-pick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.modal-panel--promo-qty .promo-pick-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 6px 8px 6px 6px;
  border-radius: 999px;
  border: 1px solid var(--promo-sheet-line);
  background: #f7f9fb;
}

.modal-panel--promo-qty .promo-section--free .promo-pick-chip {
  border-color: color-mix(
    in srgb,
    var(--promo-sheet-gift) 30%,
    var(--promo-sheet-line)
  );
  background: color-mix(in srgb, var(--promo-sheet-gift) 6%, #ffffff);
}

.modal-panel--promo-qty .promo-pick-chip__media {
  flex-shrink: 0;
}

.modal-panel--promo-qty .promo-pick-chip__img {
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
}

.modal-panel--promo-qty .promo-pick-chip__name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--promo-sheet-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal-panel--promo-qty .promo-pick-chip .promo-qty-field--inline {
  flex-shrink: 0;
  margin: 0;
}

.modal-panel--promo-qty
  .promo-pick-chip
  .promo-qty-field--inline
  .promo-qty-field__label {
  display: none;
}

.modal-panel--promo-qty .promo-pick-chip__remove {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--promo-sheet-muted) 14%, transparent);
  color: var(--promo-sheet-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.modal-panel--promo-qty .promo-pick-chip__remove:hover {
  background: color-mix(in srgb, #dc2626 14%, transparent);
  color: #b91c1c;
}

.modal-panel--promo-qty .promo-browse-block {
  margin-top: 10px;
}

.modal-panel--promo-qty .promo-browse-head {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--promo-sheet-muted);
}

.modal-panel--promo-qty .promo-product-empty {
  display: none;
}

.modal-panel--promo-qty .promo-product-empty {
  margin: 0;
  padding: 8px 0 0;
  font-size: 13px;
  color: var(--promo-sheet-muted);
}

.modal-panel--promo-qty .promo-search-input,
.modal-panel--promo-qty .promo-qty-input {
  border-radius: 10px;
  border: 1px solid var(--promo-sheet-line);
  background: #f7f9fb;
}

.modal-panel--promo-qty .promo-search-input:focus,
.modal-panel--promo-qty .promo-qty-input:focus {
  outline: none;
  border-color: var(--promo-sheet-accent);
  box-shadow: 0 0 0 3px
    color-mix(in srgb, var(--promo-sheet-accent) 16%, transparent);
  background: #fff;
}

.modal-panel--promo-qty .promo-bundle-formula {
  gap: 8px;
}

.modal-panel--promo-qty .promo-bundle-formula__card {
  border: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.modal-panel--promo-qty .promo-bundle-formula__arrow {
  color: var(--promo-sheet-accent);
  font-weight: 800;
}

.modal-panel--promo-qty .promo-category-chip.is-active {
  background: var(--promo-sheet-accent);
  border-color: var(--promo-sheet-accent);
  color: #fff;
}

/* Promo sheet theme — бүх урамшууллын modal */
.modal-panel--promo-sheet {
  --promo-sheet-bg: #f3f5f8;
  --promo-sheet-card: #ffffff;
  --promo-sheet-line: #e2e8ef;
  --promo-sheet-ink: #1a2736;
  --promo-sheet-muted: #667788;
  --promo-sheet-head: var(--hex-primary, #16899a);
  --promo-sheet-accent: var(--hex-primary, #16899a);
  --promo-sheet-gift: #16a34a;
  --promo-sheet-gift-soft: color-mix(in srgb, #16a34a 10%, #ffffff);
  display: flex;
  flex-direction: column;
  max-height: min(92vh, 760px);
  border: 0;
  border-radius: 16px;
  background: var(--promo-sheet-bg);
  box-shadow: 0 18px 48px rgba(16, 22, 35, 0.28);
}

.modal-panel--promo-sheet .promo-form {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.modal-panel--promo-sheet .modal-panel__head {
  flex-shrink: 0;
  padding: 14px 16px;
  border-bottom: 0;
  background: var(--promo-sheet-head);
  color: #fff;
}

.modal-panel--promo-sheet .modal-panel__title {
  margin: 0;
  color: #fff;
  font-size: clamp(15px, 4vw, 17px);
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.modal-panel--promo-sheet .modal-close {
  background: rgba(255, 255, 255, 0.14) !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 10px !important;
  min-width: 36px;
  min-height: 36px;
}

.modal-panel--promo-sheet .modal-close:hover,
.modal-panel--promo-sheet .modal-close:active {
  background: rgba(255, 255, 255, 0.22) !important;
}

.modal-panel--promo-sheet .promo-form__body {
  gap: 12px;
  padding: 14px 14px 10px;
  background: var(--promo-sheet-bg);
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.modal-panel--promo-sheet .promo-form__foot {
  position: sticky;
  bottom: 0;
  z-index: 2;
  padding: 12px 14px calc(14px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--promo-sheet-line);
  background: var(--promo-sheet-card);
  box-shadow: 0 -8px 24px rgba(16, 22, 35, 0.08);
}

.modal-panel--promo-sheet .promo-form__save {
  min-height: 48px;
  border-radius: 12px;
  background: var(--promo-sheet-accent);
  font-weight: 800;
  box-shadow: none;
}

.modal-panel--promo-qty .promo-sheet-section,
.modal-panel--promo-sheet .promo-sheet-section {
  border: 1px solid var(--promo-sheet-line);
  border-radius: 12px;
  background: var(--promo-sheet-card);
  overflow: visible;
}

.modal-panel--promo-qty .promo-sheet-section--buy,
.modal-panel--promo-sheet .promo-sheet-section--buy {
  border-color: color-mix(
    in srgb,
    var(--promo-sheet-accent) 38%,
    var(--promo-sheet-line)
  );
  background: color-mix(in srgb, var(--promo-sheet-accent) 6%, #ffffff);
}

.modal-panel--promo-qty .promo-sheet-section--free,
.modal-panel--promo-sheet .promo-sheet-section--free {
  border-color: color-mix(
    in srgb,
    var(--promo-sheet-gift) 42%,
    var(--promo-sheet-line)
  );
  background: var(--promo-sheet-gift-soft);
}

.modal-panel--promo-qty .promo-sheet-section--condition,
.modal-panel--promo-sheet .promo-sheet-section--condition {
  border-color: color-mix(
    in srgb,
    var(--promo-sheet-accent) 28%,
    var(--promo-sheet-line)
  );
}

.modal-panel--promo-qty .promo-sheet-section__body,
.modal-panel--promo-sheet .promo-sheet-section__body {
  padding: 12px;
}

.modal-panel--promo-qty .promo-sheet-section__head,
.modal-panel--promo-sheet .promo-sheet-section__head {
  margin-bottom: 10px;
}

.modal-panel--promo-qty .promo-sheet-section__title,
.modal-panel--promo-sheet .promo-sheet-section__title {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  color: var(--promo-sheet-ink);
}

.modal-panel--promo-qty .promo-sheet-section--free .promo-sheet-section__title,
.modal-panel--promo-sheet
  .promo-sheet-section--free
  .promo-sheet-section__title {
  color: color-mix(in srgb, var(--promo-sheet-gift) 82%, #0f172a);
}

.modal-panel--promo-qty .promo-sheet-section__hint,
.modal-panel--promo-sheet .promo-sheet-section__hint {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.35;
  color: var(--promo-sheet-muted);
}

.modal-panel--promo-qty .promo-sheet-filters,
.modal-panel--promo-sheet .promo-sheet-filters {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.modal-panel--promo-qty .promo-sheet-search,
.modal-panel--promo-sheet .promo-sheet-search,
.modal-panel--promo-qty .promo-search-input,
.modal-panel--promo-sheet .promo-search-input {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--promo-sheet-line);
  background: #f7f9fb;
  font-size: 14px;
}

.modal-panel--promo-qty .promo-category-select-wrap,
.modal-panel--promo-sheet .promo-category-select-wrap {
  display: block;
}

.modal-panel--promo-qty .promo-category-select,
.modal-panel--promo-sheet .promo-category-select {
  width: 100%;
  min-height: 42px;
  padding: 10px 36px 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--promo-sheet-line);
  background: #f7f9fb
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23667788' d='M1 1l5 5 5-5'/%3E%3C/svg%3E")
    no-repeat right 12px center;
  appearance: none;
  font-size: 14px;
  color: var(--promo-sheet-ink);
}

.modal-panel--promo-qty .promo-product-grid,
.modal-panel--promo-sheet .promo-product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-height: min(42vh, 320px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 2px 8px;
}

.modal-panel--promo-qty
  .promo-sheet-section:has(.promo-search-combo.is-open)
  [data-promo-pick-list-mount]
  .promo-product-grid,
.modal-panel--promo-sheet
  .promo-sheet-section:has(.promo-search-combo.is-open)
  [data-promo-pick-list-mount]
  .promo-product-grid {
  max-height: min(22vh, 168px);
}

.modal-panel--promo-qty .promo-product-card,
.modal-panel--promo-sheet .promo-product-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-height: 108px;
  padding: 8px 6px 10px;
  border: 1px solid var(--promo-sheet-line);
  border-radius: 10px;
  background: #fff;
  text-align: center;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

.modal-panel--promo-qty .promo-product-card:hover,
.modal-panel--promo-sheet .promo-product-card:hover,
.modal-panel--promo-qty .promo-product-card:focus-visible,
.modal-panel--promo-sheet .promo-product-card:focus-visible {
  border-color: color-mix(
    in srgb,
    var(--promo-sheet-accent) 50%,
    var(--promo-sheet-line)
  );
  box-shadow: 0 2px 8px rgba(16, 22, 35, 0.08);
}

.modal-panel--promo-qty .promo-product-card.is-selected,
.modal-panel--promo-sheet .promo-product-card.is-selected {
  border-color: var(--promo-sheet-accent);
  background: color-mix(in srgb, var(--promo-sheet-accent) 8%, #ffffff);
  box-shadow: 0 0 0 2px
    color-mix(in srgb, var(--promo-sheet-accent) 20%, transparent);
}

.modal-panel--promo-qty .promo-product-card__media,
.modal-panel--promo-sheet .promo-product-card__media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 52px;
}

.modal-panel--promo-qty .promo-product-card__img,
.modal-panel--promo-sheet .promo-product-card__img {
  max-width: 100%;
  max-height: 52px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
}

.modal-panel--promo-qty .promo-product-card__name,
.modal-panel--promo-sheet .promo-product-card__name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  width: 100%;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--promo-sheet-ink);
}

.modal-panel--promo-qty .promo-product-card__price,
.modal-panel--promo-sheet .promo-product-card__price {
  font-size: 11px;
  font-weight: 800;
  color: var(--promo-sheet-accent);
  line-height: 1.2;
}

.modal-panel--promo-qty .promo-product-card__hit,
.modal-panel--promo-sheet .promo-product-card__hit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: center;
  color: inherit;
}

.modal-panel--promo-qty .promo-product-card--with-qty,
.modal-panel--promo-sheet .promo-product-card--with-qty {
  min-height: 138px;
  padding-bottom: 8px;
  cursor: default;
}

.modal-panel--promo-qty .promo-qty-stepper--mini,
.modal-panel--promo-sheet .promo-qty-stepper--mini {
  gap: 4px;
  margin-top: 4px;
  width: 100%;
  justify-content: center;
}

.modal-panel--promo-qty .promo-qty-stepper--mini .promo-qty-stepper__btn,
.modal-panel--promo-sheet .promo-qty-stepper--mini .promo-qty-stepper__btn {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  font-size: 16px;
}

.modal-panel--promo-qty .promo-qty-stepper--mini .promo-qty-stepper__input,
.modal-panel--promo-sheet .promo-qty-stepper--mini .promo-qty-stepper__input {
  width: 28px;
  min-height: 26px;
  font-size: 14px;
}

.modal-panel--promo-qty .promo-product-more,
.modal-panel--promo-sheet .promo-product-more {
  grid-column: 1 / -1;
  margin: 0;
  padding: 4px 0;
  font-size: 12px;
  color: var(--promo-sheet-muted);
  text-align: center;
}

.modal-panel--promo-qty .promo-product-empty,
.modal-panel--promo-sheet .promo-product-empty {
  display: block;
  margin: 0;
  padding: 16px 8px;
  font-size: 13px;
  color: var(--promo-sheet-muted);
  text-align: center;
}

.modal-panel--promo-qty .promo-sheet-stepper,
.modal-panel--promo-sheet .promo-sheet-stepper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 0 4px;
  border-top: 1px solid var(--promo-sheet-line);
  margin-top: 10px;
}

.modal-panel--promo-qty .promo-sheet-stepper__label,
.modal-panel--promo-sheet .promo-sheet-stepper__label {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  color: var(--promo-sheet-muted);
}

.modal-panel--promo-qty .promo-qty-stepper,
.modal-panel--promo-sheet .promo-qty-stepper {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.modal-panel--promo-qty .promo-qty-stepper__btn,
.modal-panel--promo-sheet .promo-qty-stepper__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: color-mix(in srgb, var(--promo-sheet-accent) 14%, #ffffff);
  color: var(--promo-sheet-accent);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.modal-panel--promo-qty .promo-qty-stepper__btn:active,
.modal-panel--promo-sheet .promo-qty-stepper__btn:active {
  background: color-mix(in srgb, var(--promo-sheet-accent) 24%, #ffffff);
}

.modal-panel--promo-qty .promo-qty-stepper__input,
.modal-panel--promo-sheet .promo-qty-stepper__input {
  width: 56px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 28px;
  font-weight: 800;
  text-align: center;
  color: var(--promo-sheet-ink);
}

.modal-panel--promo-qty .promo-qty-advanced,
.modal-panel--promo-sheet .promo-qty-advanced {
  border: 1px solid var(--promo-sheet-line);
  border-radius: 12px;
  background: var(--promo-sheet-card);
  overflow: hidden;
}

.modal-panel--promo-qty .promo-qty-advanced__summary,
.modal-panel--promo-sheet .promo-qty-advanced__summary {
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 800;
  color: var(--promo-sheet-muted);
  cursor: pointer;
  list-style: none;
}

.modal-panel--promo-qty .promo-qty-advanced__summary::-webkit-details-marker,
.modal-panel--promo-sheet .promo-qty-advanced__summary::-webkit-details-marker {
  display: none;
}

.modal-panel--promo-qty .promo-qty-advanced__body,
.modal-panel--promo-sheet .promo-qty-advanced__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 12px 12px;
  border-top: 1px solid var(--promo-sheet-line);
}

.modal-panel--promo-qty .promo-section-count,
.modal-panel--promo-sheet .promo-section-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--promo-sheet-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  vertical-align: middle;
}

.modal-panel--promo-sheet .promo-reward-toggle {
  margin-bottom: 4px;
}

@media (max-width: 380px) {
  .modal-panel--promo-qty .promo-product-grid,
  .modal-panel--promo-sheet .promo-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.promo-form,
.promo-qty-form {
  display: flex;
  flex-direction: column;
  max-height: inherit;
}

.promo-form__body,
.promo-qty-form__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}

.promo-form__foot,
.promo-qty-form__foot {
  flex-shrink: 0;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--hex-border);
  background: color-mix(in srgb, var(--hex-card) 92%, var(--hex-secondary));
}

.promo-form__save {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: none;
  border-radius: 12px;
  background: var(--hex-primary);
  color: var(--hex-primary-foreground);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(16, 22, 35, 0.12);
}

.promo-form__save .ui-icon {
  width: 18px;
  height: 18px;
}

.promo-form__save:active:not(:disabled) {
  filter: brightness(0.94);
}

.promo-form-group {
  padding: 14px;
  border: 1px solid var(--hex-border);
  border-radius: 12px;
  background: var(--hex-card);
}

.promo-mode-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.promo-mode-block__label {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--hex-muted-foreground);
}

.promo-mode-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

@media (max-width: 520px) {
  .promo-mode-cards {
    grid-template-columns: 1fr;
  }
}

.promo-mode-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-height: 92px;
  padding: 12px;
  border: 1px solid var(--hex-border);
  border-radius: 14px;
  background: var(--hex-card);
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.promo-mode-card:hover,
.promo-mode-card:focus-visible {
  border-color: color-mix(in srgb, var(--hex-primary) 45%, var(--hex-border));
  outline: none;
}

.promo-mode-card.is-active {
  border-color: var(--hex-primary);
  background: color-mix(in srgb, var(--hex-primary) 10%, #ffffff);
  box-shadow: inset 0 0 0 1px
    color-mix(in srgb, var(--hex-primary) 35%, transparent);
}

.promo-mode-card__title {
  font-size: 14px;
  font-weight: 800;
  color: var(--hex-foreground);
  line-height: 1.2;
}

.promo-mode-card__desc {
  font-size: 12px;
  line-height: 1.35;
  color: var(--hex-muted-foreground);
}

.promo-mode-card__ex {
  margin-top: auto;
  padding-top: 4px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--hex-primary);
  font-variant-numeric: tabular-nums;
}

.promo-mode-card.is-active .promo-mode-card__ex {
  color: color-mix(in srgb, var(--hex-primary) 80%, #000);
}

.promo-live-preview {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid
    color-mix(in srgb, var(--hex-primary) 24%, var(--hex-border));
  background: color-mix(in srgb, var(--hex-primary) 8%, #ffffff);
}

.promo-live-preview.is-ready {
  border-color: color-mix(in srgb, var(--hex-success) 40%, var(--hex-border));
  background: color-mix(in srgb, var(--hex-success) 10%, #ffffff);
}

.promo-live-preview__top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.promo-live-preview__badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--hex-primary) 16%, #ffffff);
  color: var(--hex-primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.promo-live-preview.is-ready .promo-live-preview__badge {
  background: color-mix(in srgb, var(--hex-success) 18%, #ffffff);
  color: var(--hex-success);
}

.promo-live-preview__text {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--hex-foreground);
}

.promo-step-note {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--hex-secondary);
  font-size: 12px;
  line-height: 1.4;
  color: var(--hex-muted-foreground);
}

.promo-section-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  margin-left: 8px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--hex-primary);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  vertical-align: middle;
}

.promo-section-head__copy,
.promo-section-plain-head {
  min-width: 0;
  flex: 1;
}

.promo-section-plain-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.promo-selected-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 2px 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--hex-muted-foreground);
}

.promo-selected-head b {
  color: var(--hex-foreground);
  font-variant-numeric: tabular-nums;
}

.promo-product-empty-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 88px;
  padding: 16px 14px;
  border: 1.5px dashed var(--hex-border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--hex-secondary) 55%, #ffffff);
  text-align: center;
}

.promo-product-empty-card__title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--hex-foreground);
}

.promo-product-empty-card__hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
  color: var(--hex-muted-foreground);
}

.promo-bundle-formula {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 4px;
}

.promo-bundle-formula__card {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--hex-border);
  background: var(--hex-secondary);
}

.promo-bundle-formula__card--buy {
  border-color: color-mix(in srgb, var(--hex-primary) 30%, var(--hex-border));
  background: color-mix(in srgb, var(--hex-primary) 8%, #ffffff);
}

.promo-bundle-formula__card--gift {
  border-color: color-mix(in srgb, var(--hex-success) 30%, var(--hex-border));
  background: color-mix(in srgb, var(--hex-success) 8%, #ffffff);
}

.promo-bundle-formula__card .promo-qty-field,
.promo-qty-field--formula {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.promo-bundle-formula__card .promo-qty-inline {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
}

.promo-bundle-formula__card .promo-qty-field__label,
.promo-qty-field--formula .promo-qty-field__label {
  display: block;
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: left;
  line-height: 1.25;
  color: var(--hex-muted-foreground);
}

.promo-bundle-formula__card .promo-qty-input,
.promo-qty-field--formula .promo-qty-input {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-height: 52px;
  height: auto;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--hex-border);
  border-radius: 10px;
  background: #ffffff;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: var(--hex-foreground);
}

.promo-bundle-formula__card .promo-qty-input:focus,
.promo-qty-field--formula .promo-qty-input:focus {
  outline: none;
  border-color: var(--hex-primary);
  box-shadow: 0 0 0 3px rgba(22, 137, 154, 0.16);
}

.promo-bundle-formula__arrow {
  flex-shrink: 0;
  align-self: center;
  font-size: 22px;
  font-weight: 800;
  color: var(--hex-primary);
  line-height: 1;
}

.modal-panel--promo-qty .promo-bundle-formula__card .promo-qty-input,
.modal-panel--promo-qty .promo-qty-field--formula .promo-qty-input {
  min-height: 52px;
  background: #ffffff;
  border-color: var(--promo-sheet-line);
  box-shadow: none;
}

.modal-panel--promo-qty .promo-product-empty-card {
  min-height: 72px;
  padding: 16px 12px;
}

.promo-bundle-summary {
  margin: 4px 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid
    color-mix(in srgb, var(--hex-primary) 22%, var(--hex-border));
  background: color-mix(in srgb, var(--hex-primary) 8%, var(--hex-card));
}

.promo-bundle-summary__row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.promo-bundle-summary__side {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.promo-bundle-summary__side--gift .promo-bundle-summary__value {
  color: var(--hex-success-text, #0f7a3f);
}

.promo-bundle-summary__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--hex-muted-foreground);
}

.promo-bundle-summary__value {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}

.promo-bundle-summary__arrow {
  flex-shrink: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--hex-primary);
}

.promo-bundle-summary__tip {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--hex-muted-foreground);
}

.promo-bundle-qualify {
  margin-top: 4px;
}

.promo-bundle-qualify .promo-section {
  border: 0;
  padding: 0;
  background: transparent;
}

.promo-section--free .promo-section-hint {
  color: var(--hex-success-text, #0f7a3f);
}

.promo-form-group__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.promo-form-group__step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--hex-primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.promo-form-group__title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.promo-form-group__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.promo-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 420px) {
  .promo-form-grid {
    grid-template-columns: 1fr;
  }
}

.promo-form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.promo-form-field__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--hex-foreground);
}

.promo-form-field__hint {
  font-size: 12px;
  line-height: 1.35;
  color: var(--hex-muted-foreground);
}

.promo-form .seg-tabs,
.promo-form .promo-type-tabs {
  width: 100%;
}

.promo-form .promo-type-tabs .seg-tab {
  font-size: 12px;
  line-height: 1.25;
  padding: 8px 6px;
  white-space: normal;
}

.promo-form .promo-section {
  margin: 0;
}

.admin-menu {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--hex-border);
}

.admin-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-hub {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-hub__heading {
  margin: 0;
  padding: 0 2px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--hex-muted-foreground);
}

.admin-hub__heading--settings {
  margin-top: 4px;
}

.admin-hub__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.admin-hub__settings {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-hub-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 12px 14px;
  border: 1px solid var(--hex-border);
  border-radius: 14px;
  background: var(--hex-card);
  color: var(--hex-foreground);
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  box-shadow: 0 1px 3px rgba(16, 22, 35, 0.06);
  transition:
    transform 0.12s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.admin-hub-card:hover,
.admin-hub-card:focus-visible {
  border-color: color-mix(in srgb, var(--hex-primary) 35%, var(--hex-border));
  box-shadow: 0 4px 14px rgba(16, 22, 35, 0.08);
}

.admin-hub-card:active:not(:disabled) {
  background: color-mix(in srgb, var(--hex-primary) 6%, var(--hex-card));
}

.admin-hub-card--settings {
  min-height: 52px;
}

.admin-hub-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--hex-secondary);
  color: var(--hex-primary);
}

.admin-hub-card__icon .ui-icon {
  width: 18px;
  height: 18px;
}

.admin-hub-card__label {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.admin-hub-card__chevron {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: var(--hex-muted-foreground);
  opacity: 0.7;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.admin-metrics--factory {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 900px) {
  .admin-metrics--factory {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.admin-metric-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 112px;
  padding: 14px 8px 12px;
  border: 1px solid var(--hex-border);
  border-radius: 16px;
  background: var(--hex-card);
  text-align: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(16, 22, 35, 0.05);
  transition:
    transform 0.12s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.admin-metric-card:hover {
  border-color: color-mix(in srgb, var(--hex-primary) 40%, var(--hex-border));
  box-shadow: 0 6px 16px color-mix(in srgb, var(--hex-primary) 12%, transparent);
}

.admin-metric-card:active {
  transform: translateY(0);
}

.admin-metric-card--active {
  border-color: color-mix(in srgb, var(--hex-primary) 50%, var(--hex-border));
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--hex-primary-soft) 40%, var(--hex-card)) 0%,
    var(--hex-card) 100%
  );
}

.admin-metric-card__icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--hex-secondary);
  color: var(--hex-muted-foreground);
}

.admin-metric-card__icon-wrap.is-active {
  background: color-mix(
    in srgb,
    var(--hex-primary-soft) 70%,
    var(--hex-secondary)
  );
  color: var(--hex-primary);
}

.admin-metric-card__icon {
  width: 18px;
  height: 18px;
}

.admin-metric-card__dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--hex-danger);
  border: 1.5px solid var(--hex-card);
}

.admin-metric-card__label {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--hex-muted-foreground);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}

.admin-metric-card__value {
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--hex-foreground);
}

.admin-menu__item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 48px;
  padding: 12px 0;
  border: none;
  border-bottom: 1px solid var(--hex-border);
  border-radius: 0;
  background: transparent;
  color: var(--hex-foreground);
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: none !important;
  transition:
    background 0.15s ease,
    transform 0.1s ease;
}

.admin-menu__item:hover,
.admin-menu__item:focus-visible {
  background: var(--hex-secondary);
}

.admin-menu__item:active:not(:disabled) {
  background: color-mix(in srgb, var(--hex-primary) 12%, var(--hex-secondary));
}

.line-panel {
  border-top: 1px solid var(--hex-border);
  border-bottom: 1px solid var(--hex-border);
}

.line-panel__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 0 12px;
  border-bottom: 1px solid var(--hex-border);
}

.line-panel__search {
  width: 100%;
  margin: 0;
  padding: 10px 0 12px;
  border: none;
  border-bottom: 1px solid var(--hex-border);
  border-radius: 0;
  background: transparent;
}

.line-panel__section-title {
  padding: 10px 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--hex-muted-foreground);
  border-bottom: 1px solid var(--hex-border);
}

.line-panel__empty {
  padding: 24px 0;
  text-align: center;
  font-size: 14px;
  color: var(--hex-muted-foreground);
}

.sales-report-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
}

.sales-report-filters--compact .page-toolbar__select {
  min-width: 6.5rem;
}

.sales-report-filters__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.sales-report-filters__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--hex-muted-foreground);
}

.sales-report-filters .page-toolbar__select {
  min-width: 7.5rem;
}

.sales-report-filters--dash {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.sales-report-filters--dash .page-toolbar__select {
  width: 100%;
  min-width: 0;
}

.sales-report-dash {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 12px;
}

.sales-report-dash__period {
  margin: -6px 0 0;
  font-size: 13px;
  color: var(--hex-muted-foreground);
}

.sales-report-dash__filters {
  background: var(--hex-card);
  border: 1px solid var(--hex-border);
  border-radius: var(--radius-lg);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sales-report-dash__filters .page-toolbar__search {
  width: 100%;
  flex: none;
  height: var(--field-h);
  min-height: var(--field-h);
  max-height: var(--field-h);
  box-sizing: border-box;
  align-self: stretch;
}

.sales-report-dash__filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.sales-report-dash__kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.sales-report-kpi {
  background: var(--hex-card);
  border: 1px solid var(--hex-border);
  border-radius: var(--radius-lg);
  padding: 14px 12px;
}

.sales-report-kpi__label {
  margin: 0;
  font-size: 12px;
  color: var(--hex-muted-foreground);
}

.sales-report-kpi__value {
  margin: 6px 0 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--hex-foreground);
  letter-spacing: -0.02em;
}

.sales-report-kpi__delta {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
}

.sales-report-kpi__delta.is-up {
  color: var(--hex-success, #1a9d6c);
}

.sales-report-kpi__delta.is-down {
  color: var(--hex-danger, #c4453c);
}

.sales-report-dash__charts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.sales-report-dash__chart-card,
.sales-report-dash__table-card {
  background: var(--hex-card);
  border: 1px solid var(--hex-border);
  border-radius: var(--radius-lg);
  padding: 12px;
}

.sales-report-dash__chart-card h3,
.sales-report-dash__table-title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
}

.sales-report-dash__svg {
  width: 100%;
  height: auto;
  display: block;
}

.sales-report-dash__chart-label {
  font-size: 10px;
  fill: var(--hex-muted-foreground);
}

.sales-report-dash__donut {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sales-report-dash__donut-svg {
  width: 112px;
  height: 112px;
  flex-shrink: 0;
}

.sales-report-dash__legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.sales-report-dash__legend li {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}

.sales-report-dash__swatch {
  width: 10px;
  height: 10px;
  border-radius: 99px;
}

.sales-report-dash__empty {
  margin: 0;
  padding: 16px 8px;
  text-align: center;
  color: var(--hex-muted-foreground);
  font-size: 13px;
}

.sales-report-dash__table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.sales-report-dash__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  min-width: 560px;
}

.sales-report-dash__table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--hex-muted-foreground);
  background: var(--hex-secondary);
  padding: 8px 8px;
  white-space: nowrap;
}

.sales-report-dash__table td {
  padding: 8px;
  border-bottom: 1px solid var(--hex-border);
  vertical-align: middle;
}

.sales-report-dash__table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.sales-report-dash__cell-product {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 140px;
}

.sales-report-dash__thumb,
.sales-report-dash__avatar {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--hex-secondary);
  flex-shrink: 0;
}

.sales-report-dash__more {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 8px;
  border: 0;
  background: transparent;
  color: var(--hex-primary);
  font-weight: 700;
  font-size: 13px;
}

@media (min-width: 768px) {
  .sales-report-filters--dash {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .sales-report-dash__kpis {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .sales-report-dash__charts {
    grid-template-columns: 1.3fr 1fr;
  }

  .sales-report-kpi__value {
    font-size: 20px;
  }
}

.sales-report-summary {
  padding: 12px 14px;
  border: 1px solid var(--hex-border);
  border-radius: 12px;
  background: var(--hex-card);
}

.sales-report-summary__period {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--hex-muted-foreground);
}

.sales-report-summary__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.sales-report-summary__stat {
  min-width: 0;
}

.sales-report-summary__stat dt {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--hex-muted-foreground);
}

.sales-report-summary__stat dd {
  margin: 2px 0 0;
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--hex-foreground);
}

.sales-report-summary__value--debt {
  color: var(--hex-destructive, #dc2626);
}

.sales-report-customer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sales-report-customer__name {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--hex-foreground);
}

.sales-report-customer__meta {
  margin: 2px 0 0;
  font-size: 12px;
  line-height: 1.35;
  color: var(--hex-muted-foreground);
}

.sales-report-customer__main {
  min-width: 0;
  flex: 1;
}

.sales-report-customer__amounts {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}

.sales-report-customer__sales {
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--hex-foreground);
}

.sales-report-customer__debt {
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .sales-report-summary__stats {
    gap: 6px;
  }

  .sales-report-summary__stat dd {
    font-size: 14px;
  }
}

.sales-report-emp {
  border: 1px solid var(--hex-border);
  border-radius: 12px;
  background: var(--hex-card, #fff);
  overflow: hidden;
}

.sales-report-emp__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--hex-border);
  background: color-mix(in srgb, var(--hex-secondary) 55%, transparent);
}

.sales-report-emp__name {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.sales-report-emp__totals {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-size: 12px;
  font-weight: 600;
}

.sales-report-emp__totals b {
  font-size: 15px;
}

.sales-report-emp .line-list {
  padding: 0 14px;
}

.sales-report-emp .line-list__row {
  padding-left: 0;
  padding-right: 0;
}

.sales-report-tabs {
  justify-content: center;
}

.sales-report-product {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sales-report-product__main {
  flex: 1;
  min-width: 0;
}

.sales-report-product__name {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sales-report-product__meta {
  font-size: 12px;
  color: var(--hex-muted-foreground);
  margin-top: 2px;
}

.sales-report-product__amounts {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
  gap: 2px;
}

.sales-report-product__sales {
  font-size: 14px;
  font-weight: 700;
}

.sales-report-product__profit {
  font-size: 12px;
  font-weight: 500;
}

.sales-report-product-summary {
  background: var(--hex-card);
  border: 1px solid var(--hex-border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
}

.line-list {
  display: flex;
  flex-direction: column;
}

.line-list--scroll {
  max-height: 55vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 1023px) {
  .app-shell--bottom-nav .line-list--scroll {
    max-height: none;
    overflow: visible;
  }
}

.line-list__row {
  display: block;
  width: 100%;
  padding: 12px 0;
  border: none;
  border-bottom: 1px solid var(--hex-border);
  border-radius: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: none !important;
  transition: background 0.15s ease;
}

.line-list__row:last-child {
  border-bottom: none;
}

.line-list__row:hover,
.line-list__row:focus-visible {
  background: var(--hex-secondary);
}

.line-list__row:active:not(:disabled) {
  background: color-mix(in srgb, var(--hex-primary) 10%, var(--hex-secondary));
}

.line-list__row--new {
  background: #c5e9ef;
  box-shadow: inset 3px 0 0 var(--hex-primary);
}

.line-list__row--new:hover,
.line-list__row--new:focus-visible {
  background: #b5e2ea;
}

.line-list__row--new:active:not(:disabled) {
  background: #a6d9e3;
}

.line-list__row--static {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: default;
}

.line-list__row--static:hover {
  background: transparent;
}

.line-list__main {
  min-width: 0;
  flex: 1;
}

.line-list__title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.line-list__title {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-list__amount {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.line-list__meta {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--hex-muted-foreground);
}

.worker-orders-panel {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.worker-order-row {
  display: block;
  padding: 14px 16px;
  cursor: pointer;
}

.worker-order-row:hover,
.worker-order-row:focus-visible {
  background: color-mix(in srgb, var(--hex-secondary) 55%, transparent);
  outline: none;
}

.worker-order-row .line-list__title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.worker-order-row .line-list__title {
  min-width: 0;
  flex: 1 1 auto;
}

.worker-order-row .line-list__amount {
  margin-left: auto;
  flex-shrink: 0;
}

.worker-order-cancel-btn {
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 2px;
  padding: 7px 10px;
  border: 1px solid color-mix(in srgb, #dc2626 28%, var(--hex-border));
  border-radius: 9px;
  background: color-mix(in srgb, #dc2626 8%, var(--hex-card));
  color: #b91c1c;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}

.worker-order-cancel-btn:hover,
.worker-order-cancel-btn:focus-visible {
  background: color-mix(in srgb, #dc2626 16%, var(--hex-card));
  outline: none;
}

.worker-order-cancel-btn:active {
  background: color-mix(in srgb, #dc2626 22%, var(--hex-card));
}

.worker-order-cancel-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.worker-order-cancel-btn--block {
  width: 100%;
  text-align: center;
  padding: 11px 12px;
  font-size: 13px;
}

.receipt-edit-actions {
  display: flex;
  margin-top: 2px;
}

.worker-orders-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px 0 12px;
}

.worker-orders-filters__chip {
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  background: var(--hex-secondary);
  color: var(--hex-foreground);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.worker-orders-filters__chip.is-active {
  background: var(--hex-primary);
  color: var(--hex-primary-foreground);
}

.worker-orders-filters__chip.is-disabled,
.worker-orders-filters__chip.is-disabled:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.report-date-filters {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid var(--hex-border);
  border-radius: 12px;
  background: var(--hex-card);
}

.report-date-filters__hint {
  grid-column: 1 / -1;
  font-size: 12px;
  color: var(--hex-muted-foreground);
}

.payment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 10px;
  align-items: center;
}

.payment-row__main {
  min-width: 0;
}

.payment-row__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.payment-row__customer {
  font-weight: 600;
}

.payment-row__actions {
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 767px) {
  .payment-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "main amount"
      "status actions";
  }

  .payment-row__main {
    grid-area: main;
  }

  .payment-row > .line-list__amount {
    grid-area: amount;
    text-align: right;
  }

  .payment-row > .text-sm {
    grid-area: status;
  }

  .payment-row__actions {
    grid-area: actions;
  }
}

.perm-panel {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--hex-border);
}

.perm-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.perm-panel__title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.perm-panel__reset {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.perm-panel__hint {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--hex-muted-foreground);
}

.perm-group {
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid var(--hex-border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--hex-secondary) 45%, var(--hex-card));
}

.perm-group:last-child {
  margin-bottom: 0;
}

.perm-group__title {
  padding: 0;
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--hex-muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.perm-group__items {
  display: grid;
  gap: 6px;
}

.perm-group .perm-matrix-wrap {
  margin: 0;
  background: var(--hex-card);
}

.perm-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  line-height: 1.35;
  cursor: pointer;
}

.perm-check input {
  margin-top: 2px;
  flex-shrink: 0;
}

.perm-matrix-wrap {
  border: 1px solid var(--hex-border);
  border-radius: 12px;
  background: var(--hex-card);
  overflow: visible;
}

.perm-matrix {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.perm-matrix__row--head {
  display: none;
}

.perm-matrix__row {
  padding: 12px 14px;
  border-bottom: 1px solid var(--hex-border);
}

.perm-matrix__row:last-child {
  border-bottom: none;
}

.perm-matrix__module {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--hex-foreground);
}

.perm-matrix__cells {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.perm-matrix__cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--hex-secondary) 72%, var(--hex-card));
}

.perm-matrix__cell--na {
  justify-content: space-between;
  opacity: 0.55;
}

.perm-matrix__action-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--hex-muted-foreground);
  white-space: nowrap;
}

.perm-matrix__na {
  font-size: 14px;
  font-weight: 700;
  color: var(--hex-muted-foreground);
}

.perm-toggle {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.perm-toggle input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.perm-toggle__track {
  display: block;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: color-mix(
    in srgb,
    var(--hex-muted-foreground) 28%,
    var(--hex-border)
  );
  position: relative;
  transition: background 0.2s ease;
}

.perm-toggle input:checked + .perm-toggle__track {
  background: var(--hex-primary);
}

.perm-toggle input:focus-visible + .perm-toggle__track {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--hex-primary) 28%, transparent);
}

.perm-toggle__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.18);
  transition: transform 0.2s ease;
}

.perm-toggle input:checked + .perm-toggle__track .perm-toggle__thumb {
  transform: translateX(18px);
}

.perm-toggle--sm .perm-toggle__track {
  width: 36px;
  height: 22px;
}

.perm-toggle--sm .perm-toggle__thumb {
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
}

.perm-toggle--sm input:checked + .perm-toggle__track .perm-toggle__thumb {
  transform: translateX(14px);
}

.perm-toggle.is-disabled {
  opacity: 0.72;
}

.perm-toggle input:disabled {
  cursor: not-allowed;
}

.perm-toggle input:disabled + .perm-toggle__track {
  opacity: 0.42;
  background: color-mix(
    in srgb,
    var(--hex-muted-foreground) 18%,
    var(--hex-border)
  );
}

.perm-matrix__cell--disabled .perm-matrix__action-label {
  opacity: 0.55;
}

.perm-grant-page {
  overflow-anchor: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.perm-grant-employees {
  padding: 12px 14px;
  border: 1px solid var(--hex-border);
  border-radius: 12px;
  background: var(--hex-card);
}

.perm-grant-employees__label {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--hex-muted-foreground);
}

.perm-grant-employees__meta {
  margin: 8px 0 0;
}

.perm-grant-employees .wh-receipt-picker {
  width: 100%;
}

.perm-grant-pct {
  padding: 12px 14px;
  border: 1px solid var(--hex-border);
  border-radius: 12px;
  background: var(--hex-card);
}

.perm-grant-pct__label {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--hex-muted-foreground);
}

.perm-grant-pct__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}

.perm-grant-pct__text {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13px;
  line-height: 1.35;
  color: var(--hex-foreground);
}

.employee-form .perm-matrix-wrap {
  max-height: min(42vh, 360px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.perm-grant-page .perm-matrix-wrap {
  max-height: none;
  overflow: visible;
}

@media (min-width: 768px) {
  .perm-matrix-wrap {
    overflow: auto;
    max-height: min(62vh, 520px);
    -webkit-overflow-scrolling: touch;
  }

  .perm-grant-page .perm-matrix-wrap {
    overflow: visible;
    max-height: none;
  }

  .perm-grant-page .perm-matrix__row--head,
  .perm-grant-page .perm-matrix__row:not(.perm-matrix__row--head) {
    grid-template-columns: minmax(108px, 1.5fr) repeat(4, minmax(64px, 1fr));
    gap: 6px 8px;
    padding: 8px 12px;
  }

  .perm-grant-page .perm-matrix__module {
    font-size: 12px;
    line-height: 1.3;
  }

  .perm-grant-page .perm-toggle__track {
    width: 40px;
    height: 24px;
  }

  .perm-grant-page .perm-toggle__thumb {
    width: 18px;
    height: 18px;
  }

  .perm-grant-page
    .perm-toggle
    input:checked
    + .perm-toggle__track
    .perm-toggle__thumb {
    transform: translateX(16px);
  }

  .perm-matrix__row--head {
    display: grid;
    grid-template-columns: minmax(140px, 1.35fr) repeat(4, minmax(88px, 1fr));
    gap: 8px 12px;
    align-items: center;
    padding: 10px 16px;
    background: color-mix(in srgb, var(--hex-secondary) 88%, var(--hex-card));
    border-bottom: 1px solid var(--hex-border);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--hex-muted-foreground);
  }

  .perm-matrix__head-action {
    text-align: center;
  }

  .perm-matrix__row:not(.perm-matrix__row--head) {
    display: grid;
    grid-template-columns: minmax(140px, 1.35fr) repeat(4, minmax(88px, 1fr));
    gap: 8px 12px;
    align-items: center;
    padding: 10px 16px;
  }

  .perm-matrix__row:not(.perm-matrix__row--head):nth-child(even) {
    background: color-mix(in srgb, var(--hex-secondary) 24%, var(--hex-card));
  }

  .perm-matrix__module {
    margin: 0;
    font-size: 13px;
  }

  .perm-matrix__cells {
    display: contents;
  }

  .perm-matrix__cell {
    justify-content: center;
    padding: 0;
    background: transparent;
    border-radius: 0;
  }

  .perm-matrix__cell--na {
    opacity: 1;
    justify-content: center;
  }

  .perm-matrix__action-label {
    display: none;
  }
}

@media (max-width: 767px) {
  .perm-matrix-wrap {
    max-height: none;
    overflow: visible;
  }

  .perm-grant-page .perm-matrix__row {
    padding: 10px 12px;
  }

  .perm-grant-page .perm-matrix__cells {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .perm-grant-page .perm-matrix__cell {
    padding: 6px 8px;
  }
}

@media (max-width: 380px) {
  .perm-matrix__cells {
    grid-template-columns: 1fr;
  }
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.image-lightbox[hidden] {
  display: none !important;
}

.image-lightbox__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgb(0 0 0 / 0.82);
  cursor: zoom-out;
}

.image-lightbox__frame {
  position: relative;
  z-index: 1;
  max-width: min(96vw, 720px);
  max-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-lightbox__img {
  max-width: 100%;
  max-height: 92vh;
  width: auto;
  height: auto;
  object-fit: contain;
  background: #fff;
  box-shadow: 0 20px 60px rgb(0 0 0 / 0.35);
}

.image-lightbox__close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
}

body.image-lightbox-open {
  overflow: hidden;
}

#app
  img:not(.receipt-logo):not(.boot-screen__logo):not(
    .wh-receipt-sheet__logo
  ):not(.auth-card__logo):not(.tomuda-logo),
#modal img:not(.receipt-logo),
.picker-qty-sheet img,
[data-picker-qty-sheet] img {
  cursor: zoom-in;
}

/* ── Stock-in sheet (Барааны орлого) ── */
.stock-in-sheet {
  --si-primary: var(--hex-primary, #16899a);
  --si-primary-dark: var(--hex-primary-dark, #117d8d);
  --si-danger: var(--hex-danger, #c43c52);
  --si-page: var(--hex-secondary, #f5f7f9);
  --si-card: var(--hex-card, #ffffff);
  --si-ink: var(--hex-foreground, #182032);
  --si-muted: var(--hex-muted-foreground, #687386);
  --si-line: var(--hex-border, #d8dee6);
  --si-pad: clamp(10px, 2.4vw, 16px);
  margin: 0;
  height: 100%;
  max-height: none;
  display: flex;
  flex-direction: column;
  background: var(--si-page);
  overflow: hidden;
}

.app-shell--bottom-nav .stock-in-sheet {
  height: 100%;
  max-height: none;
}

.stock-in-sheet__head {
  flex-shrink: 0;
  background: linear-gradient(
    180deg,
    var(--si-primary) 0%,
    var(--si-primary-dark) 100%
  );
  color: #fff;
  padding: 10px max(var(--si-pad), env(safe-area-inset-right, 0px)) 12px
    max(14px, env(safe-area-inset-left, 0px));
}

.stock-in-sheet__nav {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  margin-bottom: 10px;
}

.stock-in-sheet__back {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
}

.stock-in-sheet__back svg {
  width: 22px;
  height: 22px;
}

.stock-in-sheet__back:active {
  background: rgba(255, 255, 255, 0.12);
}

.stock-in-sheet__title {
  margin: 0;
  font-size: clamp(15px, 4.2vw, 18px);
  font-weight: 800;
  letter-spacing: 0.03em;
  text-align: center;
  line-height: 1.2;
}

.stock-in-sheet__user {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 7.5rem;
  min-width: 0;
}

.stock-in-sheet__avatar,
.stock-in-sheet__avatar.employee-card__avatar,
.stock-in-sheet__avatar.employee-card__avatar-img {
  width: 28px !important;
  height: 28px !important;
  border-radius: 999px !important;
  object-fit: cover;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.stock-in-sheet__user-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
}

.stock-in-sheet__meta {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 10px;
}

.stock-in-sheet__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  width: 100%;
}

.stock-in-sheet__field--half {
  flex: 1 1 0;
  min-width: 0;
}

.stock-in-sheet__field--livestock {
  flex: 1 1 100%;
}

.stock-in-livestock {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.stock-in-livestock__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.88);
}

.stock-in-livestock__item .stock-in-sheet__input {
  width: 100%;
}

@media (max-width: 419px) {
  .stock-in-livestock {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.stock-in-sheet__field > .stock-in-sheet__select,
.stock-in-sheet__field > .stock-in-sheet__input {
  flex: 0 0 auto;
}

.stock-in-sheet__field-label {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.88);
}

.stock-in-sheet__select,
.stock-in-sheet__input {
  box-sizing: border-box;
  display: block;
  width: 100%;
  height: 42px;
  min-height: 42px;
  max-height: 42px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  background-color: #fff;
  color: var(--si-ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  -webkit-appearance: none;
  appearance: none;
}

.stock-in-sheet__select:focus,
.stock-in-sheet__input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.28);
}

select.stock-in-sheet__select {
  min-width: 0;
  max-width: 100%;
  padding-right: 2.25rem;
  cursor: pointer;
  background-image:
    linear-gradient(45deg, transparent 50%, #5b6575 50%),
    linear-gradient(135deg, #5b6575 50%, transparent 50%);
  background-position:
    calc(100% - 1rem) calc(50% - 0.15rem),
    calc(100% - 0.7rem) calc(50% - 0.15rem);
  background-size:
    0.35rem 0.35rem,
    0.35rem 0.35rem;
  background-repeat: no-repeat;
}

input.stock-in-sheet__input {
  padding-right: 12px;
  background-image: none;
}

input.stock-in-sheet__input::placeholder {
  color: #94a3b8;
  font-weight: 600;
}

/* Нийлүүлэгч + Агуулах — global #app select min-height-ийг давах */
.stock-in-sheet__meta .stock-in-sheet__select,
.stock-in-sheet__meta .stock-in-sheet__input {
  height: 42px !important;
  min-height: 42px !important;
  max-height: 42px !important;
  font-size: 13px !important;
  line-height: 1.25 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.stock-in-sheet__meta select.stock-in-sheet__select {
  padding-right: 2.25rem !important;
}

.stock-in-sheet__meta input.stock-in-sheet__input {
  padding-right: 12px !important;
}

.stock-in-sheet__select:disabled {
  color: #334155;
  opacity: 0.98;
}

.stock-in-sheet__select.is-invalid {
  box-shadow: 0 0 0 2px #f5b27a;
}

.stock-in-sheet__field.is-missing .stock-in-sheet__field-label {
  color: #ffd3a8;
}

.stock-in-sheet__hint {
  margin: 0;
  font-size: 10px;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.78);
}

.stock-in-sheet__hint--warn {
  color: #ffd3a8;
  font-weight: 600;
}

.stock-in-sheet__live-hits:empty {
  display: none;
}
.stock-in-sheet__live-hits:not(:empty) {
  display: block;
  flex: 1 1 100%;
  width: 100%;
  min-width: 0;
  margin-top: 4px;
}

.stock-in-search-window {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  min-height: 120px;
  max-height: min(52vh, 420px);
  background: #fff;
  border: 1px solid var(--si-line);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(16, 22, 35, 0.22);
  overflow: hidden;
}

.stock-in-search-window__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  background: var(--si-primary);
  color: #fff;
  flex-shrink: 0;
}

.stock-in-search-window__head p {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
}

.stock-in-search-window__close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.stock-in-search-window__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 6px;
  min-height: 88px;
  max-height: min(44vh, 360px);
  padding: 8px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.stock-in-sheet__scroll > .stock-in-sheet__hits {
  display: flex;
}

.stock-in-sheet__tools {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stock-in-sheet__search-panel {
  position: relative;
  z-index: 8;
  flex-shrink: 0;
  overflow: visible;
  padding: 10px var(--si-pad);
  background: color-mix(in srgb, var(--si-primary) 8%, #ffffff);
  border-bottom: 1px solid var(--si-line);
}

.stock-in-sheet__search-panel .stock-in-sheet__search-label {
  color: var(--si-muted);
}

.stock-in-sheet__search-panel .stock-in-sheet__search-box {
  border: 1px solid var(--si-line);
  box-shadow: 0 2px 8px rgba(16, 22, 35, 0.04);
}

.stock-in-sheet__search-panel .stock-in-sheet__scan-btn {
  background: var(--si-primary);
  color: #fff;
  box-shadow: 0 6px 14px color-mix(in srgb, var(--si-primary) 28%, transparent);
}

.stock-in-sheet__search {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stock-in-sheet__search-label {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.88);
}

.stock-in-sheet__search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 0 6px 0 10px;
  border-radius: 10px;
  background: #fff;
}

.stock-in-sheet__search-ico {
  width: 18px;
  height: 18px;
  color: #64748b;
  flex-shrink: 0;
}

.stock-in-sheet__search-input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--si-ink);
  font-size: 16px;
  font-weight: 600;
  outline: none;
  padding: 10px 0;
  -webkit-appearance: none;
  appearance: none;
}

.stock-in-sheet__search-input::-webkit-search-decoration,
.stock-in-sheet__search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.stock-in-sheet__search-input::placeholder {
  color: #94a3b8;
  font-weight: 500;
}

.stock-in-sheet__search-go {
  border: 0;
  border-radius: 8px;
  background: color-mix(in srgb, var(--si-primary) 10%, #fff);
  color: var(--si-primary);
  font-size: 12px;
  font-weight: 800;
  padding: 8px 10px;
  cursor: pointer;
}

.stock-in-sheet__scan-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: #fff;
  color: var(--si-primary);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.stock-in-sheet__scan-btn svg {
  width: 20px;
  height: 20px;
}

.stock-in-sheet__body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--si-page);
}

.stock-in-sheet__scroll {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 10px var(--si-pad) 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stock-in-sheet__hits {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stock-in-sheet__hits-label {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--si-muted);
}

.stock-in-sheet__hits--miss {
  padding: 12px 14px;
  border: 1px dashed var(--si-line);
  border-radius: 12px;
  background: #fff;
}

.stock-in-sheet__hits-empty {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--si-muted);
}

.stock-in-sheet__hit {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 10px 12px;
  border: 1px solid var(--si-line);
  border-radius: 12px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.stock-in-sheet__hit.is-added {
  border-color: color-mix(in srgb, var(--si-primary) 35%, var(--si-line));
  background: color-mix(in srgb, var(--si-primary) 8%, #ffffff);
}

.stock-in-sheet__hit img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 8px;
  background: #eef2f5;
  flex-shrink: 0;
}

.stock-in-sheet__hit span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.stock-in-sheet__hit b {
  font-size: 13px;
  color: var(--si-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stock-in-sheet__hit small {
  font-size: 11px;
  color: var(--si-muted);
}

.stock-in-sheet__hit-price {
  flex-shrink: 0;
  margin-left: auto;
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
  color: var(--si-primary);
}

.stock-in-sheet__lines {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stock-in-sheet__lines-label {
  display: none;
}

.stock-in-sheet__empty {
  padding: 24px 14px;
  text-align: center;
  font-size: 13px;
  line-height: 1.45;
  color: var(--si-muted);
  border: 1px dashed var(--si-line);
  border-radius: 14px;
  background: #fff;
}

.stock-in-sheet__empty-title {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 800;
  color: var(--si-ink);
}

.stock-in-sheet__empty p {
  margin: 0;
}

.stock-in-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "open icons"
    "chips chips"
    "totals totals";
  gap: 8px 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--si-line);
  border-radius: 12px;
  background: var(--si-card);
}

.stock-in-line--scan {
  border-color: color-mix(in srgb, var(--si-primary) 45%, var(--si-line));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--si-primary) 16%, transparent);
}

.stock-in-line--idle {
  grid-template-areas: "open icons";
  cursor: pointer;
}

.stock-in-line__open {
  grid-area: open;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
  color: inherit;
}

.stock-in-line__img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
  background: #f1f4f7;
  flex-shrink: 0;
}

.stock-in-line__copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stock-in-line__name {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: var(--si-ink);
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stock-in-line__sku {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--si-muted);
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stock-in-line__icons {
  grid-area: icons;
  display: inline-flex;
  gap: 2px;
  flex-shrink: 0;
}

.stock-in-line__icon-btn {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
}

.stock-in-line__icon-btn:hover {
  background: #f1f5f9;
}

.stock-in-line__icon-btn svg {
  width: 16px;
  height: 16px;
}

.stock-in-line__icon-btn--danger {
  color: var(--si-danger);
}

.stock-in-line__chips {
  grid-area: chips;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.stock-in-line__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f3f6f9;
  font-size: 12px;
  color: var(--si-muted);
}

.stock-in-line__chip em {
  font-style: normal;
  font-weight: 600;
}

.stock-in-line__chip b {
  color: var(--si-ink);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.stock-in-line__totals {
  grid-area: totals;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f3f6f9;
}

.stock-in-line__total {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.stock-in-line__total em {
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  color: var(--si-muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.stock-in-line__total b {
  font-size: 13px;
  font-weight: 800;
  color: var(--si-ink);
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stock-in-line__total--price b {
  color: var(--si-primary);
}

/* legacy hooks (unused after tidy layout) */
.stock-in-line__top,
.stock-in-line__qty-list,
.stock-in-line__qty-row,
.stock-in-line__summary,
.stock-in-line__total-pcs {
  display: none;
}

.stock-in-sheet__footer {
  flex-shrink: 0;
  padding: 10px var(--si-pad) calc(10px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid var(--si-line);
  background: transparent;
}

.stock-in-sheet__footer--simple {
  border-top: 0;
  box-shadow: none;
  background: var(--si-page);
}

.stock-in-sheet__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
  font-size: clamp(12px, 3.3vw, 13px);
  color: var(--si-ink);
}

.stock-in-sheet__stats p {
  margin: 0;
}

.stock-in-sheet__stats b {
  font-variant-numeric: tabular-nums;
}

.stock-in-sheet__actions {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.35fr);
  gap: 8px;
}

.stock-in-sheet__btn {
  min-height: 46px;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  font-size: clamp(13px, 3.5vw, 14px);
  font-weight: 800;
  cursor: pointer;
}

.stock-in-sheet__btn--ghost {
  background: #d7dee6;
  color: #243447;
}

.stock-in-sheet__btn--primary {
  background: var(--si-primary);
  color: #fff;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--si-primary) 35%, transparent);
}

.stock-in-sheet__btn--primary.is-disabled {
  opacity: 0.7;
  box-shadow: none;
}

.stock-in-sheet__btn--block {
  width: 100%;
}

.stock-in-sheet__btn:active {
  filter: brightness(0.97);
}

/* Tablet: full width, not a phone mock */
@media (min-width: 720px) and (max-width: 1023px) {
  .stock-in-sheet {
    width: 100%;
    max-width: none;
    margin: 0;
    border-radius: 14px;
    height: calc(100dvh - env(safe-area-inset-top, 0px) - 1rem);
    max-height: none;
    box-shadow: none;
    border: 1px solid var(--si-line);
  }

  .stock-in-sheet__head {
    border-radius: 14px 14px 0 0;
    padding: 12px 16px 14px;
  }

  .stock-in-sheet__title {
    text-align: left;
  }

  .stock-in-sheet__tools {
    flex-direction: row;
    align-items: end;
    gap: 10px;
  }

  .stock-in-sheet__search {
    flex: 1;
    min-width: 0;
  }

  .stock-in-sheet__scan-btn {
    width: auto;
    min-width: 140px;
    flex-shrink: 0;
  }

  .stock-in-sheet__footer {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }

  .stock-in-sheet__stats {
    flex: 1;
  }

  .stock-in-sheet__btn--block {
    width: auto;
    min-width: 220px;
  }
}

/* Desktop/web: proper admin page (not a stretched phone mock) */
@media (min-width: 1024px) {
  .app-shell--stock-in {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
  }

  .app-shell--stock-in .app-main {
    min-height: 0 !important;
    height: 100dvh;
    padding: 20px 24px !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .app-shell--stock-in .app-main__inner {
    flex: 1;
    min-height: 0;
    height: auto;
    max-width: none;
    margin: 0;
    display: flex;
    flex-direction: column;
  }

  .app-shell--stock-in .app-main__inner > .stock-in-sheet {
    flex: 1;
    min-height: 0;
  }

  .stock-in-sheet {
    width: 100%;
    max-width: none;
    margin: 0;
    height: auto;
    max-height: none;
    gap: 14px;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }

  /* Light page header — matches Tomuda admin surfaces */
  .stock-in-sheet__head {
    border-radius: 14px;
    padding: 16px 20px 18px;
    background: var(--si-card);
    color: var(--si-ink);
    border: 1px solid var(--si-line);
    box-shadow: 0 1px 2px rgba(16, 22, 35, 0.04);
  }

  .stock-in-sheet__nav {
    grid-template-columns: 40px minmax(0, 1fr);
    margin-bottom: 14px;
  }

  .stock-in-sheet__user {
    display: none;
  }

  .stock-in-sheet__back {
    color: var(--si-primary);
    background: color-mix(in srgb, var(--si-primary) 10%, #ffffff);
  }

  .stock-in-sheet__back:hover {
    background: color-mix(in srgb, var(--si-primary) 16%, #ffffff);
  }

  .stock-in-sheet__back:active {
    background: color-mix(in srgb, var(--si-primary) 20%, #ffffff);
  }

  .stock-in-sheet__title {
    text-align: left;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-transform: none;
  }

  .stock-in-sheet__meta {
    gap: 14px 16px;
    max-width: 720px;
    margin-bottom: 0;
  }

  .stock-in-sheet__field-label {
    color: var(--si-muted);
    font-size: 12px;
  }

  .stock-in-livestock__item {
    color: var(--si-muted);
    font-size: 12px;
  }

  .stock-in-sheet__meta {
    max-width: none;
  }

  .stock-in-sheet__select,
  .stock-in-sheet__input {
    height: 44px;
    min-height: 44px;
    max-height: 44px;
    font-size: 14px;
    border: 1px solid var(--si-line);
    box-shadow: none;
    line-height: 1.25;
  }

  .stock-in-sheet__meta .stock-in-sheet__select,
  .stock-in-sheet__meta .stock-in-sheet__input {
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    font-size: 14px !important;
  }

  .stock-in-sheet__select:focus,
  .stock-in-sheet__input:focus {
    border-color: var(--si-primary);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--si-primary) 22%, transparent);
  }

  .stock-in-sheet__hint {
    color: var(--si-muted);
  }

  .stock-in-sheet__hint--warn {
    color: #b45309;
  }

  .stock-in-sheet__field.is-missing .stock-in-sheet__field-label {
    color: #b45309;
  }

  .stock-in-sheet__select.is-invalid {
    box-shadow: 0 0 0 2px color-mix(in srgb, #f59e0b 45%, transparent);
  }

  /* Search toolbar card */
  .stock-in-sheet__search-panel {
    padding: 14px 20px;
    background: var(--si-card);
    border: 1px solid var(--si-line);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(16, 22, 35, 0.04);
  }

  .stock-in-sheet__tools {
    flex-wrap: wrap;
    flex-direction: row;
    align-items: end;
    gap: 12px;
  }

  .stock-in-sheet__search {
    flex: 1;
    min-width: 0;
    max-width: 640px;
  }

  .stock-in-sheet__search-label {
    color: var(--si-muted);
  }

  .stock-in-sheet__search-box {
    min-height: 46px;
    border: 1px solid var(--si-line);
    box-shadow: none;
  }

  .stock-in-sheet__scan-btn {
    width: auto;
    min-width: 148px;
    min-height: 46px;
    flex-shrink: 0;
    background: var(--si-primary);
    color: #fff;
    box-shadow: none;
  }

  .stock-in-sheet__scan-btn:hover {
    filter: brightness(1.05);
  }

  .stock-in-sheet__body {
    flex: 1;
    min-height: 0;
    background: transparent;
    gap: 14px;
  }

  .stock-in-sheet__live-hits,
  .stock-in-sheet__live-hits:not(:empty) {
    display: none;
  }

  .stock-in-sheet__scroll > .stock-in-sheet__hits {
    display: flex;
  }

  /* Two-pane workspace: search hits | selected lines */
  .stock-in-sheet__scroll {
    display: grid;
    grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
    gap: 14px;
    padding: 0;
    align-content: stretch;
  }

  .stock-in-sheet__scroll:not(:has(.stock-in-sheet__hits)) {
    grid-template-columns: 1fr;
  }

  .stock-in-sheet__hits,
  .stock-in-sheet__lines,
  .stock-in-sheet__empty {
    min-height: 0;
    max-height: 100%;
    overflow: auto;
    padding: 14px 16px;
    background: var(--si-card);
    border: 1px solid var(--si-line);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(16, 22, 35, 0.04);
  }

  .stock-in-sheet__hits {
    max-width: none;
    gap: 8px;
  }

  .stock-in-sheet__hits-label,
  .stock-in-sheet__lines-label {
    display: block;
    margin: 0 0 4px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--si-line);
    font-size: 13px;
    font-weight: 700;
    color: var(--si-muted);
  }

  .stock-in-sheet__hit {
    transition:
      background 0.15s ease,
      border-color 0.15s ease;
  }

  .stock-in-sheet__hit:hover {
    border-color: color-mix(in srgb, var(--si-primary) 42%, var(--si-line));
    background: color-mix(in srgb, var(--si-primary) 6%, #ffffff);
  }

  .stock-in-sheet__lines {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-content: start;
  }

  .stock-in-sheet__empty {
    display: grid;
    place-content: center;
    text-align: center;
    border-style: solid;
    min-height: 220px;
  }

  .stock-in-line {
    display: grid;
    grid-template-columns: minmax(200px, 1.4fr) auto minmax(220px, 0.9fr) auto;
    grid-template-areas: "open chips totals icons";
    align-items: center;
    gap: 12px 14px;
    padding: 12px 14px;
    border-radius: 12px;
    box-shadow: none;
  }

  .stock-in-line__open {
    min-width: 0;
  }

  .stock-in-line__img {
    width: 48px;
    height: 48px;
  }

  .stock-in-line__name {
    font-size: 15px;
  }

  .stock-in-line__chips {
    justify-content: flex-end;
    flex-wrap: nowrap;
  }

  .stock-in-line__chip {
    background: #eef2f6;
  }

  .stock-in-line__totals {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 8px 12px;
  }

  .stock-in-line__icons {
    align-self: center;
  }

  .stock-in-sheet__footer {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 0;
    padding: 14px 20px;
    background: var(--si-card);
    border: 1px solid var(--si-line);
    border-top: 1px solid var(--si-line);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(16, 22, 35, 0.04);
  }

  .stock-in-sheet__stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, auto));
    gap: 10px 24px;
    font-size: 14px;
  }

  .stock-in-sheet__stats p {
    margin: 0;
    padding: 8px 12px;
    border-radius: 10px;
    background: var(--si-page);
    border: 1px solid var(--si-line);
  }

  .stock-in-sheet__btn {
    min-height: 48px;
    font-size: 15px;
  }

  .stock-in-sheet__btn--block {
    width: auto;
    min-width: 240px;
  }
}

@media (min-width: 1400px) {
  .stock-in-sheet__scroll:has(.stock-in-sheet__hits) {
    grid-template-columns: minmax(340px, 420px) minmax(0, 1fr);
  }

  .stock-in-sheet__meta {
    max-width: 840px;
  }

  .stock-in-line {
    grid-template-columns: minmax(240px, 1.6fr) auto minmax(260px, 0.85fr) auto;
  }
}

.stock-in-employee {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stock-in-employee__label {
  font-size: 13px;
  font-weight: 700;
  color: var(--hex-muted-foreground);
}

.stock-in-employee--readonly .stock-in-employee__value {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--hex-border);
  border-radius: 10px;
  background: var(--hex-secondary);
  font-size: 14px;
  font-weight: 600;
  color: var(--hex-foreground);
}

.line-list__row--stock-report {
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding-right: 8px;
}

.line-list__row--stock-report .line-list__row-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 4px 12px 12px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.line-list__row--stock-report > .btn {
  align-self: center;
  flex-shrink: 0;
}

.line-list--stock-products {
  padding-top: 0;
}

.line-panel--stock-products .line-panel__section-title {
  margin-bottom: 0;
}

.stock-report-products-table {
  --stock-report-col-qty: 4.75rem;
  --stock-report-col-amount: 6.75rem;
}

.stock-report-products-head,
.stock-report-product-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--stock-report-col-qty) var(
      --stock-report-col-amount
    );
  align-items: center;
  column-gap: 12px;
}

.line-list__row--static.stock-report-product-row,
.line-list__row--static.stock-report-line-row {
  display: grid;
  justify-content: initial;
  cursor: default;
}

.line-list__row--static.stock-report-line-row:hover,
.line-list__row--static.stock-report-product-row:hover {
  background: color-mix(in srgb, var(--hex-secondary) 45%, transparent);
}

.stock-report-products-head {
  padding: 6px 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--hex-muted-foreground);
  border-bottom: 1px solid var(--hex-border);
}

.stock-report-products-head__qty,
.stock-report-products-head__amount {
  text-align: right;
}

.stock-report-product-row {
  padding: 11px 0;
}

.stock-report-product-row__main {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.stock-report-product-row__index {
  flex-shrink: 0;
  min-width: 1.35rem;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: color-mix(
    in srgb,
    var(--hex-muted-foreground) 70%,
    var(--hex-foreground)
  );
  line-height: 1.35;
  padding-top: 1px;
  text-align: right;
}

.stock-report-product-row__copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stock-report-product-row__name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--hex-foreground);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.stock-report-product-row__barcode {
  font-size: 12px;
  line-height: 1.25;
  color: var(--hex-muted-foreground);
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stock-report-product-row__qty {
  text-align: right;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--hex-foreground);
  white-space: nowrap;
  line-height: 1.2;
}

.stock-report-product-row__unit {
  margin-left: 3px;
  font-size: 11px;
  font-weight: 500;
  color: var(--hex-muted-foreground);
}

.stock-report-product-row__amount {
  text-align: right;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--hex-foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

@media (min-width: 640px) {
  .stock-report-products-table {
    --stock-report-col-qty: 5.25rem;
    --stock-report-col-amount: 7.25rem;
  }

  .stock-report-product-row {
    padding: 12px 0;
  }
}

@media (max-width: 420px) {
  .stock-report-products-table {
    --stock-report-col-qty: 4.25rem;
    --stock-report-col-amount: 5.75rem;
  }

  .stock-report-product-row__amount {
    font-size: 13px;
  }
}

.stock-report-mode-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--hex-border);
}

.stock-report-mode-filters__chip {
  padding: 7px 12px;
  border: 1px solid var(--hex-border);
  border-radius: 999px;
  background: var(--hex-card);
  color: var(--hex-muted-foreground);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.stock-report-mode-filters__chip.is-active {
  border-color: color-mix(in srgb, var(--hex-primary) 35%, var(--hex-border));
  background: color-mix(in srgb, var(--hex-primary) 10%, var(--hex-card));
  color: var(--hex-primary);
}

.line-list--stock-lines {
  padding-top: 0;
}

.stock-report-lines-table {
  --stock-report-col-qty: 4.25rem;
  --stock-report-col-amount: 6.5rem;
}

.stock-report-lines-head,
.stock-report-line-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--stock-report-col-qty) var(
      --stock-report-col-amount
    );
  align-items: center;
  column-gap: 10px;
}

.stock-report-lines-head {
  padding: 8px 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--hex-muted-foreground);
  border-bottom: 1px solid var(--hex-border);
}

.stock-report-lines-head__qty,
.stock-report-lines-head__amount {
  text-align: right;
}

.stock-report-line-row {
  padding: 9px 0;
  border-bottom: 1px solid
    color-mix(in srgb, var(--hex-border) 65%, transparent);
}

.stock-report-line-row:last-child {
  border-bottom: none;
}

.stock-report-line-row__main {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.stock-report-line-row__index {
  flex-shrink: 0;
  min-width: 1.35rem;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: color-mix(
    in srgb,
    var(--hex-muted-foreground) 70%,
    var(--hex-foreground)
  );
  line-height: 1.35;
  padding-top: 1px;
  text-align: right;
}

.stock-report-line-row__copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stock-report-line-row__name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--hex-foreground);
}

.stock-report-line-row__barcode {
  font-size: 12px;
  line-height: 1.25;
  color: var(--hex-muted-foreground);
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stock-report-line-row__meta {
  margin: 2px 0 0;
  font-size: 12px;
  line-height: 1.35;
}

.stock-report-line-row__qty {
  text-align: right;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--hex-foreground);
  white-space: nowrap;
}

.stock-report-line-row__unit {
  margin-left: 1px;
  font-size: 11px;
  font-weight: 500;
  color: var(--hex-muted-foreground);
}

.stock-report-line-row__amount {
  text-align: right;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--hex-foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

@media (min-width: 640px) {
  .stock-report-lines-table {
    --stock-report-col-qty: 4.75rem;
    --stock-report-col-amount: 7rem;
  }
}

@media (max-width: 420px) {
  .stock-report-lines-table {
    --stock-report-col-qty: 3.75rem;
    --stock-report-col-amount: 5.75rem;
  }

  .stock-report-line-row__amount {
    font-size: 13px;
  }
}

.stock-report-unified-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stock-report-receipt-block {
  border: 1px solid var(--hex-border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--hex-card);
}

.stock-report-receipt-block__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--hex-border);
  background: color-mix(in srgb, var(--hex-secondary) 28%, var(--hex-card));
}

.stock-report-receipt-block__main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.stock-report-receipt-block__main:hover {
  opacity: 0.92;
}

.stock-report-receipt-block__info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stock-report-receipt-block__no {
  font-size: 15px;
  font-weight: 700;
  color: var(--hex-foreground);
  line-height: 1.2;
}

.stock-report-receipt-block__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
}

.stock-report-receipt-block__chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.3;
  color: var(--hex-muted-foreground);
  background: color-mix(in srgb, var(--hex-secondary) 55%, transparent);
  border: 1px solid color-mix(in srgb, var(--hex-border) 80%, transparent);
}

.stock-report-receipt-block__total {
  flex-shrink: 0;
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--hex-foreground);
  white-space: nowrap;
}

.stock-report-receipt-block__excel {
  flex-shrink: 0;
}

.stock-report-receipt-block__lines {
  padding: 2px 12px 4px;
}

.stock-report-receipt-block__lines .stock-report-lines-head {
  margin-top: 0;
  padding-top: 6px;
}

.stock-report-receipt-block__empty {
  margin: 0;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--hex-muted-foreground);
}

.stock-in-scan {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--hex-border);
  border-radius: 14px;
  background: var(--hex-card);
}

.stock-in-scan__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stock-in-scan__label {
  font-size: 12px;
  font-weight: 700;
  color: var(--hex-muted-foreground);
}

.stock-in-scan__input {
  flex: 1;
  min-width: 0;
  pointer-events: auto !important;
  -webkit-user-select: text !important;
  user-select: text !important;
  touch-action: manipulation;
}

.stock-in-scan__btn {
  flex-shrink: 0;
  white-space: nowrap;
}

.stock-in-scan__hint {
  margin: 0;
  font-size: 12px;
  color: var(--hex-muted-foreground);
  line-height: 1.35;
}

.stock-in-entry-row--scan {
  background: color-mix(in srgb, var(--hex-primary) 10%, var(--hex-card));
  box-shadow: inset 0 0 0 2px
    color-mix(in srgb, var(--hex-primary) 35%, transparent);
}

.stock-in-pack-preview {
  margin: 8px 0 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--hex-primary-dark);
  line-height: 1.25;
  min-height: 1.25em;
}

.stock-in-pack-preview--spacer {
  visibility: hidden;
}

.stock-in-qty-total {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--hex-foreground);
  min-height: 1.2em;
}

.stock-in-qty-fields {
  margin-bottom: 2px;
}

.modal-panel.stock-in-take-modal {
  display: flex;
  flex-direction: column;
  max-height: min(92dvh, 760px);
  height: min(92dvh, 760px);
  overflow: hidden;
}

.modal-panel.stock-in-take-modal .modal-panel__head {
  flex-shrink: 0;
  padding: 12px 14px;
  background: var(--hex-primary);
  border-bottom: none;
  color: var(--hex-primary-foreground);
}

.modal-panel.stock-in-take-modal .modal-panel__title {
  color: var(--hex-primary-foreground);
  font-weight: 800;
}

.modal-panel.stock-in-take-modal .modal-close {
  background: color-mix(in srgb, #fff 18%, transparent);
  color: var(--hex-primary-foreground);
  border: none;
}

.stock-in-take {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  gap: 10px;
  padding: 12px 12px max(14px, env(safe-area-inset-bottom, 0px));
  background: var(--hex-background);
  overflow: hidden;
}

.stock-in-take__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}

.stock-in-take__product {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  background: var(--hex-card);
  border: 1px solid var(--hex-border);
}

.stock-in-take__thumb {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 10px;
  background: var(--hex-secondary);
}

.stock-in-take__product-text {
  min-width: 0;
  flex: 1;
}

.stock-in-take__name {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--hex-foreground);
}

.stock-in-take__price {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.35;
  color: var(--hex-muted-foreground);
}

.stock-in-take__price b {
  color: var(--hex-primary);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.stock-in-take__rule {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.35;
  color: var(--hex-muted-foreground);
}

.stock-in-take__rule b {
  color: var(--hex-foreground);
  font-weight: 700;
}

.stock-in-take__rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stock-in-take__row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 10px;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--hex-card);
  border: 1px solid var(--hex-border);
}

.stock-in-take__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-width: 0;
  text-align: center;
}

.stock-in-take__label {
  font-size: 13px;
  font-weight: 700;
  color: var(--hex-foreground);
  line-height: 1.1;
}

.stock-in-take__hint {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--hex-primary);
}

.stock-in-take__hint:empty {
  display: none;
}

.stock-in-take__row--accent {
  background: color-mix(in srgb, var(--hex-primary-soft) 70%, var(--hex-card));
  border-color: color-mix(in srgb, var(--hex-primary) 28%, var(--hex-border));
}

.stock-in-take__icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--hex-primary-soft);
  color: var(--hex-primary);
  flex-shrink: 0;
}

.stock-in-take__svg {
  width: 20px;
  height: 20px;
}

.stock-in-take__control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 96px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--hex-border);
  background: var(--hex-card);
}

.stock-in-take__row--accent .stock-in-take__control {
  background: color-mix(in srgb, var(--hex-primary-soft) 55%, #fff);
  border-color: color-mix(in srgb, var(--hex-primary) 30%, var(--hex-border));
}

.stock-in-take__input {
  width: 64px;
  border: none;
  outline: none;
  background: transparent;
  text-align: right;
  font-size: 16px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--hex-foreground);
}

.stock-in-take__input--accent {
  color: var(--hex-primary-dark);
}

.stock-in-take__input--soft {
  color: var(--hex-muted-foreground);
  font-weight: 600;
}

.stock-in-take__input--soft::placeholder {
  color: color-mix(in srgb, var(--hex-muted-foreground) 88%, transparent);
  opacity: 1;
}

.stock-in-take__note {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--hex-card);
  border: 1px solid var(--hex-border);
}

.stock-in-take__note-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--hex-foreground);
}

.stock-in-take__note-input {
  width: 100%;
  min-height: 40px;
  max-height: 88px;
  resize: vertical;
  border: none;
  outline: none;
  background: transparent;
  color: var(--hex-foreground);
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
}

.stock-in-take__note-input::placeholder {
  color: var(--hex-muted-foreground);
}

.stock-in-take__suffix {
  font-size: 13px;
  font-weight: 700;
  color: var(--hex-muted-foreground);
}

.stock-in-take__warn {
  margin: 0;
}

.stock-in-take__total {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 14px 12px;
  border-radius: 14px;
  background: var(--hex-card);
  border: 1px solid var(--hex-border);
}

.stock-in-take__total-label {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--hex-foreground);
}

.stock-in-take__total-value {
  font-size: 16px;
  font-weight: 800;
  color: var(--hex-primary);
  font-variant-numeric: tabular-nums;
}

.stock-in-take__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
  width: 100%;
  min-height: 48px;
  border: none;
  border-radius: 12px;
  background: var(--hex-primary);
  color: var(--hex-primary-foreground);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  position: relative;
  z-index: 2;
}

@media (max-width: 639px) {
  .modal-panel.stock-in-take-modal {
    max-height: var(--sheet-max-h, 92dvh) !important;
    height: var(--sheet-max-h, 92dvh) !important;
  }
}

.stock-in-take__submit .stock-in-take__svg {
  width: 22px;
  height: 22px;
}

.stock-in-take__submit:active {
  background: var(--hex-primary-dark);
}

.stock-in-take__submit--danger {
  background: var(--hex-destructive, #dc2626);
}

.stock-in-take__submit--danger:active {
  background: color-mix(in srgb, var(--hex-destructive, #dc2626) 88%, #000);
}

.stock-in-receipt-panel {
  overflow: hidden;
  border: 1px solid var(--hex-border);
  border-radius: 16px;
  background: var(--hex-card);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.stock-in-receipt-panel__head {
  padding: 16px 18px;
  border-bottom: 1px solid var(--hex-border);
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--hex-primary) 7%, var(--hex-card)) 0%,
    var(--hex-card) 100%
  );
}

.stock-in-receipt-panel__title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--hex-foreground);
}

.stock-in-receipt-panel__sub {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.35;
  color: var(--hex-muted-foreground);
}

.stock-in-receipt-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
}

.stock-in-receipt-cat {
  padding: 8px 18px;
  background: color-mix(in srgb, var(--hex-secondary) 55%, var(--hex-card));
  border-bottom: 1px solid var(--hex-border);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--hex-foreground);
}

.stock-in-receipt-line {
  display: grid;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--hex-border);
}

.stock-in-receipt-line__name {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--hex-foreground);
}

.stock-in-receipt-line__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-top: 6px;
}

.stock-in-receipt-line__barcode {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--hex-muted-foreground);
  letter-spacing: 0.01em;
}

.stock-in-pack {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}

.stock-in-pack-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--hex-secondary) 80%, var(--hex-card));
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--hex-foreground);
  white-space: nowrap;
}

.stock-in-pack-chip--empty {
  background: transparent;
  color: var(--hex-muted-foreground);
  font-weight: 500;
  padding-inline: 0;
}

.stock-in-receipt-line__qty {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--hex-primary) 12%, var(--hex-card));
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--hex-primary);
  white-space: nowrap;
}

.stock-in-receipt-line__prices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 8px;
}

.stock-in-receipt-line__price {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--hex-secondary) 40%, var(--hex-card));
}

.stock-in-receipt-line__price--total {
  background: color-mix(in srgb, var(--hex-primary) 10%, var(--hex-card));
}

.stock-in-receipt-line__price-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--hex-muted-foreground);
}

.stock-in-receipt-line__price-value {
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--hex-foreground);
  white-space: nowrap;
}

.stock-in-receipt-line__price--total .stock-in-receipt-line__price-value {
  color: var(--hex-primary);
}

.stock-in-receipt-subtotal,
.stock-in-receipt-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 18px;
}

.stock-in-receipt-subtotal {
  border-bottom: 1px solid var(--hex-border);
  background: color-mix(in srgb, var(--hex-secondary) 28%, var(--hex-card));
}

.stock-in-receipt-total {
  border-top: 1px solid var(--hex-border);
  background: color-mix(in srgb, var(--hex-primary) 6%, var(--hex-card));
  padding-block: 14px;
}

.stock-in-receipt-subtotal__label,
.stock-in-receipt-total__label {
  font-size: 13px;
  font-weight: 700;
  color: var(--hex-muted-foreground);
}

.stock-in-receipt-subtotal__value,
.stock-in-receipt-total__value {
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--hex-foreground);
}

.stock-in-receipt-total__value {
  font-size: 17px;
  color: var(--hex-primary);
}

.stock-in-receipt-panel__signatures {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border-top: 1px solid var(--hex-border);
  font-size: 13px;
  line-height: 1.45;
}

.stock-in-receipt-panel__foot {
  padding: 14px 16px max(20px, calc(12px + env(safe-area-inset-bottom, 0px)));
  border-top: 1px solid var(--hex-border);
  background: var(--hex-card);
}

.stock-in-receipt-doc--bm2 {
  border: 1px solid var(--hex-border);
  max-width: 210mm;
  margin: 0 auto;
  background: #fff;
}

.stock-in-receipt-doc__form-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px 0;
  align-items: flex-start;
}

.stock-in-receipt-doc__form-legal {
  font-size: 9px;
  line-height: 1.35;
  color: #64748b;
  text-align: left;
  max-width: 55%;
  flex: 1 1 auto;
}

.stock-in-receipt-doc__form-code {
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  margin-left: auto;
  flex-shrink: 0;
}

.stock-in-receipt-doc__head {
  padding: 0;
  border-bottom: 1px solid var(--hex-border);
}

.stock-in-receipt-doc__title {
  margin: 0;
  padding: 8px 16px 4px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.25;
  text-align: center;
  color: var(--hex-foreground);
  background: transparent;
}

.stock-in-receipt-doc__date {
  margin: 0;
  padding: 0 16px 10px;
  text-align: center;
  font-size: 12px;
}

.stock-in-receipt-doc__party-block {
  padding: 0 16px 12px;
  display: grid;
  gap: 0;
}

.stock-in-receipt-doc__party-value-line {
  margin: 0;
  border-bottom: 1px solid #000;
  padding-bottom: 3px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.stock-in-receipt-doc__party-caption {
  display: block;
  margin: 2px 0 10px;
  font-size: 10px;
  color: var(--hex-muted-foreground);
  font-weight: 400;
  text-align: left;
}

.stock-in-receipt-doc__table-wrap {
  overflow-x: auto;
  padding: 0;
}

.stock-in-receipt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.stock-in-receipt-table th,
.stock-in-receipt-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--hex-border);
  vertical-align: middle;
}

.stock-in-receipt-table th {
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  color: #475569;
  background: #e2e8f0;
  white-space: nowrap;
  border-color: #e2e8f0;
}

.stock-in-receipt-table__no {
  width: 2.5rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: var(--hex-muted-foreground);
}

.stock-in-receipt-table__name {
  min-width: 8rem;
  font-weight: 600;
}

.stock-in-receipt-table__barcode {
  font-variant-numeric: tabular-nums;
  color: var(--hex-muted-foreground);
  white-space: nowrap;
  text-align: center;
}

.stock-in-receipt-table__qty {
  text-align: center;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.stock-in-receipt-table__unit,
.stock-in-receipt-table__total {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.stock-in-receipt-table__total-row td {
  border-top: 1px solid #94a3b8;
  background: color-mix(in srgb, var(--hex-secondary) 25%, var(--hex-card));
}

.stock-in-receipt-table--bm2 th,
.stock-in-receipt-table--bm2 td {
  border: 1px solid #000;
  padding: 6px 8px;
}

.stock-in-receipt-table--bm2 th {
  background: #fff;
  color: #000;
}

.stock-in-receipt-table--bm2 .stock-in-receipt-table__unit,
.stock-in-receipt-table--bm2 .stock-in-receipt-table__total {
  padding-right: 10px;
}

@media print {
  .stock-in-receipt-doc--bm2 {
    max-width: 210mm;
    border: none;
    box-shadow: none;
  }

  .stock-in-receipt-doc__party-value-line,
  .stock-in-sign--bm2 .stock-in-sign__line {
    border-bottom: 1px solid #000 !important;
  }

  .stock-in-receipt-panel__foot {
    display: none !important;
  }
}

.stock-in-receipt-table__measure {
  text-align: center;
  white-space: nowrap;
}

.stock-in-receipt-doc__signatures--bm2 {
  padding: 16px 16px 12px;
  border-top: 1px solid var(--hex-border);
  display: grid;
  gap: 10px;
}

.stock-in-sign--bm2 {
  grid-template-columns: minmax(7rem, max-content) 1fr;
}

.stock-in-sign--bm2 .stock-in-sign__line {
  min-height: 1.1em;
  border-bottom: 1px solid #000;
}

.stock-in-report-list-wrap {
  overflow-x: auto;
}

.stock-in-report-list {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.stock-in-report-list th,
.stock-in-report-list td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--hex-border);
  vertical-align: middle;
  text-align: left;
}

.stock-in-report-list th {
  font-size: 12px;
  font-weight: 700;
  color: var(--hex-muted-foreground);
  background: color-mix(in srgb, var(--hex-secondary) 45%, var(--hex-card));
  white-space: nowrap;
}

.stock-in-report-list__row {
  cursor: pointer;
  transition: background 0.12s ease;
}

.stock-in-report-list__row:hover,
.stock-in-report-list__row:focus-visible {
  background: color-mix(in srgb, var(--hex-primary) 6%, var(--hex-card));
  outline: none;
}

.stock-in-report-list__num,
.stock-in-report-list__amount {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.stock-in-report-list__amount {
  font-weight: 700;
}

.stock-in-report-list__summary {
  padding: 14px 4px 6px;
  display: grid;
  gap: 4px;
}

.stock-in-report-list__summary p {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
}

.stock-in-report-list__summary span {
  color: var(--hex-muted-foreground);
}

@media (max-width: 640px) {
  .stock-in-receipt-table,
  .stock-in-report-list {
    font-size: 12px;
  }

  .stock-in-receipt-table th,
  .stock-in-receipt-table td,
  .stock-in-report-list th,
  .stock-in-report-list td {
    padding: 7px 8px;
  }
}

.stock-in-sign {
  display: grid;
  grid-template-columns: minmax(220px, max-content) 1fr;
  align-items: end;
  gap: 10px;
  color: var(--hex-muted-foreground);
}

.stock-in-sign__line {
  min-height: 1.1em;
  border-bottom: 1px dotted #666;
}

.stock-in-sign--date {
  color: var(--hex-foreground);
}

.stock-in-sign--date span:last-child {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  justify-self: start;
}

.stock-in-table {
  border-top: 1px solid var(--hex-border);
}

.stock-in-table__scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.stock-in-table__head,
.stock-in-table__row,
.stock-in-table__foot {
  display: grid;
  gap: 8px;
  align-items: center;
  padding: 10px 16px;
}

.stock-in-table__head--entry,
.stock-in-table__row--entry {
  grid-template-columns:
    minmax(140px, 1.6fr)
    minmax(88px, 1fr)
    minmax(56px, 0.7fr)
    minmax(72px, 0.8fr)
    minmax(88px, 0.9fr);
}

@media (min-width: 640px) {
  .stock-in-table__head--entry,
  .stock-in-table__row--entry {
    min-width: 560px;
  }

  .stock-in-receipt-line {
    grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.9fr);
    align-items: center;
  }
}

.stock-in-table__head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: color-mix(in srgb, var(--hex-secondary) 55%, var(--hex-card));
  border-bottom: 1px solid var(--hex-border);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--hex-muted-foreground);
}

.stock-in-table__head span:nth-child(n + 3) {
  text-align: center;
}

.stock-in-table__body {
  border-top: 1px solid var(--hex-border);
}

.stock-in-table__row {
  font-size: 13px;
  border-bottom: 1px solid var(--hex-border);
}

.stock-in-table__row:last-child {
  border-bottom: none;
}

.stock-in-table__cat {
  grid-column: 1 / -1;
  padding: 8px 16px;
  border-bottom: 1px solid var(--hex-border);
  background: color-mix(in srgb, var(--hex-secondary) 35%, var(--hex-card));
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--hex-foreground);
}

.stock-in-table__name {
  font-weight: 600;
  line-height: 1.3;
  min-width: 0;
}

.stock-in-table__note {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 500;
  color: var(--hex-muted-foreground);
}

.stock-in-table__barcode {
  text-align: center;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--hex-muted-foreground);
}

.stock-in-table__pack,
.stock-in-table__qty {
  text-align: center;
}

.stock-in-table__money {
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.stock-in-table__money--total {
  color: var(--hex-primary);
}

.stock-in-table__muted {
  display: block;
  text-align: center;
  color: var(--hex-muted-foreground);
}

.stock-in-table__input {
  width: 100%;
  min-width: 0;
  padding: 6px 8px;
  font-size: 13px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.stock-in-table__cost .stock-in-table__input {
  text-align: right;
}

.stock-in-table__foot {
  border-top: 2px solid var(--hex-border);
  background: color-mix(in srgb, var(--hex-primary) 5%, var(--hex-card));
  font-size: 13px;
  font-weight: 800;
}

.stock-in-table__foot--cat {
  border-top: 1px dashed var(--hex-border);
  background: color-mix(in srgb, var(--hex-secondary) 45%, var(--hex-card));
  font-weight: 700;
}

.stock-in-table__foot-label {
  grid-column: 1 / 7;
  text-align: right;
  padding-right: 8px;
}

.stock-in-table__foot .stock-in-table__money--total {
  grid-column: 7;
}

.stock-in-table__empty {
  margin: 0;
  padding: 24px 16px;
  text-align: center;
  font-size: 14px;
  color: var(--hex-muted-foreground);
}

@media (max-width: 639px) {
  .stock-in-view {
    max-width: 100%;
  }

  .stock-in-receipt-panel {
    max-width: 100%;
  }

  .stock-in-table__scroll {
    max-width: 100%;
  }
}

/* ── Excel import ── */
.excel-import-toolbar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 0 12px;
  width: 100%;
}

.excel-import-toolbar__btn {
  min-width: 0;
  width: 100%;
  min-height: var(--field-h);
  height: var(--field-h);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
  gap: 6px;
}

label.excel-import-toolbar__upload {
  cursor: pointer;
  margin: 0;
  user-select: none;
}

.excel-import-toolbar__btn.btn--toolbar-excel {
  background: var(--hex-primary-soft);
  color: var(--hex-primary);
  border-color: color-mix(in srgb, var(--hex-primary) 38%, var(--hex-border));
}

@media (hover: hover) and (pointer: fine) {
  .excel-import-toolbar__btn.btn--toolbar-excel:hover:not(:disabled):not(
      .is-busy
    ) {
    background: var(--hex-primary-active);
    border-color: var(--hex-primary);
    color: var(--hex-primary-dark);
  }
}

.excel-import-toolbar__btn.btn--toolbar-secondary {
  background: #e8f5ec;
  color: #107c41;
  border-color: #9fd4b3;
}

.excel-import-toolbar__btn.btn--toolbar-secondary:hover:not(:disabled) {
  background: #d4eddf;
  border-color: #7bc499;
  color: #0d6635;
}

.excel-import-toolbar__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.excel-import-toolbar.is-dragover {
  border-radius: 12px;
  outline: 2px dashed var(--hex-primary);
  outline-offset: 2px;
  background: color-mix(in srgb, var(--hex-primary) 6%, transparent);
}

.import-file-host {
  position: fixed;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.import-file-host__input {
  position: fixed;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.import-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(2px);
}

.import-loading-overlay__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-width: 220px;
  padding: 20px 24px;
  border-radius: 16px;
  background: var(--hex-card);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
}

.import-loading-overlay__spinner {
  width: 34px;
  height: 34px;
  border: 3px solid color-mix(in srgb, var(--hex-primary) 18%, transparent);
  border-top-color: var(--hex-primary);
  border-radius: 999px;
  animation: import-spin 0.8s linear infinite;
}

.import-loading-overlay__text {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--hex-foreground);
}

@keyframes import-spin {
  to {
    transform: rotate(360deg);
  }
}

.app-toast {
  position: fixed;
  left: 50%;
  bottom: calc(
    var(
        --mobile-nav-offset,
        calc(var(--mobile-nav-h, 72px) + env(safe-area-inset-bottom, 0px))
      ) +
      16px
  );
  z-index: 10050;
  max-width: min(92vw, 420px);
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  color: #fff;
  background: #15803d;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
  opacity: 0;
  transform: translate(-50%, 12px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
  pointer-events: none;
}

.app-toast--visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.app-toast--error {
  background: #c62828;
}

.app-toast--warning {
  background: #b45309;
}

.import-report__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.import-report__stats p {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--hex-secondary);
  text-align: center;
}

.import-report__stats span {
  display: block;
  font-size: 12px;
  color: var(--hex-muted-foreground);
}

.import-report__stats b {
  display: block;
  margin-top: 4px;
  font-size: 20px;
}

.import-report__errors-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
}

.import-report__errors ul {
  margin: 0;
  padding-left: 18px;
  max-height: 220px;
  overflow: auto;
}

.import-report__errors li {
  margin-bottom: 6px;
  font-size: 13px;
  line-height: 1.4;
}

.import-report__ok {
  margin: 0;
  font-size: 14px;
  color: #15803d;
  font-weight: 700;
}

.import-report__empty {
  margin: 0;
  font-size: 14px;
  color: #b45309;
  font-weight: 600;
  line-height: 1.45;
}

@media (max-width: 639px) {
  .excel-import-toolbar__btn {
    font-size: 11px;
    padding: 0 8px;
  }

  .import-report__stats {
    grid-template-columns: 1fr;
  }
}

/* Promo search dropdown */
.promo-search-combo {
  position: relative;
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.promo-search-combo__field {
  position: relative;
}
.promo-search-combo__icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: var(--promo-sheet-accent, #0e8a9a);
  pointer-events: none;
}
.promo-search-combo__icon .ui-icon {
  width: 18px;
  height: 18px;
}
.promo-search-combo__toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--promo-sheet-accent, #0e8a9a);
  cursor: pointer;
}
.promo-search-combo__toggle .ui-icon {
  width: 18px;
  height: 18px;
  transition: transform 0.18s ease;
}
.promo-search-combo.is-open .promo-search-combo__toggle .ui-icon {
  transform: rotate(180deg);
}
.promo-search-combo__field .promo-search-input,
.promo-search-combo__field .promo-sheet-search {
  padding-left: 38px;
  padding-right: 78px;
}
.promo-search-combo__field .search-field__clear {
  right: 42px;
}
.promo-search-combo__field .promo-search-input::-webkit-search-cancel-button,
.promo-search-combo__field .promo-search-input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}
.promo-search-combo.is-open .promo-search-combo__field .promo-search-input {
  border-color: var(--promo-sheet-accent, #0e8a9a);
  background: #fff;
  box-shadow: 0 0 0 3px
    color-mix(in srgb, var(--promo-sheet-accent, #0e8a9a) 16%, transparent);
}
.promo-search-dropdown {
  display: block;
  min-height: 176px;
  max-height: min(58vh, 460px);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px;
  background: var(--hex-card, #fff);
  border: 1px solid var(--promo-sheet-line, #e5e7eb);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(16, 22, 35, 0.08);
}
.promo-search-dropdown[hidden],
.promo-search-dropdown:empty {
  display: none;
}
.promo-search-dropdown .promo-product-grid,
.modal-panel--promo-qty .promo-search-dropdown .promo-product-grid,
.modal-panel--promo-sheet .promo-search-dropdown .promo-product-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: none;
  overflow: visible;
  gap: 12px;
  padding: 0;
}
.promo-search-dropdown .promo-product-card,
.modal-panel--promo-qty .promo-search-dropdown .promo-product-card,
.modal-panel--promo-sheet .promo-search-dropdown .promo-product-card {
  min-height: 168px;
  height: auto;
  overflow: visible;
  padding: 12px 8px 14px;
  border-radius: 12px;
  background: #f7f9fb;
}
.promo-search-dropdown .promo-product-card__media,
.modal-panel--promo-qty .promo-search-dropdown .promo-product-card__media,
.modal-panel--promo-sheet .promo-search-dropdown .promo-product-card__media {
  height: 84px;
}
.promo-search-dropdown .promo-product-card__img,
.modal-panel--promo-qty .promo-search-dropdown .promo-product-card__img,
.modal-panel--promo-sheet .promo-search-dropdown .promo-product-card__img {
  max-height: 84px;
}
.promo-search-dropdown .promo-product-card__name,
.modal-panel--promo-qty .promo-search-dropdown .promo-product-card__name,
.modal-panel--promo-sheet .promo-search-dropdown .promo-product-card__name {
  font-size: 12px;
  -webkit-line-clamp: 3;
}
.promo-search-dropdown .promo-product-card__price,
.modal-panel--promo-qty .promo-search-dropdown .promo-product-card__price,
.modal-panel--promo-sheet .promo-search-dropdown .promo-product-card__price {
  font-size: 13px;
}
.promo-search-dropdown__empty {
  margin: 0;
  padding: 18px 10px;
  font-size: 13px;
  color: var(--hex-muted, #9ca3af);
  text-align: center;
}
.promo-sheet-filters {
  position: relative;
}

.bt-printer-hint {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--hex-muted-foreground);
}

.bt-printer-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: min(52vh, 360px);
  overflow-y: auto;
  padding: 4px 0 8px;
}

.bt-printer-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--hex-border);
  border-radius: 12px;
  background: var(--hex-card);
  text-align: left;
  cursor: pointer;
}

.bt-printer-row.is-on {
  border-color: var(--hex-primary);
  background: var(--hex-primary-soft, #eaf6f8);
}

.bt-printer-row__name {
  font-size: 15px;
  font-weight: 700;
  color: var(--hex-foreground);
}

.bt-printer-row__addr {
  font-size: 12px;
  color: var(--hex-muted-foreground);
  font-variant-numeric: tabular-nums;
}

.bt-printer-chip {
  min-height: 42px;
  max-width: 100%;
  padding: 0 12px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  background: #9aa3af;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}

.bt-printer-chip.is-on {
  background: var(--hex-primary);
}

.bt-printer-chip .ui-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.bt-printer-chip__name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 11rem;
}

.bt-printer-fab {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  background: #9aa3af;
  color: #fff;
  cursor: pointer;
}

.bt-printer-fab.is-on {
  background: var(--hex-primary);
}

.bt-printer-fab .ui-icon {
  width: 20px;
  height: 20px;
}

.bt-setup {
  padding: 16px 16px 12px;
  display: flex;
  flex-direction: column;
  min-height: min(52vh, 420px);
}

.bt-setup__kicker {
  margin: 0 0 6px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--hex-foreground);
}

.bt-setup__hint {
  margin: 0 0 14px;
  text-align: center;
  font-size: 13px;
  line-height: 1.45;
  color: var(--hex-muted-foreground);
}

.bt-setup .bt-printer-list {
  flex: 1;
  min-height: 160px;
}

.bt-setup__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 4px 4px;
}

.bt-setup__round {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  background: var(--hex-primary);
  color: #fff;
  cursor: pointer;
}

.bt-setup__round .ui-icon {
  width: 22px;
  height: 22px;
}

.bt-setup__disconnect {
  flex: 1;
  max-width: 160px;
  border-radius: 999px;
}

.bt-setup__disconnect:disabled {
  opacity: 0.45;
}

/* ── Хайлтын талбарын цэвэрлэх (×) товч ─────────────────────────── */
/* Босоо flex доторх эцэг элементэд өндөр нь суналгүйн тулд flex-basis өгөхгүй */
.search-field {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}

.search-field > input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  padding-right: 40px;
}

.search-field__clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 999px;
  color: var(--hex-muted-foreground, #64748b);
  background: color-mix(
    in srgb,
    var(--hex-muted-foreground, #64748b) 16%,
    transparent
  );
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition:
    opacity 0.12s ease,
    background 0.12s ease;
}

.search-field__clear .ui-icon {
  width: 15px;
  height: 15px;
  stroke-width: 2.4;
}

.search-field__clear:active {
  background: color-mix(
    in srgb,
    var(--hex-muted-foreground, #64748b) 30%,
    transparent
  );
}

/* Талбар хоосон үед товч харагдахгүй */
input:placeholder-shown ~ .search-field__clear {
  opacity: 0;
  pointer-events: none;
}

/* Аль хэдийн өөрийн товчтой хайлтын мөрд эгнээнд нь суулгах хувилбар */
.search-field__clear--inline {
  position: static;
  transform: none;
  width: 26px;
  height: 26px;
  margin-right: 4px;
}

/* Эцэг элементийн layout-д input-ийн оронд зөв суух тохиргоо */
.page-toolbar__filters > .search-field {
  flex: 1 1 160px;
}

.list-action-toolbar .search-field,
.page-toolbar--products .search-field,
.sales-report-dash__filters .search-field {
  width: 100%;
  flex: none;
}

.delivery-picker__search-wrap .delivery-picker__search {
  padding-right: 42px !important;
}

.factory-salary__row {
  cursor: pointer;
}
.factory-salary__row:hover {
  background: color-mix(in srgb, var(--hex-secondary, #eef2f5) 70%, transparent);
}
.factory-salary__group th {
  background: color-mix(in srgb, var(--hex-primary, #16899a) 8%, var(--hex-secondary, #eef2f5));
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 650;
  color: var(--hex-foreground);
}
.factory-salary__group-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.factory-salary__group-inner b {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.factory-month-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: min(100%, 420px);
  flex: 1 1 280px;
}

.factory-month-nav__shift {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--hex-border);
  border-radius: 12px;
  background: var(--hex-card);
  color: var(--hex-foreground);
  flex-shrink: 0;
}

.factory-month-nav__shift:hover,
.factory-month-nav__shift:focus-visible {
  border-color: color-mix(in srgb, var(--hex-primary) 40%, var(--hex-border));
  outline: none;
}

.factory-month-nav__date {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--hex-border);
  border-radius: 12px;
  background: var(--hex-card);
  cursor: pointer;
}

.factory-month-nav__value {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.factory-month-nav__icon {
  width: 18px;
  height: 18px;
  color: var(--hex-muted-foreground);
  flex-shrink: 0;
}

.factory-month-nav__native {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  border: 0;
  width: 100%;
  height: 100%;
}

.factory-month-nav__now {
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--hex-border);
  border-radius: 999px;
  background: var(--hex-card);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.factory-month-nav__now.is-active {
  border-color: color-mix(in srgb, var(--hex-primary) 40%, var(--hex-border));
  background: var(--hex-primary-soft);
  color: var(--hex-primary);
}

@media (max-width: 640px) {
  .factory-month-nav {
    min-width: 0;
    width: 100%;
    flex-wrap: wrap;
  }
  .factory-month-nav__date {
    flex: 1 1 calc(100% - 96px);
  }
}

