.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%, 520px);
  padding: 24px;
  border-radius: 8px;
  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: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
}

.page-head--row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.page-head--with-back {
  gap: 10px;
}

.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: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--hex-border);
  border-radius: 10px;
  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: 10px 12px !important;
}

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

.stat-card__value {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.25;
  margin-top: 2px;
}

.admin-action {
  min-height: 48px;
  display: flex;
  align-items: center;
}

/* —— Catalog cards —— */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 16px;
  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,
    transform 0.2s ease,
    border-color 0.2s ease;
}

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

.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;
}

.customer-list__head {
  display: none;
}

.customer-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--hex-border);
  background: transparent;
}

.customer-card--active {
  border-bottom-color: color-mix(in srgb, var(--hex-primary) 50%, var(--hex-border));
  background: color-mix(in srgb, var(--hex-primary-soft) 55%, transparent);
}

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

.customer-card__avatar-img {
  object-fit: cover;
  background: var(--hex-secondary);
}

.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: 72px;
  height: 72px;
  border-radius: 16px;
  object-fit: cover;
  border: var(--thumb-border);
  box-shadow: var(--thumb-shadow);
}

.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__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 {
  color: var(--hex-primary);
  font-weight: 600;
  text-decoration: none;
}

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

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

.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__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-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-card__avatar-img {
  object-fit: cover;
  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);
}

.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;
}

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

.customer-card__name {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--hex-foreground);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-card__phones {
  flex: 0 1 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 4px 10px;
  min-width: 0;
  max-width: 58%;
}

.customer-card__phone-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--hex-primary);
  text-decoration: none;
  white-space: nowrap;
}

.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: 3px 0 0;
  font-size: 13px;
  line-height: 1.3;
  color: var(--hex-muted-foreground);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.customer-card__addr {
  margin-top: -2px;
}

.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 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding-top: 8px;
  margin-top: 2px;
  border-top: 1px solid color-mix(in srgb, var(--hex-border) 85%, transparent);
}

.customer-card__btn {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 34px;
  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;
  border: none;
  border-radius: 0;
  background: transparent;
}

.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 .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: 12px;
  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;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: none !important;
  transition: background 0.15s ease;
}

.worker-pick-card:focus-visible {
  outline: none;
  border-color: var(--hex-primary);
  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: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--hex-primary);
  color: var(--hex-primary-foreground);
  font-size: 18px;
  font-weight: 800;
  box-shadow: var(--thumb-shadow);
}

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

.worker-pick-card__name {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  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 {
  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__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.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;
}

.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;
}

.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;
}

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

.btn--toolbar-excel:active:not(:disabled) {
  background: #c5e6d0;
}

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

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

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

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

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

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

.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);
}

@media (min-width: 641px) {
  .worker-row-compact {
    display: none;
  }
}

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

.employee-list__head {
  display: none;
}

.employee-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  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;
}

.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-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding-top: 8px;
  margin-top: 2px;
  border-top: 1px solid color-mix(in srgb, var(--hex-border) 85%, transparent);
}

.employee-card__btn {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 34px;
  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;
}

.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;
}

.product-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  padding: 10px 12px;
  border: none;
  border-radius: 0;
  background: transparent;
  border-bottom: 1px solid var(--hex-border);
}

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

.product-card__main {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  grid-template-areas:
    "img title"
    "img meta";
  column-gap: 12px;
  row-gap: 6px;
  align-items: start;
  min-width: 0;
}

.product-card__lead {
  display: contents;
}

.product-card__img {
  grid-area: img;
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  border-radius: 0;
  object-fit: contain;
  object-position: center;
  padding: 3px;
  box-sizing: border-box;
  border: none;
  box-shadow: none;
  background: #fff;
}

.product-card__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;
}

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

.product-card__meta {
  grid-area: meta;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  min-width: 0;
  padding-left: 0;
}

.product-card__price {
  font-weight: 700;
  color: var(--hex-primary);
  font-size: 15px;
  line-height: 1.2;
  white-space: nowrap;
}

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

.product-card__badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--hex-secondary);
  white-space: nowrap;
  line-height: 1.2;
}

.product-list--readonly .product-card {
  gap: 0;
}

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

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

.product-card__badge--low {
  background: var(--hex-warning-soft);
  color: var(--hex-warning-text);
  font-weight: 600;
}

.product-card__main:has(.product-card__actions) {
  grid-template-columns: 80px minmax(0, 1fr) auto;
  grid-template-areas:
    "img title actions"
    "img meta actions";
  column-gap: 10px;
}

.product-card__main:has(.product-card__actions) .product-card__title {
  align-self: start;
  padding-right: 2px;
}

.product-card__main:has(.product-card__actions) .product-card__meta {
  align-self: start;
}

.product-card__actions {
  grid-area: actions;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: auto;
  margin: 0;
  padding: 0;
  border-top: none;
  align-self: center;
  flex-shrink: 0;
}

.product-card__action-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  width: 36px;
  min-height: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 10px;
  font-size: 0;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: none !important;
}

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

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

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

@media (min-width: 1024px) {
  .product-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
  }

  .product-list__head,
  .product-card {
    --product-cols: minmax(220px, 2fr) minmax(120px, 1fr) 88px 80px minmax(150px, 1.2fr) 116px;
    display: grid;
    grid-template-columns: var(--product-cols);
    gap: 8px 16px;
    align-items: center;
    padding: 10px 16px;
  }

  .product-card__main {
    display: contents;
  }

  .product-list--show-cost .product-list__head,
  .product-list--show-cost .product-card {
    --product-cols: minmax(220px, 2fr) minmax(120px, 1fr) 88px 88px 80px minmax(150px, 1.2fr) 116px;
  }

  .product-list--readonly .product-list__head,
  .product-list--readonly .product-card {
    --product-cols: minmax(240px, 2.2fr) minmax(130px, 1fr) 88px 80px minmax(160px, 1.3fr);
    grid-template-columns: var(--product-cols);
  }

  .product-list__head {
    display: grid;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--hex-muted-foreground);
    background: var(--hex-secondary);
    border-bottom: 1px solid var(--hex-border);
  }

  .product-list__col--actions,
  .product-card__actions {
    justify-self: end;
    text-align: right;
  }

  .product-card {
    grid-template-rows: none;
    border-bottom: 1px solid var(--hex-border);
  }

  .product-card__lead {
    display: flex;
    grid-column: 1;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    min-width: 0;
  }

  .product-card__img {
    grid-area: auto;
    width: 72px;
    height: 72px;
    border-radius: 0;
    border: none;
    box-shadow: none;
    object-fit: contain;
    object-position: center;
    padding: 5px;
    box-sizing: border-box;
  }

  .product-card__title {
    grid-area: auto;
    align-self: auto;
    font-size: 14px;
    line-height: 1.3;
    display: block;
    -webkit-line-clamp: unset;
    -webkit-box-orient: unset;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

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

  .product-card__meta {
    display: contents;
    grid-area: auto;
    padding-left: 0;
  }

  .product-card__price {
    grid-column: 3;
    font-size: 14px;
    line-height: 1.3;
    text-align: left;
    justify-self: start;
  }

  .product-list--show-cost .product-card__cost {
    grid-column: 4;
    font-size: 13px;
    font-weight: 600;
    color: var(--hex-muted-foreground);
    justify-self: start;
  }

  .product-card__badge {
    grid-column: 4;
    justify-self: start;
  }

  .product-list--show-cost .product-card__badge {
    grid-column: 5;
  }

  .product-card__barcode {
    display: block;
    grid-column: 5;
    font-size: 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    color: var(--hex-muted-foreground);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

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

  .product-card__actions {
    grid-column: 6;
    grid-area: auto;
    display: flex;
    flex-direction: row;
    gap: 6px;
    width: auto;
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    justify-content: flex-end;
    align-self: center;
  }

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

  .product-card__action-btn {
    flex: 0 0 auto;
    min-width: 32px;
    width: 32px;
    min-height: 32px;
    height: 32px;
    padding: 0;
    font-size: 0;
  }

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

  .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: 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);
  }

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

  .customer-card {
    display: grid;
    grid-template-columns: minmax(240px, 1.25fr) minmax(220px, 1.35fr) minmax(200px, auto);
    grid-template-areas: "head addr 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);
  }

  .customer-card__head {
    grid-area: head;
  }

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

  .customer-card__actions {
    grid-area: actions;
    justify-content: flex-end;
    flex-wrap: nowrap;
    padding-top: 0;
    margin-top: 0;
    border-top: none;
  }

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

  .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;
  }

  .employee-card__sub {
    display: none;
  }

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

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

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

}

.product-detail__img {
  object-fit: contain;
  object-position: center;
  padding: 8px;
  box-sizing: border-box;
  background: var(--hex-secondary);
  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: min(100%, 300px);
  height: min(68vw, 300px);
  max-height: 300px;
  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 {
  min-height: 0;
}

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

.stock-alert-thumb {
  width: 44px;
  height: 44px;
  border-radius: 0;
  object-fit: contain;
  object-position: center;
  padding: 4px;
  box-sizing: border-box;
  background: var(--hex-secondary);
  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);
}


.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__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;
}

.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;
}

.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 {
  --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: 12px;
  --btn-h-sm: 40px;
  --btn-h-md: 48px;
  --btn-h-lg: 52px;
  --field-h: 48px;
  --thumb-md: 56px;
  --thumb-lg: 60px;
  --avatar-md: 52px;
  --thumb-radius: 12px;
  --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: 64px;
  --mobile-top-content-h: 48px;
  --mobile-top-bar-offset: calc(
    env(safe-area-inset-top, 0px) + var(--mobile-top-content-h) + 16px
  );
  --app-gutter: 12px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
}

* { border-color: var(--hex-border); }
html, body, #app {
  min-height: 100%;
  background: var(--hex-background) !important;
}
body {
  margin: 0;
  background: var(--hex-background);
  color: var(--hex-foreground);
  font-family: 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: 8px;
  min-height: var(--btn-h-md);
  padding: 0 16px;
  border: none;
  border-radius: var(--btn-radius);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--hex-foreground);
  background: var(--hex-secondary);
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    opacity 0.15s ease,
    transform 0.1s ease,
    filter 0.1s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:active:not(:disabled) {
  transform: scale(0.98);
}

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

.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;
  transform: scale(0.98);
}

.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;
  transform: scale(0.98);
}

/* ——— 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;
  transform: scale(0.98);
}

#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;
  transform: scale(0.98);
}

#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;
  transform: scale(0.98);
}

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

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

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

.catalog-card__btn:active:not(:disabled) {
  transform: scale(0.97);
  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) {
  transform: scale(0.97);
  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) {
  transform: scale(0.97);
  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));
  transform: scale(0.96);
}

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

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

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

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

.confirm-card__btn:active:not(:disabled) {
  transform: scale(0.98);
  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));
  transform: scale(0.99);
}

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

.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);
  transform: scale(0.98);
}

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

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-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-card {
  width: 100%;
  max-width: 400px;
  padding: 24px 20px;
  border-radius: 16px;
  border: 1px solid var(--hex-border);
  background: var(--hex-card);
  box-shadow: 0 12px 40px rgba(16, 22, 35, 0.08);
}

.auth-card__brand {
  text-align: center;
  margin-bottom: 20px;
}

.auth-card__title {
  margin: 10px 0 4px;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--hex-foreground);
}

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

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.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, transform 0.1s 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: 100%;
}

.mobile-top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 35;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--mobile-top-content-h);
  padding: 8px 12px;
  padding-top: calc(8px + env(safe-area-inset-top, 0px));
  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: 17px;
  font-weight: 800;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

.mobile-top-bar__back,
.mobile-top-bar__back-spacer {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
}

.mobile-top-bar__back {
  display: grid;
  place-items: center;
  border: none;
  border-radius: 10px;
  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);
  transform: scale(0.96);
}

.mobile-top-bar__user {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--hex-primary);
  color: var(--hex-primary-foreground);
  font-size: 15px;
  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: #117d8d;
}

.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: 2px;
  min-height: var(--mobile-nav-h);
  padding: 6px 8px max(8px, env(safe-area-inset-bottom, 0px));
  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: 2px;
  min-height: 52px;
  padding: 4px 6px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--hex-muted-foreground);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
  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: 11px !important;
}

.mobile-stats .stat-card__value {
  font-size: 1.02rem !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__reg,
#picker-order-title .worker-order-store__phone {
  margin-top: 2px;
  font-size: 13px;
}

.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;
}

.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;
}

.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 {
  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);
}

.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) {
  transform: scale(0.96);
  filter: brightness(0.96);
}

.confirm-card__message {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #687386;
}

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

.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-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-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-shell--bottom-nav .app-main {
    padding-top: var(--mobile-top-bar-offset) !important;
    padding-bottom: calc(var(--mobile-nav-h) + 16px + env(safe-area-inset-bottom, 0px)) !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;
  }

  .app-shell--bottom-nav {
    height: 100dvh;
    max-height: 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;
  }

  .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: min(92dvh, 100%) !important;
    margin: 0 !important;
    border-radius: 16px 16px 0 0 !important;
  }

  .modal-panel__head {
    padding-top: 12px !important;
  }

  .modal-close {
    min-width: 44px;
    min-height: 44px;
  }

  .seg-tab {
    min-height: var(--btn-h-md);
    font-size: 13px;
    padding: 0 8px;
  }

  .seg-tabs--3 .seg-tab {
    font-size: 12px;
  }

  #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),
  #app select,
  #modal input.app-input:not(.qty-stepper__input),
  #modal select {
    min-height: var(--field-h);
  }

  .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: 28px 32px 36px !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: 1200px;
  }

  .page-head__title {
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
  }

  .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; }
.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);
}

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: 18mm;
  height: 18mm;
  object-fit: contain;
  display: block;
}

.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); }
.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;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--hex-secondary);
  border: 1px solid var(--hex-border);
  font-size: 12px;
  font-weight: 600;
  color: #16899a;
  white-space: nowrap;
}

.customer-map-locate: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);
}

.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;
  object-fit: contain;
  object-position: center;
  padding: 6px;
  box-sizing: border-box;
  border: none;
  box-shadow: none;
  background: var(--hex-secondary);
}

.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;
}

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

.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%;
}

.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-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;
}

@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-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-primary) 6%, var(--hex-card));
}

.stock-in-entry-row--filled:hover,
.stock-in-entry-row--filled:focus-visible {
  background: color-mix(in srgb, var(--hex-primary) 10%, 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__meta-qty {
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--hex-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__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);
}

.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__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;
}

.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);
  background: transparent;
  box-shadow: none;
  border-bottom-color: var(--hex-primary);
}

@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: #117d8d;
    border-bottom-color: #117d8d;
    background: transparent;
  }

  .worker-view--orders .worker-view__tabs .seg-tab + .seg-tab {
    border-left-color: #cfd8e3;
  }
}

.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__name {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--hex-foreground);
}

.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: 8px;
  padding: 10px 0 0;
}

.worker-order-card__tools {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.worker-order-lines-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}

.worker-order-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.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__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;
  background: var(--hex-secondary);
  text-align: center;
}

.worker-order-stat--total {
  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: var(--btn-h-md);
  padding: 0 16px;
  border: 2px dashed color-mix(in srgb, var(--hex-primary) 45%, var(--hex-border));
  border-radius: var(--btn-radius);
  background: var(--hex-primary-soft);
  color: var(--hex-primary);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: none;
  -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: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--hex-muted-foreground);
}

.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);
  background: transparent;
  overflow: hidden;
  min-height: 0;
}

.worker-order-lines .worker-selected-row {
  background: transparent;
}

.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: sticky;
  bottom: 0;
  z-index: 12;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 0 12px;
  border-top: 1px solid var(--hex-border);
  background: var(--hex-background);
}

.app-shell--bottom-nav .worker-order-card__foot {
  bottom: calc(var(--mobile-nav-h) + env(safe-area-inset-bottom, 0px));
}

.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: 6px;
}

.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 8px;
}

.worker-order-opt__fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.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__textarea {
  width: 100%;
}

.worker-order-opt__textarea {
  min-height: 72px !important;
  height: auto;
  resize: vertical;
  padding-top: 8px !important;
  padding-bottom: 8px !important;
  line-height: 1.4;
}

.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;
}

.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 {
  transform: scale(0.96);
}

.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;
}

.promo-section {
  padding: 14px;
  border: 2px solid var(--hex-border);
  border-radius: 10px;
  background: var(--hex-card);
}

.promo-section--buy {
  border-color: var(--hex-primary);
  background: var(--hex-primary-soft);
}

.promo-section--free {
  border-color: var(--hex-info);
  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-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: 2px;
  padding: 2px 0;
  color: #64748b;
}

.promo-section-arrow-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--hex-muted-foreground);
  line-height: 1;
}

.promo-section-arrow-icon .ui-icon {
  width: 20px;
  height: 20px;
}

.promo-section-arrow-text {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.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: 260px;
  padding-right: 2px;
  -webkit-overflow-scrolling: touch;
}

.promo-product-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  background: var(--hex-secondary);
  border: 1px solid transparent;
  cursor: pointer;
}

.promo-product-row--selected {
  grid-template-columns: 48px minmax(0, 1fr) auto;
  cursor: default;
  border-color: var(--hex-primary);
  background: color-mix(in srgb, var(--hex-primary-soft) 55%, var(--hex-card));
}

.promo-product-row__remove {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 999px;
  background: var(--hex-card);
  color: var(--hex-foreground);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.promo-product-list--selected {
  margin-bottom: 8px;
}

.promo-category-scroll {
  display: flex;
  gap: 6px;
  margin: -2px 0 10px;
  padding-bottom: 2px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.promo-category-chip {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 10px;
  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: 12px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--hex-card) 72%, transparent);
  color: var(--hex-muted-foreground);
  font-size: 12px;
  text-align: center;
}

.promo-product-more {
  padding: 8px 10px;
}

.promo-qty-rule-buys {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  flex-shrink: 0;
}

.promo-qty-rule-thumb {
  width: 40px;
  height: 40px;
}

.promo-product-row.is-active {
  border-color: var(--hex-primary);
  background: var(--hex-primary-soft);
}

.promo-input-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 8px;
}

.promo-search-input {
  flex: 1 1 auto;
  min-width: 0;
  width: 0;
  box-sizing: border-box;
  min-height: 48px;
  height: 48px;
  padding: 0 12px;
  font-size: 15px;
  line-height: 1.2;
}

.promo-qty-field:not(.promo-qty-field--inline) {
  display: block;
  width: 100%;
  max-width: 200px;
}

.promo-qty-field.promo-qty-field--inline {
  flex: 0 0 96px;
  width: 96px;
  min-width: 96px;
  max-width: 96px;
  display: flex;
  flex-direction: column;
  justify-content: stretch;
}

.promo-qty-field--inline .promo-qty-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 48px;
  height: 48px;
  padding: 0 8px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.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;
}

.worker-selected-row {
  display: grid;
  grid-template-columns: var(--thumb-md) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
}

.worker-row-qty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-width: 48px;
  padding: 6px 10px;
  border: none;
  border-radius: 10px;
  background: var(--hex-secondary);
  color: var(--hex-foreground);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: none !important;
}

.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-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__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;
  font-size: var(--picker-row-qty);
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  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-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-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-view__toolbar {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--hex-background);
  padding-bottom: 2px;
}

.delivery-view__search {
  width: 100%;
}

.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: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.delivery-store-grid--compact {
  grid-template-columns: repeat(auto-fill, minmax(140px, 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;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 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__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--hex-secondary);
}

.delivery-store-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.delivery-store-card__pin {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.92);
  color: var(--hex-primary);
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.12);
}

.delivery-store-card__pin .ui-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
  stroke: none;
}

.delivery-store-card__badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgb(22 137 154 / 0.92);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.delivery-store-card__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
}

.delivery-store-card__name {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
}

.delivery-store-card__company {
  margin: 0;
  font-size: 12px;
  color: var(--hex-muted-foreground);
}

.delivery-store-card__meta {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
  color: var(--hex-muted-foreground);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.delivery-store-card__total {
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--hex-primary);
}

.delivery-map {
  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);
}

.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 4px;
  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-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: 12px 14px;
  border: none;
  border-bottom: 1px solid var(--hex-border);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.delivery-order-row:last-child {
  border-bottom: none;
}

.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:active:not(:disabled) {
  transform: scale(0.985);
}

.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;
  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-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 {
  margin: 0;
  text-align: center;
  font-size: 14px;
  color: var(--hex-muted-foreground);
}

.picker-qty-sheet__total b {
  font-size: 20px;
  font-weight: 800;
  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 {
  min-height: var(--field-h);
}

.picker-search-clear {
  align-self: stretch;
  white-space: nowrap;
}

.barcode-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.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-row-meta,
  .worker-store-extra {
    display: none !important;
  }

  .worker-row-compact {
    display: block !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 {
    padding: 13px !important;
  }

  .p-5 {
    padding: 12px !important;
  }

  .p-4 {
    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 {
    padding: 10px 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) {
    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;
  }

  .employee-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;
  }

  .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: 44px minmax(0, 1fr) 56px;
    gap: 8px;
    padding: 6px 8px !important;
  }

  .stock-alert-thumb {
    width: 40px !important;
    height: 40px !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;
  }

  .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-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: auto;
    max-height: min(
      52dvh,
      calc(
        100dvh - var(--mobile-top-bar-offset, 56px) - var(--mobile-nav-h) - 52px -
          env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 300px
      )
    );
  }

  .app-shell--bottom-nav .worker-order-card__foot {
    position: static;
    bottom: auto;
    flex-shrink: 0;
    z-index: 1;
    margin-top: 0;
    padding-top: 8px;
    padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
    box-shadow: none;
  }

  .app-shell--bottom-nav .worker-order-lines {
    overflow: visible;
    min-height: 0;
  }

  .app-shell--bottom-nav .worker-view--ordering {
    align-items: stretch;
    gap: 8px;
  }

  .worker-selected-row {
    grid-template-columns: 48px minmax(0, 1fr) minmax(104px, auto);
    gap: 10px;
    padding: 10px 0;
    align-items: center;
  }

  .worker-row-edit {
    min-width: 96px;
  }

  .worker-order-qty-stepper {
    max-width: 96px;
    width: 96px;
  }

  .worker-selected-row .qty-stepper {
    grid-column: auto;
    grid-row: auto;
    max-width: 104px;
    width: 100%;
    margin: 0;
    justify-self: end;
  }

  .worker-selected-row .qty-stepper button,
  .worker-selected-row .qty-stepper input {
    min-height: 32px !important;
    height: 32px !important;
  }

  .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;
  }

  .worker-selected-row .qty-stepper {
    grid-column: 1 / -1;
    justify-self: stretch;
    max-width: 200px;
    margin-left: auto;
    margin-right: auto;
  }

  .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 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: hidden;
  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);
}

.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;
}

.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__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);
  right: 0;
  z-index: 30;
  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;
}

@keyframes wh-receipt-picker-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.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-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-filters__hint {
  grid-column: 1 / -1;
  font-size: 11px;
  color: var(--hex-muted-foreground);
  line-height: 1.35;
}

.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__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);
}

.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__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;
}

.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;
  }

  .wh-receipt-picker,
  .wh-receipt-field,
  .wh-receipt-field--picker {
    max-width: none;
    min-width: 0;
    width: 100%;
    flex: 1 1 auto;
  }

  .wh-receipt-picker__panel {
    left: 0;
    right: 0;
    width: auto;
  }

  .wh-receipt-list {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
    max-height: none;
    padding: 10px 12px;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .wh-receipt-list__item {
    flex: 0 0 auto;
    width: min(46vw, 168px);
    padding: 10px 12px;
    border: 1px solid var(--hex-border);
    border-radius: 12px;
    border-bottom: 1px solid var(--hex-border);
    box-shadow: none;
  }

  .wh-receipt-list__item--selectable {
    width: min(52vw, 196px);
  }

  .wh-receipt-list__item.is-active {
    border-color: color-mix(in srgb, var(--hex-primary) 45%, var(--hex-border));
    box-shadow: none;
  }

  .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;
  }
}

.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:active:not(:disabled) {
  transform: scale(0.98);
}

.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: A4 portrait; margin: 8mm; }
  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 {
    display: block !important;
    background: white;
    color: black;
    font-family: "Roboto", Arial, sans-serif;
  }
  .print-receipt:not(:last-child) .receipt-page {
    page-break-after: always;
    break-after: page;
  }
  .print-receipt .receipt-page:not(:last-child) {
    page-break-after: always;
    break-after: page;
  }
  .receipt-page { width: 190mm; margin: 0 auto; padding: 4mm 3mm; font-size: 10.5px; line-height: 1.22; font-family: "Roboto", Arial, sans-serif; }
  .receipt-header { display: grid; grid-template-columns: 22mm 1fr; gap: 4mm; align-items: start; margin-bottom: 3mm; }
  .receipt-logo { width: 18mm; height: 18mm; object-fit: contain; display: block; }
  .receipt-company h1 { font-size: 15px; margin: 1mm 0 2mm; font-weight: 800; }
  .receipt-company p { margin: 0.7mm 0; }
  .receipt-title { text-align: center; font-family: "Roboto", Arial, sans-serif; font-size: 17px; margin: 3mm 0 5mm; font-weight: 900; }
  .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: #fff3cd;
    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: #fff3cd;
    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;
}

.metrics-bar__value {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}

.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__label {
  flex: 1;
  min-width: 0;
  line-height: 1.35;
}

.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: 12px;
  font-weight: 700;
  text-align: center;
}

.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;
  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) {
  transform: scale(0.98);
  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-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 {
  transform: translateY(-2px);
  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));
  transform: scale(0.995);
}

.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);
}

.line-list {
  display: flex;
  flex-direction: column;
}

.line-list--scroll {
  max-height: 55vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.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: 12px;
  line-height: 1.35;
  color: var(--hex-muted-foreground);
}

.worker-orders-panel {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.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 12px;
  padding: 10px 12px;
  border: 1px solid var(--hex-border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--hex-secondary) 45%, var(--hex-card));
}

.perm-group__title {
  padding: 0;
  margin: 0 0 8px;
  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-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 {
  cursor: not-allowed;
}

.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 {
  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;
}

@media (min-width: 768px) {
  .perm-matrix-wrap {
    overflow: auto;
    max-height: min(62vh, 520px);
    -webkit-overflow-scrolling: touch;
  }

  .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-matrix__cells {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@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 (Орлого авах) ── */
.stock-in-view {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.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-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;
  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: 16px;
  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-panel__signatures {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-top: 1px solid var(--hex-border);
  font-size: 13px;
  line-height: 1.45;
}

.stock-in-receipt-panel__foot {
  padding: 14px 16px 16px;
  border-top: 1px solid var(--hex-border);
}

.stock-in-sign {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
}

.stock-in-sign__line {
  flex: 1;
  min-width: 180px;
  color: var(--hex-muted-foreground);
}

.stock-in-sign--date span:last-child {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.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);
}

.stock-in-table--receipt .stock-in-table__head,
.stock-in-table--receipt .stock-in-table__row,
.stock-in-table--receipt .stock-in-table__foot {
  grid-template-columns:
    minmax(140px, 1.4fr)
    minmax(88px, 1fr)
    minmax(56px, 0.6fr)
    minmax(72px, 0.7fr)
    repeat(3, minmax(80px, 0.85fr));
}

@media (min-width: 640px) {
  .stock-in-table__head--entry,
  .stock-in-table__row--entry {
    min-width: 560px;
  }

  .stock-in-table--receipt .stock-in-table__head,
  .stock-in-table--receipt .stock-in-table__row,
  .stock-in-table--receipt .stock-in-table__foot {
    min-width: 760px;
  }
}

.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--receipt .stock-in-table__head span:nth-child(n + 5) {
  text-align: right;
}

.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__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 16px 12px;
}

.excel-import-toolbar__btn {
  min-width: 0;
  width: 100%;
  min-height: 40px;
  height: 40px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  gap: 5px;
}

.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-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(24px + env(safe-area-inset-bottom, 0px));
  z-index: 85;
  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;
}

.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;
  }
}
