:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --primary: #0ea5e9;
  --border: #e5e7eb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

.container {
  width: min(1100px, 94%);
  margin: 0 auto;
  padding: 20px 0 90px;
}

.page-title {
  margin: 0 0 16px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}

.grid {
  display: grid;
  gap: 12px;
}

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

label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

.required-mark {
  color: #dc2626;
  font-weight: 700;
}

input,
select,
textarea,
button {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
}

textarea {
  min-height: 84px;
  resize: vertical;
}

button {
  background: var(--primary);
  color: white;
  border: none;
  font-weight: 600;
  cursor: pointer;
}

.mini-profile-phone-readonly,
#mini-profile-phone[readonly] {
  background: #f3f4f6;
  color: #6b7280;
  cursor: not-allowed;
}

.quick-product-shell {
  width: min(760px, 100%);
  margin: 0 auto;
}

.quick-product-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.quick-product-head h2 {
  margin: 0 0 6px;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.quick-product-head p {
  margin: 0;
}

.quick-product-cart-chip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: auto;
  min-width: 216px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  font-size: 16px;
  color: #111827;
}

.quick-product-cart-chip strong {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #0b72ff;
  color: #fff;
  font-size: 12px;
}

.quick-product-card {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.06);
}

.quick-product-search-wrap {
  position: relative;
}

.quick-product-search-wrap input {
  height: 58px;
  padding: 0 48px 0 54px;
  border-radius: 16px;
  background: #fff;
  font-size: 16px;
}

.quick-product-search-ico {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  font-size: 24px;
}

.quick-product-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  width: 28px;
  height: 28px;
  padding: 0;
  transform: translateY(-50%);
  border-radius: 999px;
  background: #d1d5db;
  color: #fff;
  font-size: 20px;
  line-height: 1;
}

.quick-product-suggest,
.quick-product-found-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 16px;
  background: #eef5ff;
}

.quick-product-found {
  display: grid;
  gap: 8px;
}

.quick-product-found-row {
  grid-template-columns: minmax(0, 1fr) auto;
  background: #f8fafc;
}

.quick-product-suggest p,
.quick-product-found-row span {
  margin: 3px 0 0;
}

.quick-product-suggest-icon,
.quick-product-info-ico {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #fff;
  color: #0b72ff;
  font-size: 26px;
}

.quick-product-suggest .tab-btn {
  width: auto;
  white-space: nowrap;
  border-radius: 12px;
  background: #0b72ff;
}

.quick-product-block {
  padding: 18px 0 0;
  border-top: 1px solid #f1f5f9;
}

.quick-product-block h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.quick-product-block p {
  margin: 0 0 16px;
}

.quick-product-photo-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.quick-product-photo-btn {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 84px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  color: #111827;
}

.quick-product-photo-btn span {
  color: #0b72ff;
  font-size: 26px;
}

.quick-product-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.quick-product-preview-item {
  position: relative;
  width: 116px;
  height: 116px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #f8fafc;
}

.quick-product-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.quick-product-preview-item button {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.85);
  color: #fff;
  line-height: 1;
}

.quick-product-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 236px;
  align-items: center;
  gap: 16px;
  margin: 0;
  color: var(--text);
}

.quick-product-row strong {
  display: block;
  margin-bottom: 4px;
  font-size: 18px;
  color: #111827;
}

.quick-product-row small {
  display: block;
  color: var(--muted);
  font-size: 14px;
}

.quick-product-input-suffix {
  position: relative;
}

.quick-product-input-suffix input {
  height: 54px;
  padding-right: 48px;
  border-radius: 16px;
  font-size: 16px;
}

.quick-product-input-suffix em {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  font-style: normal;
}

.quick-product-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 16px;
  background: #eef5ff;
}

.quick-product-summary p {
  margin: 0;
}

.quick-product-summary strong {
  display: block;
  margin: 4px 0;
  font-size: 18px;
}

.quick-product-info-ico {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #0b72ff;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}

.quick-product-badge {
  padding: 7px 12px;
  border-radius: 999px;
  background: #dbeafe;
  color: #2563eb;
  font-size: 13px;
  white-space: nowrap;
}

.quick-product-submit {
  display: grid;
  gap: 4px;
  min-height: 76px;
  border-radius: 14px;
  background: #0b72ff;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

.quick-product-submit strong,
.quick-product-submit span {
  display: block;
}

.quick-product-submit strong {
  font-size: 18px;
}

.quick-product-submit span {
  font-weight: 500;
  opacity: 0.86;
}

.supplier-mini-page {
  --supplier-safe-top: calc(
    max(var(--tg-content-safe-area-inset-top, 0px), var(--tg-safe-area-inset-top, 0px)) + 14px
  );
  --supplier-safe-bottom: max(var(--tg-safe-area-inset-bottom, 0px), 0px);
  background: #f6f7fb;
}

.supplier-shell {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: var(--supplier-safe-top) 14px calc(96px + var(--supplier-safe-bottom));
}

.supplier-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.supplier-app-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: linear-gradient(135deg, #0b72ff, #0ea5e9);
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.22);
}

.supplier-header h1,
.supplier-panel h2 {
  margin: 0 0 5px;
}

.supplier-header h1 {
  font-size: 26px;
  letter-spacing: -0.03em;
}

.supplier-tabs {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: max(10px, var(--supplier-safe-bottom));
  z-index: 50;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  width: min(736px, calc(100vw - 24px));
  margin: 0 auto;
  padding: 8px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -10px 36px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(16px);
}

.supplier-tabs .tab-btn {
  display: grid;
  place-items: center;
  min-height: 48px;
  width: 100%;
  padding: 8px 6px;
  border-radius: 16px;
  background: transparent;
  color: #64748b;
  font-size: 11px;
}

.supplier-tabs .tab-btn.active {
  background: #0b72ff;
  color: #fff;
}

.supplier-panel {
  display: grid;
  gap: 14px;
}

.supplier-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.supplier-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.supplier-form .actions-row button,
.supplier-panel-head .tab-btn,
#supplier-logout {
  width: auto;
}

.supplier-summary-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  border-radius: 20px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.supplier-summary-card div {
  display: grid;
  gap: 5px;
}

.supplier-summary-card strong {
  color: #0b72ff;
  font-size: 20px;
}

.supplier-order-card-list {
  display: grid;
  gap: 12px;
}

.supplier-order-card {
  display: grid;
  gap: 12px;
  border-radius: 18px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.supplier-order-card-main {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.supplier-order-card-main p {
  margin: 5px 0 3px;
}

.supplier-order-card-total {
  color: #0b72ff;
  font-weight: 800;
  white-space: nowrap;
}

.supplier-order-items {
  margin-top: 8px;
  color: #475569;
  font-size: 13px;
  line-height: 1.45;
}

.picker-dashboard-card {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(110px, 0.7fr));
  gap: 16px;
  align-items: stretch;
}

.picker-dashboard-card p,
.picker-dashboard-card small,
.picker-order-card p {
  margin: 0;
}

.picker-dashboard-card > div:first-child strong {
  display: inline-block;
  margin: 6px 8px 4px 0;
  color: #0b72ff;
  font-size: 48px;
  line-height: 1;
}

.picker-dashboard-card > div:first-child span {
  color: #0b72ff;
  font-size: 20px;
  font-weight: 700;
}

.picker-dashboard-card small {
  display: block;
  color: var(--muted);
}

.picker-dashboard-stat {
  display: grid;
  place-items: center;
  gap: 8px;
  border-left: 1px solid var(--border);
}

.picker-dashboard-stat span {
  color: var(--muted);
}

.picker-dashboard-stat strong {
  color: #0b72ff;
  font-size: 28px;
}

.picker-orders-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.picker-orders-head h2 {
  margin: 0;
}

.picker-order-list {
  display: grid;
  gap: 12px;
}

.picker-order-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(150px, auto) auto;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.picker-order-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #eef5ff;
  color: #0b72ff;
  font-weight: 700;
}

.picker-order-status {
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef5ff;
  color: #0b72ff;
  font-size: 13px;
  font-weight: 700;
}

/* Picker-only supplier cabinet, visually aligned with "Выберите клуб" */
.supplier-mini-page.picker-only {
  --supplier-safe-top: var(--mini-fullscreen-safe-top, calc(max(var(--tg-content-safe-area-inset-top, 0px), var(--tg-safe-area-inset-top, 0px)) + 58px));
  background: #f6f7fb;
}

.supplier-mini-page.picker-only .supplier-shell {
  width: 100%;
  max-width: 480px;
  padding: var(--supplier-safe-top) 16px calc(28px + var(--supplier-safe-bottom));
}

.supplier-mini-page.picker-only .supplier-header {
  grid-template-columns: 1fr auto;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}

.supplier-mini-page.picker-only .supplier-app-icon {
  display: none;
}

.supplier-mini-page.picker-only .supplier-header h1 {
  margin: 0 0 6px;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.supplier-mini-page.picker-only .supplier-header .muted {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: #6b7280;
}

.supplier-mini-page.picker-only #supplier-logout {
  border-radius: 12px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
}

.supplier-mini-page.picker-only .supplier-tabs {
  display: none;
}

.supplier-mini-page.picker-only .supplier-panel {
  gap: 14px;
}

.supplier-mini-page.picker-only .supplier-panel-head {
  display: none;
}

.supplier-mini-page.picker-only .picker-dashboard-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(2, minmax(82px, 0.55fr));
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid #e7eef8;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.08);
}

.supplier-mini-page.picker-only .picker-dashboard-main {
  min-width: 0;
}

.supplier-mini-page.picker-only .picker-dashboard-kicker {
  display: block;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
}

.supplier-mini-page.picker-only .picker-dashboard-card p,
.supplier-mini-page.picker-only .picker-dashboard-card small,
.supplier-mini-page.picker-only .picker-order-card p {
  margin: 0;
}

.supplier-mini-page.picker-only .picker-dashboard-main strong {
  display: inline-block;
  margin: 6px 6px 4px 0;
  color: #2563eb;
  font-size: 34px;
  line-height: 1;
  font-weight: 900;
}

.supplier-mini-page.picker-only .picker-dashboard-main > span:not(.picker-dashboard-kicker) {
  color: #2563eb;
  font-size: 15px;
  font-weight: 800;
}

.supplier-mini-page.picker-only .picker-dashboard-card small {
  display: block;
  color: #94a3b8;
  font-size: 12px;
}

.supplier-mini-page.picker-only .picker-dashboard-stat {
  display: grid;
  place-items: center;
  gap: 4px;
  border-left: 1px solid #f1f5f9;
}

.supplier-mini-page.picker-only .picker-dashboard-stat span {
  color: #94a3b8;
  font-size: 12px;
}

.supplier-mini-page.picker-only .picker-dashboard-stat strong {
  color: #0f172a;
  font-size: 24px;
  line-height: 1;
}

.supplier-mini-page.picker-only .picker-orders-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2px;
}

.supplier-mini-page.picker-only .picker-orders-head h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  color: #0f172a;
}

.supplier-mini-page.picker-only .picker-orders-count {
  color: #94a3b8;
  font-size: 13px;
  font-weight: 600;
}

.supplier-mini-page.picker-only .picker-order-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.supplier-mini-page.picker-only .picker-order-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  grid-template-areas:
    "icon main status"
    "buttons buttons buttons";
  gap: 10px 12px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid #e7eef8;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.08);
}

.supplier-mini-page.picker-only .picker-order-actions,
.supplier-mini-page.picker-only .picker-order-actions select,
.supplier-mini-page.picker-only [data-supplier-order-status] {
  display: none !important;
}

.supplier-mini-page.picker-only .picker-order-buttons {
  grid-area: buttons;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.supplier-mini-page.picker-only .picker-order-buttons--single {
  grid-template-columns: 1fr;
}

.supplier-mini-page.picker-only .picker-order-buttons--done {
  align-items: center;
}

.supplier-mini-page.picker-only .picker-order-done-note {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 14px;
  background: #ecfdf5;
  color: #15803d;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.supplier-mini-page.picker-only .picker-order-btn {
  border: 0;
  border-radius: 14px;
  padding: 12px 10px;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.supplier-mini-page.picker-only .picker-order-btn--primary {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
}

.supplier-mini-page.picker-only .picker-order-btn--secondary {
  background: #eff6ff;
  color: #2563eb;
}

.supplier-mini-page.picker-only .picker-order-icon {
  grid-area: icon;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 20px;
  font-weight: 800;
}

.supplier-mini-page.picker-only .picker-order-main {
  grid-area: main;
  min-width: 0;
}

.supplier-mini-page.picker-only .picker-order-main strong {
  display: block;
  color: #0f172a;
  font-size: 16px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supplier-mini-page.picker-only .picker-order-main p {
  color: #64748b;
  font-size: 13px;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supplier-mini-page.picker-only .picker-order-main .muted {
  display: block;
  color: #94a3b8;
  font-size: 12px;
  margin-top: 3px;
}

.supplier-mini-page.picker-only .picker-order-status {
  grid-area: status;
  justify-self: end;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--status-color, #eff6ff);
  color: var(--status-text-color, #2563eb);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.supplier-mini-page.picker-only .picker-order-status[style*="--status-color"] {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.supplier-mini-page.picker-only .picker-order-actions {
  grid-area: actions;
  justify-self: end;
}

.supplier-mini-page.picker-only .picker-order-actions select {
  width: auto;
  max-width: 150px;
  padding: 8px 26px 8px 10px;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 720px) {
  .quick-product-head,
  .quick-product-row,
  .quick-product-summary {
    grid-template-columns: 1fr;
  }

  .quick-product-head {
    display: grid;
  }

  .quick-product-cart-chip,
  .quick-product-input-suffix,
  .quick-product-suggest .tab-btn {
    width: 100%;
  }

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

  .quick-product-suggest {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .quick-product-suggest .tab-btn,
  .quick-product-badge {
    grid-column: 1 / -1;
  }

  .picker-dashboard-card,
  .picker-order-card {
    grid-template-columns: 1fr;
  }

  .picker-dashboard-stat {
    border-left: 0;
    border-top: 1px solid var(--border);
    padding-top: 12px;
  }
}

.muted {
  color: var(--muted);
}

.top-space {
  margin-top: 18px;
}

.products {
  display: grid;
  gap: 12px;
}

#miniapp-products.products {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

@media (min-width: 960px) {
  #miniapp-products.products.mini-catalog-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.mini-catalog-search-input {
  flex: 1;
  min-width: 0;
}

.mini-catalog-top-search {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mini-catalog-layout-wrap {
  display: none;
  flex-shrink: 0;
  align-items: center;
}

.mini-catalog-layout-toggle {
  display: inline-flex;
  border-radius: 10px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: #f8fafc;
}

.mini-catalog-layout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 12px;
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
}

.mini-catalog-layout-icon {
  width: 22px;
  height: 22px;
  display: block;
  pointer-events: none;
}

.mini-catalog-layout-btn + .mini-catalog-layout-btn {
  border-left: 1px solid var(--border);
}

.mini-catalog-layout-btn.is-active {
  background: #fff;
  color: #0ea5e9;
  box-shadow: inset 0 0 0 1px rgba(14, 165, 233, 0.35);
}

.mini-catalog-layout-btn:not(.is-active):hover {
  background: #f1f5f9;
}

@media (min-width: 960px) {
  .mini-catalog-layout-wrap {
    display: inline-flex;
  }
}

.mini-catalog-filters {
  display: none;
}

.mini-catalog-filters.is-open {
  display: block;
  margin-top: 8px;
}

.mini-filter-dialog {
  width: min(560px, 94vw);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
}

.mini-filter-dialog::backdrop {
  background: rgba(15, 23, 42, 0.35);
}

.mini-filter-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.mini-filter-dialog-head h3 {
  margin: 0;
  font-size: 16px;
}

.mini-filter-toggle-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.mini-filter-active-badge {
  font-size: 14px;
  font-weight: 700;
  color: #2563eb;
  line-height: 1;
  letter-spacing: -0.02em;
}

.mini-filter-toggle-btn {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  color: #475569;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.mini-filter-toggle-btn:hover {
  background: #f8fafc;
  color: #0f172a;
}

.mini-filter-toggle-btn[aria-expanded="true"] {
  background: #eff6ff;
  color: #2563eb;
  border-color: #bfdbfe;
}

.mini-catalog-categories-row {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 2px;
  flex: 1;
  min-width: 0;
}

.mini-catalog-categories-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.mini-catalog-category-btn {
  border: 1px solid #d1d5db;
  background: #fff;
  color: #111827;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  white-space: nowrap;
}

.mini-catalog-category-btn.is-active {
  background: #111827;
  color: #fff;
  border-color: #111827;
}

.mini-product-dialog {
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  border: 0;
  border-radius: 0;
  padding: 0;
  margin: 0;
}

.mini-product-dialog::backdrop {
  background: rgba(15, 23, 42, 0.2);
}

.mini-product-dialog-body {
  padding: 14px 14px calc(20px + env(safe-area-inset-bottom, 0px));
  overflow: auto;
  height: 100vh;
  max-height: 100vh;
  box-sizing: border-box;
}

.mini-app-page.tg-webapp .mini-product-dialog-body {
  padding-top: calc(12px + var(--mini-app-safe-top));
}

.mini-product-dialog-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.mini-product-dialog-head h3 {
  margin: 0;
  text-align: center;
  font-size: 16px;
}

.mini-product-head-actions {
  display: inline-flex;
  gap: 8px;
}

.mini-product-back-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid #e7edf7;
  background: #fff;
  color: #0f172a;
  font-size: 28px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.mini-product-head-icon-btn {
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: #334155;
  font-size: 30px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.mini-product-head-icon-btn.is-active {
  color: #e11d48;
}

.mini-product-cart-strip {
  width: 100%;
  border: 1px solid #e0e8f5;
  border-radius: 18px;
  background: #fff;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  align-items: center;
  gap: 0;
  padding: 10px 10px;
  margin-bottom: 10px;
}

.mini-product-cart-strip-cell {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
  padding: 0 8px;
  border-right: 1px solid #edf2fa;
}

.mini-product-cart-strip-cell:last-of-type {
  border-right: 0;
}

.mini-product-cart-strip-icon {
  color: #0b74ff;
  width: 22px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mini-product-cart-strip-icon svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: currentColor;
}

.mini-product-cart-strip-cell > span {
  display: grid;
  justify-items: start;
  text-align: left;
}

.mini-product-cart-strip-cell strong {
  display: block;
  font-size: 15px;
  line-height: 1.05;
  color: #0f172a;
}

.mini-product-cart-strip-cell small {
  display: block;
  font-size: 14px;
  color: #4b5567;
  white-space: nowrap;
}

.mini-product-cart-strip-arrow {
  font-size: 24px;
  color: #64748b;
  padding: 0 4px;
}

.mini-product-hero {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.mini-product-hero-image-wrap {
  position: relative;
  width: calc(100% + 28px);
  margin-left: -14px;
  margin-right: -14px;
  display: flex;
  justify-content: center;
  touch-action: pan-y;
}

.mini-product-hero-image {
  width: min(340px, 90vw);
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #fff;
  border-radius: 12px;
}

.mini-product-hero-tags {
  position: absolute;
  top: 8px;
  left: 14px;
  z-index: 2;
}

.mini-product-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  font-size: 20px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.mini-product-arrow--left {
  left: 14px;
}

.mini-product-arrow--right {
  right: 14px;
}

.mini-product-dots {
  display: flex;
  gap: 6px;
}

.mini-product-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  border: 0;
  background: #cbd5e1;
  padding: 0;
}

.mini-product-dot.is-active {
  background: #2563eb;
}

.mini-product-title {
  margin: 4px 0 2px;
  font-size: 18px;
  line-height: 1.2;
}

.mini-product-meta .muted {
  margin: 0 0 4px;
  line-height: 1.2;
}

.mini-product-meta .chips {
  margin-top: 0;
}

.mini-product-offers {
  margin-top: 10px;
}

.mini-detail-offers-card {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.mini-detail-offer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 152px 92px;
  gap: 10px;
  align-items: center;
  padding: 12px 12px;
  border-top: 1px solid #f1f5f9;
}

.mini-detail-offer-row:first-child {
  border-top: 0;
}

.mini-detail-offer-row--piece {
  background: #f8fbff;
  border-color: #d8e8ff;
}

.mini-detail-offer-row--pack {
  background: #f6fff8;
  border-color: #d8f6df;
}

.mini-detail-offer-row--piece .mini-detail-offer-left strong {
  color: #1447a6;
}

.mini-detail-offer-row--pack .mini-detail-offer-left strong {
  color: #0f6a35;
}

.mini-detail-offer-left {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.mini-detail-offer-left strong {
  font-size: 18px;
  line-height: 1.1;
}

.mini-detail-offer-left span {
  color: #475569;
  font-size: 14px;
}

.mini-detail-offer-stepper {
  display: inline-grid;
  grid-template-columns: 42px auto 42px;
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  width: 152px;
  justify-self: center;
}

.mini-detail-offer-btn {
  height: 40px;
  width: 42px;
  border: 0;
  background: #fff;
  color: #0ea5e9;
  font-size: 28px;
  line-height: 40px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  padding: 0;
}

.mini-detail-offer-row--piece .mini-detail-offer-btn {
  color: #0b74ff;
}

.mini-detail-offer-row--pack .mini-detail-offer-btn {
  color: #16924f;
}

.mini-detail-offer-qty {
  min-width: 66px;
  text-align: center;
  font-size: 16px;
  color: #0f172a;
}

.mini-detail-offer-right {
  display: grid;
  justify-items: end;
  gap: 2px;
  width: 92px;
  text-align: right;
}

.mini-detail-offer-right strong {
  font-size: 18px;
}

.mini-detail-offer-right span {
  color: #94a3b8;
  font-size: 12px;
}

.mini-product-about {
  margin-top: 10px;
}

.mini-product-about h3 {
  font-size: 16px;
  line-height: 1.2;
}

.mini-product-props {
  display: grid;
  gap: 8px;
}

.mini-product-props > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.mini-product-props .muted {
  font-size: 13px;
}

.mini-product-props strong {
  font-size: 14px;
  font-weight: 600;
}

.mini-product-prop-sep {
  flex: 1 1 auto;
  border-bottom: 1px dashed #dbe3ee;
  transform: translateY(-2px);
}

.mini-product-description {
  margin: 10px 0 0;
  color: #334155;
  white-space: pre-wrap;
}

/* ── Mini product detail: visual refresh ─────────────────────────────── */
.mini-product-dialog {
  background: #f7f9fd;
}

.mini-product-dialog-body {
  background:
    radial-gradient(circle at 50% -80px, rgba(255,255,255,0.98) 0, rgba(255,255,255,0.9) 120px, rgba(247,249,253,0) 260px),
    #f7f9fd;
}

.mini-product-dialog-head {
  margin-bottom: 14px;
}

.mini-product-back-btn,
.mini-product-head-icon-btn,
.mini-product-head-actions .tiny-btn {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(8px);
}

.mini-product-back-btn {
  font-size: 30px;
}

.mini-product-head-icon-btn {
  font-size: 30px;
}

.mini-product-head-actions {
  gap: 10px;
  justify-content: flex-end;
  position: relative;
}

.mini-product-dialog-head {
  grid-template-columns: 52px minmax(0, 1fr);
}

.mini-product-head-icon-btn svg,
.mini-product-cart-pill svg {
  width: 21px;
  height: 21px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mini-product-head-icon-btn.is-active svg {
  fill: currentColor;
}

.mini-product-cart-pill {
  min-width: 0;
  width: auto;
  min-height: 48px;
  border-radius: 18px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.mini-product-menu-wrap {
  position: relative;
  display: inline-flex;
}

.mini-product-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 5;
  min-width: 176px;
  padding: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
}

.mini-product-menu button {
  width: 100%;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #0f172a;
  padding: 10px 12px;
  text-align: left;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
}

.mini-product-menu button:active {
  background: #f1f5f9;
}

.mini-product-cart-strip {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.97);
  padding: 14px 12px;
  margin-bottom: 14px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.09);
}

.mini-product-cart-strip-cell {
  gap: 10px;
  padding: 0 10px;
  border-right-color: #edf2f7;
}

.mini-product-cart-strip-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #eef6ff;
  color: #0b74ff;
}

.mini-product-cart-strip-icon svg {
  width: 24px;
  height: 24px;
}

.mini-product-cart-strip-cell strong {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.mini-product-cart-strip-cell small {
  margin-top: 2px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.08;
}

.mini-product-cart-strip-arrow {
  color: #94a3b8;
  font-size: 28px;
}

.mini-product-hero {
  gap: 10px;
}

.mini-product-hero-image-wrap {
  width: 100%;
  min-height: 330px;
  margin: 0;
  align-items: center;
  border: 1px solid #e8eef7;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.9);
  overflow: hidden;
}

.mini-product-hero-image {
  width: min(320px, 82vw);
  max-height: 320px;
  object-fit: contain;
  background: transparent;
  border-radius: 0;
}

.mini-product-hero-tags {
  top: 12px;
  left: 12px;
}

.mini-product-title {
  margin: 12px 0 4px;
  font-size: 23px;
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: #0b1220;
}

.mini-product-meta .muted {
  color: #64748b;
  font-size: 15px;
}

.mini-product-meta .chip {
  border: 0;
  background: #edf4ff;
  color: #3b6ca8;
  border-radius: 999px;
  font-weight: 700;
}

.mini-product-offers {
  margin-top: 16px;
}

.mini-product-section-title {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.mini-detail-offers-card {
  display: grid;
  gap: 10px;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
}

.mini-detail-offer-row {
  grid-template-columns: minmax(0, 1fr) minmax(132px, auto) minmax(74px, auto);
  border: 1px solid #dbeafe;
  border-radius: 18px;
  padding: 14px 12px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
}

.mini-detail-offer-row--piece {
  background: linear-gradient(180deg, #f8fbff 0%, #eef7ff 100%);
}

.mini-detail-offer-row--pack {
  background: linear-gradient(180deg, #f7fff9 0%, #ecfbf1 100%);
  border-color: #bdebd0;
}

.mini-detail-offer-left {
  position: relative;
  padding-left: 48px;
  min-height: 42px;
  justify-content: center;
}

.mini-detail-offer-left::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 42px;
  height: 42px;
  transform: translateY(-50%);
  border-radius: 14px;
  background: #4b9dff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.45);
}

.mini-detail-offer-left::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 50%;
  width: 24px;
  height: 24px;
  transform: translateY(-50%);
  background-color: #fff;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2 4 6.3v11.4L12 22l8-4.3V6.3L12 2Zm0 2.3 5.7 3.1L12 10.5 6.3 7.4 12 4.3ZM6 9.1l5 2.7v7.2l-5-2.7V9.1Zm12 0v7.2l-5 2.7v-7.2l5-2.7Z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2 4 6.3v11.4L12 22l8-4.3V6.3L12 2Zm0 2.3 5.7 3.1L12 10.5 6.3 7.4 12 4.3ZM6 9.1l5 2.7v7.2l-5-2.7V9.1Zm12 0v7.2l-5 2.7v-7.2l5-2.7Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.mini-detail-offer-row--pack .mini-detail-offer-left::before {
  background: #35b56f;
}

.mini-detail-offer-row--pack .mini-detail-offer-left::after {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 4h10a2 2 0 0 1 2 2v2h1.5A1.5 1.5 0 0 1 22 9.5v8A2.5 2.5 0 0 1 19.5 20h-15A2.5 2.5 0 0 1 2 17.5v-8A1.5 1.5 0 0 1 3.5 8H5V6a2 2 0 0 1 2-2Zm0 4h10V6H7v2Zm-3 2v7.5a.5.5 0 0 0 .5.5h15a.5.5 0 0 0 .5-.5V10h-3v2.5a1 1 0 1 1-2 0V10H9v2.5a1 1 0 1 1-2 0V10H4Z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 4h10a2 2 0 0 1 2 2v2h1.5A1.5 1.5 0 0 1 22 9.5v8A2.5 2.5 0 0 1 19.5 20h-15A2.5 2.5 0 0 1 2 17.5v-8A1.5 1.5 0 0 1 3.5 8H5V6a2 2 0 0 1 2-2Zm0 4h10V6H7v2Zm-3 2v7.5a.5.5 0 0 0 .5.5h15a.5.5 0 0 0 .5-.5V10h-3v2.5a1 1 0 1 1-2 0V10H9v2.5a1 1 0 1 1-2 0V10H4Z'/%3E%3C/svg%3E");
}

.mini-detail-offer-left strong,
.mini-detail-offer-right strong {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #0f172a !important;
}

.mini-detail-offer-left span,
.mini-detail-offer-right span {
  color: #64748b;
  font-size: 12px;
}

.mini-detail-offer-stepper {
  width: 132px;
  grid-template-columns: 36px minmax(52px, 1fr) 36px;
  border: 0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.10);
}

.mini-detail-offer-stepper .mini-detail-offer-btn {
  width: 36px;
}

.mini-detail-offer-btn {
  color: #0b74ff !important;
  font-weight: 700;
}

.mini-detail-offer-row--pack .mini-detail-offer-btn {
  color: #16924f !important;
}

.mini-product-about {
  margin-top: 16px;
  border: 0;
  border-radius: 22px;
  padding: 16px 14px 18px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
}

.mini-product-about h3 {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.mini-product-props {
  gap: 0;
}

.mini-product-props > div {
  position: relative;
  align-items: center;
  min-height: 32px;
  padding-left: 38px;
}

.mini-product-props > div::before {
  position: absolute;
  left: 0;
  top: 4px;
  width: 24px;
  height: 24px;
  border-radius: 9px;
  background: #edf6ff;
  color: #0b74ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.mini-product-props > div:nth-child(1)::before { content: "◇"; }
.mini-product-props > div:nth-child(2)::before { content: "◌"; }
.mini-product-props > div:nth-child(3)::before { content: "◎"; }
.mini-product-props > div:nth-child(4)::before { content: "□"; }
.mini-product-props > div:nth-child(5)::before { content: "#"; }

.mini-product-props .muted {
  color: #64748b;
  font-size: 14px;
}

.mini-product-props strong {
  color: #0f172a;
  font-size: 15px;
  font-weight: 700;
}

@media (max-width: 420px) {
  .mini-detail-offer-row {
    grid-template-columns: minmax(0, 1fr) 128px minmax(66px, auto);
    gap: 8px;
    padding: 12px 10px;
  }

  .mini-detail-offer-left {
    padding-left: 44px;
  }

  .mini-detail-offer-left::before {
    width: 38px;
    height: 38px;
    border-radius: 13px;
  }

  .mini-detail-offer-left::after {
    left: 8px;
    width: 22px;
    height: 22px;
  }

  .mini-detail-offer-left strong,
  .mini-detail-offer-right strong {
    font-size: 14px;
  }

  .mini-detail-offer-left span,
  .mini-detail-offer-right span {
    font-size: 11px;
  }

  .mini-detail-offer-stepper {
    width: 128px;
    grid-template-columns: 34px minmax(50px, 1fr) 34px;
  }

  .mini-detail-offer-stepper .mini-detail-offer-btn {
    width: 34px;
  }

  .mini-detail-offer-qty {
    min-width: 50px;
    font-size: 14px;
  }
}

.mini-favorite-item-btn {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

/* ── Избранное — новый дизайн ──────────────────── */
.mini-fav-screen {
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  background: #f0f4fb !important;
}

.mini-fav-head {
  background: #f0f4fb;
  flex-shrink: 0;
  grid-template-columns: 40px 1fr auto !important; /* корзина в 3-й колонке */
}

.mini-fav-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding: 10px 12px 80px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-sizing: border-box;
}

.mini-fav-info-card {
  background: #fff;
  border-radius: 18px;
  padding: 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(15,23,42,0.05);
}

.mini-fav-info-ico {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: #dbeafe;
  color: #1d57e8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mini-fav-info-ico svg { width: 24px; height: 24px; }

.mini-fav-info-card strong {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  display: block;
  margin-bottom: 3px;
}

.mini-fav-info-card .muted {
  font-size: 13px;
  line-height: 1.4;
}

.mini-fav-search-row { display: flex; gap: 8px; }

/* Вкладки «Все товары» / «Часто покупаю» скрыты — показывается один список избранного */
.mini-fav-tabs {
  display: none;
  border-bottom: 2px solid #e8eef6;
  gap: 0;
}

.mini-fav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 14px 10px;
  border: none;
  background: transparent;
  font: inherit;
  cursor: pointer;
  color: #64748b;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  -webkit-tap-highlight-color: transparent;
  width: auto;
  white-space: nowrap;
}

.mini-fav-tab.is-active {
  color: #1d57e8;
  border-bottom-color: #1d57e8;
}

.mini-fav-tab-label { font-size: 14px; font-weight: 600; line-height: 1.2; }
.mini-fav-tab-count { font-size: 13px; font-weight: 700; }
.mini-fav-tab.is-active .mini-fav-tab-count { color: #1d57e8; }

/* Список избранных */
.mini-fav-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(15,23,42,0.05);
}

.mini-fav-list > .mini-fav-swipe {
  border-top: 1px solid #f0f4fa;
}

.mini-fav-list > .mini-fav-swipe:first-child {
  border-top: none;
}

.mini-fav-list > .mini-fav-item.mini-fav-item--unavailable {
  border-top: 1px solid #f0f4fa;
}

.mini-fav-list > .mini-fav-item.mini-fav-item--unavailable:first-child {
  border-top: none;
}

.mini-fav-swipe {
  position: relative;
  overflow: hidden;
  background: #fff;
}

.mini-fav-swipe-under {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #ef4444;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;
}

.mini-fav-swipe-remove-btn {
  max-width: 46%;
  padding: 10px 12px;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  text-align: right;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mini-fav-swipe-remove-btn:active {
  opacity: 0.9;
}

.mini-fav-swipe-front {
  position: relative;
  z-index: 1;
  background: #fff;
  transition: transform 0.22s ease-out;
  touch-action: pan-y;
}

.mini-fav-swipe-front.is-dragging {
  transition: none;
}

.mini-fav-empty {
  padding: 20px;
  text-align: center;
}

.mini-fav-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 10px;
  padding: 12px 12px;
  border-top: none;
  box-sizing: border-box;
}

/* Фиксированная минимальная ширина колонки цен/степперов — без «плывущих» цен при одной строке продажи */
.mini-fav-item.mini-fav-item--available {
  grid-template-columns: 64px minmax(0, 1fr) minmax(204px, auto);
}

.mini-fav-item-img-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  width: auto;
  line-height: 0;
  -webkit-tap-highlight-color: transparent;
}

.mini-fav-item-img {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
  background: #f1f5f9;
  display: block;
}

.mini-fav-item-img--empty {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background: #f1f5f9;
  display: block;
}

.mini-fav-item-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mini-fav-item-name {
  background: none;
  border: none;
  margin: 0;
  padding: 0;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
  min-height: 2.5em;
  max-height: 2.5em;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  width: auto;
  -webkit-tap-highlight-color: transparent;
}

.mini-fav-item-name .mini-fav-item-vol-after {
  font-weight: 500;
}

.mini-fav-item-detail {
  font-size: 12px;
  display: block;
  line-height: 1.3;
}

.mini-fav-item-sku {
  font-size: 11px;
  display: block;
}

.mini-fav-item-tags {
  margin-top: 3px;
}

.mini-fav-item-tags .mini-product-tags-stack {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 3px;
}

.mini-fav-item-tags .mini-product-tag-pill {
  font-size: 10px;
  padding: 2px 7px;
}

.mini-fav-item-actions {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  justify-self: end;
}

.mini-fav-item-sale-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-self: flex-start;
}

.mini-fav-sale-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mini-fav-sale-price {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}

.mini-fav-sale-price-main {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
  white-space: nowrap;
}

.mini-fav-sale-sub {
  font-size: 11px;
  line-height: 1.25;
  white-space: nowrap;
}

.mini-fav-qty-stepper {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 4px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
  flex-shrink: 0;
}

.mini-fav-qty-btn {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: #f1f5f9;
  color: #1d57e8;
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.mini-fav-qty-btn:active {
  opacity: 0.85;
}

.mini-fav-qty-num {
  min-width: 22px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

/* Избранное: товар снят с продажи в админке */
.mini-fav-item--unavailable {
  align-items: flex-start;
}

.mini-fav-unavail-thumb-wrap {
  flex-shrink: 0;
  width: 64px;
  line-height: 0;
}

.mini-fav-item-img--dim {
  opacity: 0.55;
  filter: grayscale(0.9);
}

.mini-fav-item-body--unavail {
  gap: 4px;
}

.mini-fav-item-name--dim {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #94a3b8;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.mini-fav-item-name--dim .mini-fav-item-vol-after {
  font-weight: 500;
}

.mini-fav-item-actions--unavail {
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  align-self: start;
}

.mini-fav-remove-fav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1.5px solid #bfdbfe;
  background: #fff;
  color: #1d57e8;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.mini-fav-remove-fav-btn svg {
  flex-shrink: 0;
}

@media (max-width: 400px) {
  .mini-fav-item--unavailable {
    grid-template-columns: 64px minmax(0, 1fr);
    grid-template-rows: auto auto;
  }

  .mini-fav-item--unavailable .mini-fav-item-actions--unavail {
    grid-column: 1 / -1;
    width: 100%;
    flex-direction: row;
    justify-content: flex-end;
    margin-top: 6px;
    padding-left: 74px;
    box-sizing: border-box;
  }

  .mini-fav-remove-fav-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Нижняя панель */
.mini-fav-footer {
  position: sticky;
  bottom: 0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  background: #fff;
  border-top: 1px solid #e8eef6;
  box-shadow: 0 -4px 16px rgba(15,23,42,0.08);
}

.mini-fav-footer--hidden { display: none; }

.mini-fav-footer-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.mini-fav-footer-count {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.mini-fav-footer-sum {
  font-size: 12px;
}

.mini-fav-add-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 14px;
  border: none;
  background: #1d57e8;
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  width: auto;
}

.mini-fav-add-all-btn:active { opacity: 0.85; }

/* ── Скрытые товары — новый дизайн ─────────────── */
.mini-hidden-screen {
  background: #f0f4fb;
}

.mini-hidden-head {
  background: #f0f4fb;
}

.mini-hidden-body {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding: 10px 12px calc(20px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-sizing: border-box;
}

/* Статистика */
.mini-hidden-stat-card {
  background: #fff;
  border-radius: 18px;
  padding: 14px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 10px rgba(15,23,42,0.05);
}

.mini-hidden-stat-ico {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: #f0ebff;
  color: #7c3aed;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mini-hidden-stat-ico svg {
  width: 24px;
  height: 24px;
}

.mini-hidden-stat-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mini-hidden-stat-text strong {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
}

.mini-hidden-stat-text .muted {
  font-size: 12px;
  line-height: 1.35;
}

.mini-hidden-stat-right-ico {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #f0ebff;
  color: #7c3aed;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mini-hidden-stat-right-ico svg {
  width: 20px;
  height: 20px;
}

/* Поиск */
.mini-hidden-search-wrap {
  position: relative;
}

.mini-hidden-search-ico {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #94a3b8;
  pointer-events: none;
}

.mini-hidden-search-input {
  width: 100%;
  height: 42px;
  border-radius: 14px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  padding: 0 12px 0 38px;
  font: inherit;
  font-size: 14px;
  color: #0f172a;
  box-sizing: border-box;
  outline: none;
}

.mini-hidden-search-input:focus {
  border-color: #93c5fd;
}

/* Список товаров */
.mini-hidden-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(15,23,42,0.05);
}

.mini-hidden-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid #f0f4fa;
  box-sizing: border-box;
}

.mini-hidden-item:first-child {
  border-top: none;
}

.mini-hidden-item-thumb-btn {
  flex: 0 0 auto;
  width: auto;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  line-height: 0;
}

.mini-hidden-item-img {
  width: 58px;
  height: 58px;
  border-radius: 12px;
  object-fit: cover;
  background: #f1f5f9;
  display: block;
}

.mini-hidden-item-img--empty {
  background: #f1f5f9;
  border-radius: 12px;
  display: inline-block;
}

.mini-hidden-item-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mini-hidden-item-title-btn {
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  width: auto;
  max-width: 100%;
  display: block;
}

.mini-hidden-item-name {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  min-height: 2.4em;
  max-height: 2.4em;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-hidden-item-sub {
  font-size: 12px;
  line-height: 1.3;
  display: block;
}

.mini-hidden-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: #f1f5f9;
  color: #64748b;
  width: fit-content;
}

.mini-hidden-item-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.mini-hidden-show-btn {
  padding: 6px 12px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: #1d57e8;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  width: auto;
  flex-shrink: 0;
}

.mini-hidden-show-btn:active {
  opacity: 0.7;
}

.mini-hidden-empty {
  padding: 20px 14px;
  text-align: center;
}

.mini-hidden-tip {
  margin-top: auto;
}

/* Legacy (убраем, оставляем совместимость) */
.mini-hidden-item-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.mini-hidden-item-remove {
  white-space: nowrap;
}

.mini-sku-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

/* ── Раздел «Заказано SKU» — новый дизайн ──────────── */
.mini-sku-screen {
  background: #f0f4fb;
  /* Фиксируем высоту — иначе flex-child не скроллится */
  height: 100dvh;
  height: 100svh;
  max-height: 100dvh;
  overflow: hidden;
}

.mini-sku-head {
  background: #f0f4fb;
  flex-shrink: 0;
  grid-template-columns: 40px 1fr auto !important;
}

.mini-unsold2-head {
  grid-template-columns: 40px 1fr auto !important;
}

.mini-hidden-head {
  grid-template-columns: 40px 1fr !important;
}

.mini-addr-head {
  grid-template-columns: 40px 1fr auto !important;
}

.mini-sku-body {
  flex: 1 1 auto;
  min-height: 0;          /* ключ: позволяет flex-child сжаться */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding: 10px 12px calc(16px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-sizing: border-box;
}

/* Подсказка сверху */
.mini-sku-tip-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  padding: 12px 14px;
}

.mini-sku-tip-ico {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  font-style: italic;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.mini-sku-tip-top p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: #1e3a5f;
}

.mini-sku-capacity {
  margin: 0 12px 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
}

.mini-sku-capacity-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 10px;
}

.mini-sku-capacity-head strong {
  font-size: 14px;
  color: #0f172a;
}

.mini-sku-capacity-head .muted {
  font-size: 12px;
  line-height: 1.35;
}

.mini-sku-capacity-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mini-sku-capacity-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.mini-sku-capacity-label {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.mini-sku-capacity-controls {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.mini-sku-capacity-count {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  min-width: 1.5ch;
  text-align: right;
}

.mini-sku-capacity-sep {
  font-size: 13px;
}

.mini-sku-capacity-limit {
  width: 56px;
  padding: 4px 6px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  background: #fff;
  color: #0f172a;
}

.mini-sku-capacity-limit:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.mini-sku-capacity-limit::placeholder {
  color: #94a3b8;
  font-weight: 500;
}

.mini-sku-capacity-bar {
  height: 6px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.mini-sku-capacity-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #60a5fa, #3b82f6);
  transition: width 0.2s ease;
}

.mini-sku-capacity-row.is-full .mini-sku-capacity-fill {
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
}

.mini-sku-capacity-row.is-over .mini-sku-capacity-count {
  color: #dc2626;
}

.mini-sku-capacity-row.is-over .mini-sku-capacity-fill {
  background: linear-gradient(90deg, #f87171, #dc2626);
}

.mini-sku-capacity-other {
  margin: 10px 0 0;
  font-size: 12px;
}

.mini-sku-mylist-toolbar {
  display: flex;
  justify-content: flex-end;
  padding: 0 12px 8px;
}
.mini-sku-clear-all-btn {
  border: 1px solid #fecaca;
  background: #fff;
  color: #b91c1c;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.mini-sku-clear-all-btn:active {
  background: #fef2f2;
}

/* Табы — пилюльный переключатель */
.mini-sku-tabs {
  display: flex;
  background: #e4ebf5;
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
}

.mini-sku-tab {
  flex: 1 1 0;
  padding: 8px 12px;
  border-radius: 9px;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.mini-sku-tab.is-active {
  background: #fff;
  color: #0f172a;
  box-shadow: 0 1px 4px rgba(15,23,42,0.10);
}

.mini-sku-tabs--three .mini-sku-tab {
  font-size: 12px;
  padding: 8px 6px;
}

.mini-sku-card2-note {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  flex: 1 1 auto;
  min-width: 0;
  text-align: right;
}

/* Строка поиска + переключатель вида */
.mini-sku-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mini-sku-search-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.mini-sku-search-ico {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #94a3b8;
  pointer-events: none;
}

.mini-sku-search-input {
  width: 100%;
  height: 40px;
  border-radius: 12px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  padding: 0 12px 0 34px;
  font: inherit;
  font-size: 14px;
  color: #0f172a;
  box-sizing: border-box;
  outline: none;
}

.mini-sku-search-input:focus { border-color: #93c5fd; }

/* Переключатель сетки — иконки */
.mini-sku-grid-toggle {
  display: flex;
  gap: 4px;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 4px;
  flex-shrink: 0;
}

.mini-sku-grid-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}

.mini-sku-grid-btn svg { width: 18px; height: 18px; }

.mini-sku-grid-btn.is-active {
  background: #0f172a;
  color: #fff;
}

/* Сетка товаров */
.mini-sku-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

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

@media (max-width: 820px) {
  .mini-sku-grid.mini-sku-grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Карточка товара — новая */
.mini-sku-card2 {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 4px rgba(15,23,42,0.07);
}

.mini-sku-card2-photo-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: block;
  width: auto;
  -webkit-tap-highlight-color: transparent;
  line-height: 0;
}

.mini-sku-card2-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #f8fafc;
}

.mini-sku-card2-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.mini-sku-card2-img--empty {
  width: 100%;
  height: 100%;
  background: #f1f5f9;
}

.mini-sku-card2-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6px;
  pointer-events: none;
}

.mini-sku-card2-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.mini-sku-card2-body {
  padding: 8px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1 1 auto;
}

.mini-sku-card2-name-btn {
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
  min-height: 2.6em;
  max-height: 2.6em;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  width: auto;
  -webkit-tap-highlight-color: transparent;
}

.mini-sku-card2-vol {
  font-size: 12px;
  display: block;
}

.mini-sku-card2-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 6px;
}

.mini-sku-card2-price {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
}

.mini-sku-action-btn {
  padding: 6px 12px;
  border-radius: 20px;
  border: 1.5px solid #1d57e8;
  background: #fff;
  color: #1d57e8;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  width: auto;
  flex-shrink: 0;
}

.mini-sku-action-btn--in-list {
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #1d57e8;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Подсказка снизу */
.mini-sku-tip-bottom {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  padding: 12px 14px;
}

.mini-sku-tip-bottom svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: #2563eb;
  margin-top: 1px;
}

.mini-sku-tip-bottom p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: #1e3a5f;
}

/* Legacy (старые стили, могут быть использованы в других местах) */
.mini-sku-card { display: none; }
.mini-sku-item-btn { display: none; }

/* ── Код приёма инвентаризации (профиль) ────────────────────────── */
.mini-inv-code-card {
  padding: 16px 18px;
}
.mini-inv-code-top {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 14px;
}
.mini-inv-code-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text, #1f2937);
}
.mini-inv-code-hint { font-size: 12px; }
.mini-inv-code-digits {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 10px;
}
.mini-inv-code-digit {
  width: 52px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  border: 2px solid #c7d2fe;
  border-radius: 14px;
  background: #eef2ff;
  color: #4f46e5;
  letter-spacing: 0;
}
.mini-inv-code-note { font-size: 12px; text-align: center; margin: 0; }

/* Входящие инвентаризации */
.mini-inv-incoming-card { padding: 14px 16px; }
.mini-inv-incoming-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text, #1f2937);
  margin-bottom: 12px;
}
.mini-inv-incoming-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border, #e5e7eb);
}
.mini-inv-incoming-item:last-child { border-bottom: none; }
.mini-inv-incoming-meta { font-size: 13px; color: var(--muted, #6b7280); }
.mini-inv-incoming-stats {
  display: flex;
  gap: 10px;
  font-size: 12px;
}
.mini-inv-incoming-stat--ok   { color: #16a34a; font-weight: 600; }
.mini-inv-incoming-stat--low  { color: #d97706; font-weight: 600; }
.mini-inv-incoming-stat--none { color: #dc2626; font-weight: 600; }
.mini-inv-incoming-actions { display: flex; gap: 8px; margin-top: 4px; }
.mini-inv-incoming-accept {
  flex: 1;
  padding: 9px;
  border-radius: 10px;
  border: none;
  background: #2563eb;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.mini-inv-incoming-reject {
  padding: 9px 14px;
  border-radius: 10px;
  border: 1.5px solid #e5e7eb;
  background: #fff;
  color: #6b7280;
  font-size: 13px;
  cursor: pointer;
}
.mini-inv-autotrust-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted, #6b7280);
  cursor: pointer;
}

/* Модальный диалог (универсальный) */
.mini-modal-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(100%, 440px);
  max-height: 90dvh;
  border: none;
  border-radius: 22px 22px 0 0;
  padding: 0;
  background: #fff;
  box-shadow: 0 -8px 40px rgba(15,23,42,.14);
}
.mini-modal-dialog:not([open]) { display: none !important; }
.mini-modal-dialog[open] {
  display: flex;
  flex-direction: column;
  inset: auto 0 0 0;
  width: 100%;
  max-width: 100%;
  border-radius: 22px 22px 0 0;
}
.mini-modal-dialog::backdrop { background: rgba(0,0,0,.45); }
.mini-modal-dialog-inner { display: flex; flex-direction: column; overflow: hidden; }
.mini-modal-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--border, #e5e7eb);
  flex-shrink: 0;
}
.mini-modal-dialog-head h3 { margin: 0; font-size: 16px; font-weight: 700; }
.mini-modal-dialog-body {
  padding: 16px 18px 32px;
  overflow-y: auto;
  flex: 1;
}

/* Форма пересылки */
.mini-inv-transfer-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}
.mini-inv-transfer-input {
  width: 100%;
  box-sizing: border-box;
  height: 46px;
  border: 1.5px solid var(--border, #e5e7eb);
  border-radius: 12px;
  padding: 0 14px;
  font-size: 16px;
  background: #fff;
}
.mini-inv-transfer-input--code {
  letter-spacing: 10px;
  font-size: 22px;
  font-weight: 700;
  text-align: center;
}
.mini-inv-code-input-row { display: flex; gap: 10px; align-items: center; }
.mini-inv-transfer-error {
  margin-top: 8px;
  font-size: 13px;
  color: #dc2626;
}
.mini-inv-transfer-error.hidden { display: none; }

/* История инвентаризаций */
.visinv-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border, #e5e7eb);
  gap: 10px;
}
.visinv-history-item:last-child { border-bottom: none; }
.visinv-history-meta { font-size: 13px; color: var(--muted, #6b7280); }
.visinv-history-stats {
  display: flex;
  gap: 8px;
  font-size: 12px;
  margin-top: 3px;
}
.visinv-history-actions { display: flex; gap: 6px; flex-shrink: 0; }
.visinv-history-forward-btn {
  padding: 7px 12px;
  border-radius: 10px;
  border: 1.5px solid #c7d2fe;
  background: #eef2ff;
  color: #4f46e5;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════
   ВИЗУАЛЬНАЯ ИНВЕНТАРИЗАЦИЯ — новый модуль
   ═══════════════════════════════════════════════ */

/* Закрытый <dialog> обязан быть display:none — иначе в WebView/Telegram контент
   остаётся в потоке документа и «вылезает» внизу (например под каталогом). */
.visinv-dialog:not([open]) {
  display: none !important;
}

.visinv-dialog[open] {
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  height: 100svh;
  max-height: 100dvh;
  max-height: 100svh;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: #f0f4fb;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.visinv-dialog::backdrop {
  background: rgba(15, 23, 42, 0.3);
}

/* Высоту задаёт родитель .visinv-dialog (100dvh); не дублируем 100dvh — иначе переполнение и сдвиг */
.visinv-screen {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  overflow: hidden;
}

/* Шапка
   --visinv-safe-top выставляется JS (visinvApplySafeTop) при открытии диалога.
   Вне Telegram = 0px, и мы добавляем env(safe-area-inset-top) через CSS.
   Внутри Telegram = точное значение из --mini-tg-top-offset + topExtra. */
.visinv-head {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  gap: 10px;
  padding: calc(var(--visinv-safe-top, 0px) + env(safe-area-inset-top, 0px) + 10px) 14px 12px;
  background: #f0f4fb;
  box-sizing: border-box;
}

.visinv-head-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.visinv-head-text strong {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0b1220;
}

.visinv-head-text .muted {
  font-size: 12px;
}

/* Хост прокрутки: высоту докручивает JS (visualViewport), без этого iOS/Telegram часто не даёт скролл */
.visinv-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
}
.visinv-root {
  /* Контент; скролл на .visinv-body */
  min-height: min-content;
}

/* Мастер и итоги: корень на всю высоту, скролл внутри карточки, кнопки внизу */
.visinv-body.visinv-body--wizard,
.visinv-body.visinv-body--restock {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: none !important;
}

.visinv-root.visinv-root--wizard,
.visinv-root.visinv-root--restock {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.visinv-head-sub {
  display: block;
  font-size: 12px;
  line-height: 1.35;
  margin-top: 2px;
}

.vr2-footer--sticky {
  position: sticky;
  bottom: 0;
  z-index: 3;
  margin-top: 8px;
  padding-top: 10px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, rgba(240, 244, 251, 0) 0%, #f0f4fb 28%, #f0f4fb 100%);
}

.vr2-screen--restock {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  padding: 8px 0 0;
  gap: 0;
  box-sizing: border-box;
}

.vr2-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  display: block;
  padding: 0 12px 8px;
}
.vr2-scroll > .vr2-section,
.vr2-scroll > .vr2-ordered-note,
.vr2-scroll > .vr2-success-banner,
.vr2-scroll > .vr2-stats,
.vr2-scroll > .vr2-quick-fill,
.vr2-scroll > .vr2-all-ok {
  margin-bottom: 14px;
}
.vr2-scroll > :last-child {
  margin-bottom: 0;
}

.vr2-footer--dock {
  flex-shrink: 0;
  margin-top: 0;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  background: #f0f4fb;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.06);
}

/* ── Экран 1: Вход ──────────────────────────────── */
/* ══ Экран входа в инвентаризацию — дизайн 1:1 ══ */
.vie-shell {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 10px 14px calc(28px + env(safe-area-inset-bottom, 0px));
  max-width: 440px;
  margin: 0 auto;
  width: 100%;
}

/* ─── Главная карточка ─── */
.vie-main-card {
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 4px 24px rgba(15,23,42,.1);
  padding: 20px 20px 16px;
  position: relative;
  overflow: hidden;
}
.vie-main-card-body {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.vie-main-left { flex: 1; min-width: 0; }
.vie-main-right { flex-shrink: 0; }

/* Бейдж статуса */
.vie-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 20px;
  padding: 4px 12px;
  margin-bottom: 10px;
}
.vie-badge--green { background: #dcfce7; color: #16a34a; }
.vie-badge--blue  { background: #dbeafe; color: #1d4ed8; }

/* Заголовок */
.vie-main-title {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
  margin: 0 0 4px;
  letter-spacing: -0.02em;
}
.vie-main-sub {
  font-size: 13px;
  color: #64748b;
  margin: 0 0 12px;
}

/* Большое число SKU */
.vie-sku-row {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-bottom: 12px;
}
.vie-sku-big {
  font-size: 42px;
  font-weight: 900;
  color: #2563eb;
  letter-spacing: -0.04em;
  line-height: 1;
}
.vie-sku-sep  { font-size: 20px; color: #94a3b8; font-weight: 600; }
.vie-sku-pill {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  background: #f1f5f9;
  border-radius: 6px;
  padding: 2px 8px;
}

/* Блоки статистики */
.vie-stat-boxes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.vie-stat-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f8faff;
  border: 1px solid #e0eaff;
  border-radius: 10px;
  padding: 7px 12px;
  flex: 1;
}
.vie-stat-num  { font-size: 15px; font-weight: 800; color: #0f172a; }
.vie-stat-label{ font-size: 11px; color: #64748b; }

/* Кольцо прогресса */
.vie-ring-svg { width: 96px; height: 96px; }

/* Прогресс-бар */
.vie-progress-bar {
  height: 10px;
  background: #e0eaff;
  border-radius: 5px;
  overflow: hidden;
  margin: 14px 0 12px;
}
.vie-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #2563eb);
  border-radius: 5px;
  transition: width .5s ease;
}

/* Иллюстрация (правый нижний угол) */
.vie-illus-wrap {
  position: absolute;
  right: -10px;
  bottom: -10px;
  width: 130px;
  height: 120px;
  opacity: .25;
  pointer-events: none;
}
.vie-illus-wrap svg { width: 100%; height: 100%; }

/* Подпись внизу карточки */
.vie-card-footer {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  padding-top: 2px;
}
.vie-open-last-btn {
  margin-left: auto;
  background: none;
  border: none;
  color: #2563eb;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
}

/* ─── Action-кнопки ─── */
.vie-actions { display: flex; flex-direction: column; gap: 10px; }

.vie-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 18px;
  border: none;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: opacity .15s, transform .1s;
}
.vie-btn:active { opacity: .88; transform: scale(.985); }

.vie-btn--blue {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  box-shadow: 0 4px 16px rgba(37,99,235,.35);
}
.vie-btn--white {
  background: #fff;
  box-shadow: 0 2px 12px rgba(15,23,42,.08);
}

.vie-btn-icon {
  width: 44px; height: 44px;
  border-radius: 13px;
  background: rgba(255,255,255,.22);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: #fff;
}
.vie-btn-icon--gray {
  background: #eff6ff;
  color: #2563eb;
}

.vie-btn-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.vie-btn--blue .vie-btn-text strong { color: #fff; font-size: 15px; font-weight: 700; }
.vie-btn--blue .vie-btn-text small  { color: rgba(255,255,255,.75); font-size: 12px; }
.vie-btn-text--dark strong { color: #0f172a; font-size: 15px; font-weight: 700; }
.vie-btn-text--dark small  { color: #64748b; font-size: 12px; }

.vie-btn-chev      { font-size: 22px; color: rgba(255,255,255,.6); line-height: 1; }
.vie-btn-chev--gray{ font-size: 22px; color: #94a3b8; line-height: 1; }

/* Убираем старые vie-last-* (заменены на vie-main-*) */
.vie-last-card, .vie-last-badge, .vie-last-title, .vie-last-sub, .vie-last-sku,
.vie-last-sku-num, .vie-last-sku-sep, .vie-last-sku-label, .vie-last-card-top,
.vie-last-card-left, .vie-last-card-right, .vie-last-counts, .vie-last-count,
.vie-last-progress-bar, .vie-last-progress-fill, .vie-last-footer, .vie-last-open-btn,
.vie-action-card, .vie-action-icon, .vie-action-text, .vie-action-chev,
.visinv-entry-circle-svg { display: none; }

/* Карточка последней инвентаризации */
.vie-last-card {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border-radius: 20px;
  padding: 18px 18px 14px;
  position: relative;
  overflow: hidden;
}
.vie-last-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #dcfce7;
  color: #16a34a;
  font-size: 12px;
  font-weight: 700;
  border-radius: 8px;
  padding: 3px 10px;
  margin-bottom: 10px;
}
.vie-last-title {
  font-size: 20px;
  font-weight: 800;
  color: #1e3a5f;
  line-height: 1.2;
  margin: 0 0 4px;
  letter-spacing: -0.02em;
}
.vie-last-sub {
  font-size: 13px;
  color: #6b7280;
  margin: 0 0 10px;
}
.vie-last-sku {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 10px;
}
.vie-last-sku-num {
  font-size: 36px;
  font-weight: 900;
  color: #2563eb;
  letter-spacing: -0.03em;
}
.vie-last-sku-sep { font-size: 18px; color: #6b7280; font-weight: 600; }
.vie-last-sku-label {
  font-size: 13px;
  color: #6b7280;
  font-weight: 600;
  background: #e5e7eb;
  border-radius: 6px;
  padding: 2px 7px;
}
.vie-last-card-top { display: flex; align-items: flex-start; gap: 10px; }
.vie-last-card-left { flex: 1; }
.vie-last-card-right { flex-shrink: 0; }
.vie-last-counts {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}
.vie-last-count {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 700;
  color: #374151;
}
.vie-last-count small { font-size: 11px; font-weight: 400; color: #6b7280; margin-left: 2px; }
.vie-last-count--ok { color: #2563eb; }
.vie-last-count--skip { color: #d97706; }
/* SVG круговой прогресс */
.visinv-entry-circle-svg { width: 80px; height: 80px; }
/* Прогресс-бар */
.vie-last-progress-bar {
  height: 8px;
  background: rgba(255,255,255,.6);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
}
.vie-last-progress-fill {
  height: 100%;
  background: #2563eb;
  border-radius: 4px;
  transition: width .4s;
}
.vie-last-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #374151;
}
.vie-last-open-btn {
  margin-left: auto;
  background: none;
  border: none;
  color: #2563eb;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
}
/* Кнопки действий */
.vie-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.vie-action-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 16px;
  border-radius: 16px;
  border: none;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: opacity .15s;
}
.vie-action-card:active { opacity: .85; }
.vie-action-card--blue {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
}
.vie-action-card--white {
  background: #fff;
  color: #111827;
  box-shadow: 0 2px 10px rgba(15,23,42,.07);
}
.vie-action-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.vie-action-icon--gray {
  background: #eff6ff;
  color: #2563eb;
}
.vie-action-card--white .vie-action-icon { background: #eff6ff; color: #2563eb; }
.vie-action-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.vie-action-card--blue .vie-action-text strong { color: #fff; font-size: 15px; font-weight: 700; }
.vie-action-card--blue .vie-action-text small { color: rgba(255,255,255,.75); font-size: 12px; }
.vie-action-card--white .vie-action-text strong { color: #111827; font-size: 15px; font-weight: 700; }
.vie-action-card--white .vie-action-text small { color: #6b7280; font-size: 12px; }
.vie-action-chev { font-size: 20px; font-weight: 300; color: rgba(255,255,255,.7); }
.vie-action-chev--gray { color: #9ca3af; }

/* ══ Карточки истории инвентаризаций (дизайн 1:1) ══ */
.fhi-card {
  background: #fff;
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 2px 10px rgba(15,23,42,.07);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.fhi-card:active { opacity: .92; }

/* Верхняя строка: иконка + заголовок + статус + стрелка */
.fhi-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.fhi-card-left { display: flex; align-items: center; gap: 10px; }
.fhi-card-right-top { display: flex; align-items: center; gap: 6px; }

/* Иконка */
.fhi-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.fhi-icon svg { width: 18px; height: 18px; }
.fhi-icon--ok   { background: #22c55e; }
.fhi-icon--warn { background: #f59e0b; }

.fhi-title { font-size: 15px; font-weight: 700; color: #0f172a; }
.fhi-uid {
  display: inline-flex;
  margin-top: 3px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
}
.fhi-date  { font-size: 12px; color: #64748b; margin-top: 1px; }

/* Бейдж статуса */
.fhi-badge {
  font-size: 11px; font-weight: 700;
  border-radius: 20px; padding: 3px 10px;
}
.fhi-badge--ok   { background: #dcfce7; color: #16a34a; }
.fhi-badge--warn { background: #fef3c7; color: #b45309; }
.fhi-badge--sent { background: #dbeafe; color: #1d4ed8; }
.fhi-icon--sent  { background: #2563eb; }

/* Строка статистики */
.fhi-stats-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.fhi-stats-row > div:not(.fhi-ring) { flex: 1; }
.fhi-stat-num { font-size: 22px; font-weight: 800; line-height: 1; }
.fhi-stat-num--blue   { color: #2563eb; }
.fhi-stat-num--orange { color: #f59e0b; }
.fhi-stat-label { font-size: 11px; color: #64748b; margin-top: 2px; }
.fhi-ring { flex-shrink: 0; }

/* Прогресс-бар */
.fhi-bar-wrap {
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}
.fhi-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #60a5fa, #2563eb);
  border-radius: 4px;
  transition: width .4s;
}

/* Подвал карточки */
.fhi-footer {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #64748b;
  flex-wrap: wrap;
}
.fhi-footer-text { flex: 1; }
.fhi-share-btn {
  display: inline-flex; align-items: center; gap: 4px;
  background: none; border: 1px solid #e2e8f0;
  border-radius: 8px; padding: 3px 9px;
  font-size: 12px; color: #2563eb; cursor: pointer;
}
.fhi-share-btn:active { background: #eff6ff; }
.fhi-pending-actions {
  display: flex; gap: 8px; margin-top: 8px; width: 100%;
}

/* ══ Полноэкранная история ══ */
.visinv-full-history-dialog {}
.visinv-full-hist-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 17px;
  padding-top: calc(var(--visinv-safe-top, 0px) + env(safe-area-inset-top, 0px) + 18px);
}
.visinv-full-hist-tabs {
  display: flex;
  padding: 0 16px;
  gap: 0;
  border-bottom: 2px solid #f1f5f9;
  flex-shrink: 0;
}
.visinv-hist-tab {
  flex: 1;
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
  padding: 10px 0;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}
.visinv-hist-tab--active { color: #2563eb; border-bottom-color: #2563eb; }
.visinv-full-hist-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 12px;
  background: #f3f4f6;
  border-radius: 10px;
  padding: 8px 12px;
  flex-shrink: 0;
}
.visinv-hist-search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  outline: none;
  color: #111827;
}
.visinv-full-hist-list {
  padding: 6px 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.visinv-hist-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #fff;
  border-radius: 14px;
  padding: 13px 12px;
  box-shadow: 0 1px 6px rgba(15,23,42,.06);
}
.visinv-hist-item-ico {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.visinv-hist-item-ico--mine { background: #eff6ff; color: #2563eb; }
.visinv-hist-item-ico--rx { background: #fef3c7; color: #d97706; }
.visinv-hist-item-body { flex: 1; min-width: 0; }
.visinv-hist-item-uid { font-size: 14px; font-weight: 700; color: #111827; margin-bottom: 2px; }
.visinv-hist-item-sub { font-size: 12px; color: #6b7280; margin-bottom: 3px; }
.visinv-hist-item-counts { display: flex; gap: 8px; font-size: 12px; font-weight: 600; flex-wrap: wrap; }
.visinv-hist-ct { padding: 2px 6px; border-radius: 5px; }
.visinv-hist-ct--ok { background: #d1fae5; color: #065f46; }
.visinv-hist-ct--low { background: #fef3c7; color: #92400e; }
.visinv-hist-ct--none { background: #fee2e2; color: #991b1b; }
.visinv-hist-badge { font-size: 11px; font-weight: 600; border-radius: 5px; padding: 1px 6px; margin-left: 4px; }
.visinv-hist-badge--active { background: #d1fae5; color: #065f46; }
.visinv-hist-badge--draft { background: #fef3c7; color: #92400e; }
.visinv-hist-badge--archive { background: #f3f4f6; color: #374151; }
.visinv-hist-badge--sent { background: #ede9fe; color: #5b21b6; }
.visinv-hist-badge--received { background: #d1fae5; color: #065f46; }
.visinv-hist-badge--rejected { background: #fee2e2; color: #991b1b; }
.visinv-hist-badge--pending { background: #fef3c7; color: #92400e; }
.visinv-hist-pending-actions { margin-top: 8px; }
.visinv-hist-open-btn {
  background: #f3f4f6;
  border: none;
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
  color: #6b7280;
}
.visinv-hist-open-btn:active { background: #e5e7eb; }

.visinv-entry {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 8px max(16px, env(safe-area-inset-right, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  max-width: 440px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  min-height: calc(100dvh - 80px);
  justify-content: space-between;
}

.visinv-entry-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding-top: 4px;
}

.visinv-entry-card {
  background: #fff;
  border-radius: 22px;
  padding: 20px 18px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.07);
}

.visinv-hero-img {
  display: block;
  width: min(300px, 92vw);
  max-width: 100%;
  height: auto;
  max-height: min(220px, 32vh);
  object-fit: contain;
  border-radius: 18px;
  background: transparent;
}

.visinv-entry-title {
  margin: 0;
  font-size: clamp(20px, 5vw, 24px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0b1220;
  line-height: 1.2;
}

.visinv-entry-lead {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

.visinv-entry-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Кнопки входа */
.visinv-entry-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 15px 14px;
  border-radius: 18px;
  border: 1px solid transparent;
  font: inherit;
  cursor: pointer;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.visinv-entry-btn:active {
  transform: scale(0.985);
}

.visinv-entry-btn--primary {
  background: linear-gradient(160deg, #1a7cff 0%, #0b52f0 100%);
  color: #fff;
  box-shadow: 0 12px 28px rgba(11, 82, 240, 0.38);
}

.visinv-entry-btn--ghost {
  background: #fff;
  color: #0f172a;
  border-color: #dde4f0;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.visinv-entry-btn-ico {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.18);
  color: #fff;
  font-size: 22px;
  font-weight: 300;
  box-sizing: border-box;
}

.visinv-entry-btn--ghost .visinv-entry-btn-ico {
  background: #eef3fd;
  color: #0b74ff;
}

.visinv-entry-btn-ico--on {
  background: rgba(255,255,255,0.22);
}

.visinv-entry-btn-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.visinv-entry-btn-text strong {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}

.visinv-entry-btn-text small {
  font-size: 13px;
  font-weight: 400;
  opacity: 0.82;
  line-height: 1.3;
}

.visinv-entry-btn--ghost .visinv-entry-btn-text small {
  color: #64748b;
  opacity: 1;
}

.visinv-entry-btn-chev {
  flex-shrink: 0;
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
  opacity: 0.75;
}

/* Подсказка */
.visinv-tip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #dbeafe;
  border: 1px solid #bfdbfe;
}

.visinv-tip-ico {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #0b74ff;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  font-style: italic;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  margin-top: 1px;
}

.visinv-tip p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: #1e3a5f;
}

/* ── Экран 2: Мастер (по одному SKU) ────────────── */
/* Мастер: верх — прогресс + карточка (скролл), низ — кнопки фиксированы */
.visinv-wizard {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}
/* Скроллируемая часть: статистика + карточка товара */
.visinv-wizard-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 6px 12px 12px;
}
/* Фиксированная нижняя панель: кнопки + подсказка */
.visinv-wizard-footer {
  flex-shrink: 0;
  padding: 8px 12px calc(env(safe-area-inset-bottom, 0px) + 10px);
  background: #f6f7fb;
  border-top: 1px solid rgba(0,0,0,.06);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Статистика */
.visinv-stats {
  background: #fff;
  border: 1px solid #e0e8f5;
  border-radius: 20px;
  padding: 14px 16px 12px;
}

.visinv-stats-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.visinv-stat-main {
  font-size: 18px;
  font-weight: 500;
  color: #64748b;
  line-height: 1.1;
}

.visinv-stat-main strong {
  font-size: 28px;
  font-weight: 800;
  color: #0f172a;
}

.visinv-stats-right {
  display: flex;
  gap: 18px;
}

.visinv-stat-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.visinv-stat-col strong {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
}

.visinv-stat-col span {
  font-size: 11px;
  color: #94a3b8;
}

.visinv-progress-wrap {
  margin-bottom: 8px;
}

.visinv-progress-track {
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
  position: relative;
}

.visinv-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0b74ff, #0052d4);
  transition: width 0.25s ease;
  position: relative;
  min-width: 12px;
}

.visinv-progress-dot {
  position: absolute;
  right: -1px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #0b74ff;
  border: 2.5px solid #fff;
  box-shadow: 0 0 0 1.5px #0b74ff;
}

.visinv-stats-note {
  text-align: center;
  font-size: 13px;
  margin: 0;
}

/* Карточка товара */
.visinv-card {
  background: #fff;
  border-radius: 20px;
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.visinv-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.visinv-card-num {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1.5px solid #bfdbfe;
  background: #eff6ff;
  font-size: 13px;
  font-weight: 700;
  color: #1d4ed8;
  line-height: 1;
}

.visinv-skip-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
  border-radius: 0;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  width: auto;
  flex-shrink: 0;
}

.visinv-skip-btn:active { opacity: 0.7; }

/* Контейнер фото: фиксированный размер, фото центрируется внутри */
.visinv-card-photo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
/* Фиксированное «окно» под фото — высота не меняется при смене изображения */
.visinv-card-photo-box {
  width: 100%;
  height: min(240px, 38vh);
  border-radius: 14px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.visinv-card-photo-box--volume-attn {
  box-shadow: 0 0 0 3px #fdba74;
}
.visinv-card-photo {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border: 0;
  transition: opacity .2s;
  display: block;
}
.visinv-card-photo[src=""] { opacity: 0; }

.visinv-card-photo.is-loading,
.order-pick-photo.is-loading,
.vr2-thumb.is-loading,
.order-pick-next-thumb.is-loading {
  opacity: 0.45;
  filter: blur(1px);
}

.visinv-card-photo.is-error,
.order-pick-photo.is-error,
.vr2-thumb.is-error,
.order-pick-next-thumb.is-error {
  opacity: 0.35;
}

.visinv-card-photo--empty {
  width: 100%;
  height: min(240px, 38vh);
  background: #f1f5f9;
  border-radius: 14px;
}

.visinv-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.visinv-dot {
  width: 7px;
  height: 7px;
  min-width: 7px;
  border-radius: 999px;
  background: #cbd5e1;
  border: 0;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
  transition: width 0.15s ease, background 0.15s ease;
}

.visinv-dot.is-active {
  background: #0b74ff;
  width: 18px;
}

span.visinv-dot { display: inline-block; background: #0b74ff; width: 7px; }

.visinv-card-info {
  margin-top: 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Мета-чипы: "Вы обычно заказываете" и "Последний раз покупали" */
.visinv-card-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.visinv-meta-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f1f6ff;
  border-radius: 12px;
  padding: 9px 10px;
}

.visinv-meta-ico {
  flex-shrink: 0;
  color: #2563eb;
  display: flex;
  align-items: center;
}

.visinv-meta-chip div {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.visinv-meta-label {
  font-size: 10px;
  color: #64748b;
  line-height: 1.2;
}

.visinv-meta-chip strong {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}

.visinv-card-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
  min-height: calc(17px * 1.25 * 2);
  max-height: calc(17px * 1.25 * 2);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.visinv-card-volume {
  margin: 4px 0 0;
  font-size: 15px;
  font-weight: 600;
  color: #475569;
  line-height: 1.3;
}

.visinv-card-detail {
  margin: 4px 0 0;
  font-size: 13px;
  color: #64748b;
  line-height: 1.4;
}

.visinv-wizard-back-row {
  flex-shrink: 0;
  min-height: 42px;
  display: flex;
  align-items: center;
}

.visinv-wizard-back-btn {
  width: 100%;
  margin: 0;
}

.visinv-wizard-back-btn.is-placeholder {
  visibility: hidden;
  pointer-events: none;
}

/* Кнопки действий — плоские, горизонтальные */
.visinv-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.visinv-act {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 8px;
  border-radius: 16px;
  border: none;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.12s ease;
}

.visinv-act:active { opacity: 0.82; }

.visinv-act-ico {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.visinv-act-ico svg {
  width: 24px;
  height: 24px;
}

.visinv-act-label {
  display: flex;
  flex-direction: column;
  gap: 1px;
  text-align: left;
  min-width: 0;
}

.visinv-act strong {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

.visinv-act small {
  font-size: 10px;
  font-weight: 500;
  line-height: 1.2;
  opacity: 0.88;
  white-space: nowrap;
}

/* Зелёный — Есть */
.visinv-act--ok  { background: #22c55e; color: #fff; }

/* Жёлтый — Мало */
.visinv-act--low { background: #f59e0b; color: #fff; }

/* Красный — Нет */
.visinv-act--no  { background: #ef4444; color: #fff; }

/* Далее по маршруту (оставлено для обратной совместимости, не используется в новом дизайне) */
.visinv-next {
  background: #fff;
  border-radius: 16px;
  padding: 12px 14px;
}

.visinv-next-title {
  font-size: 12px;
  margin: 0 0 8px;
}

.visinv-next-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.visinv-next-list li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.visinv-next-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: #f1f5f9;
}

.visinv-next-thumb--empty {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #f1f5f9;
  flex-shrink: 0;
  display: inline-block;
}

.visinv-next-name {
  font-size: 13px;
  color: #334155;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Степперы в "Вы еще не заказывали" (+ экран завершения инвентаризации) */
.mini-unsold2-stepper {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 4px 6px;
  box-sizing: border-box;
  min-width: 0;
}
.mini-unsold2-step-btn {
  /* Глобально button { width:100% } — иначе в узкой колонке − / + переносятся столбиком */
  width: auto;
  min-width: 24px;
  height: 24px;
  border-radius: 7px;
  border: none;
  background: #e2e8f0;
  font-size: 16px;
  font-weight: 700;
  color: #334155;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  flex: 0 0 auto;
  -webkit-tap-highlight-color: transparent;
}
.mini-unsold2-step-qty {
  min-width: 24px; text-align: center; font-size: 14px; font-weight: 700;
  color: #64748b; display: flex; flex-direction: column; align-items: center;
  line-height: 1; gap: 1px;
}
.mini-unsold2-step-qty.is-active { color: #1d57e8; }
.mini-unsold2-step-qty small { font-size: 9px; font-weight: 500; color: #94a3b8; }

/* ── Новый экран завершения инвентаризации (vr2) ── */
.vr2-screen {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 8px 12px calc(20px + env(safe-area-inset-bottom, 0px));
  /* Контент скроллится в #visinv-root; блок не тянем на всю вьюпорт лишней высотой */
  flex-shrink: 0;
}

/* Итоги инвентаризации: .vr2-screen { flex-shrink:0 } выше ломает внутренний .vr2-scroll */
.vr2-screen.vr2-screen--restock {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  height: 100%;
  flex-shrink: 1;
  padding: 8px 0 0;
  gap: 0;
  box-sizing: border-box;
}

.vr2-success-banner { display: flex; align-items: center; gap: 12px; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 18px; padding: 14px 16px; }
.vr2-success-ico { flex-shrink: 0; width: 44px; height: 44px; border-radius: 999px; background: #22c55e; color: #fff; font-size: 22px; display: flex; align-items: center; justify-content: center; }
.vr2-success-banner strong { font-size: 15px; font-weight: 700; color: #14532d; display: block; }
.vr2-success-banner .muted { font-size: 13px; line-height: 1.4; }
.vr2-success-banner--warn { background: #fff7ed; border-color: #fed7aa; }
.vr2-success-banner--warn .vr2-success-ico { background: #f97316; }
.vr2-success-banner--warn strong { color: #9a3412; }
.vr2-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.vr2-quick-fill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05);
}
.vr2-quick-fill-btn {
  flex-shrink: 0;
  min-width: 64px;
  padding: 8px 14px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.vr2-quick-fill-btn:active { opacity: 0.88; }
.vr2-quick-fill-hint {
  font-size: 12px;
  line-height: 1.35;
}
.vr2-stat { background: #fff; border-radius: 14px; padding: 10px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; font-size: 11px; color: #64748b; box-shadow: 0 1px 4px rgba(15,23,42,0.06); }
.vr2-stat svg { width: 20px; height: 20px; }
.vr2-stat strong { font-size: 22px; font-weight: 800; line-height: 1; }
.vr2-stat--ok  { border-top: 3px solid #22c55e; } .vr2-stat--ok  svg, .vr2-stat--ok  strong { color: #16a34a; }
.vr2-stat--low { border-top: 3px solid #f59e0b; } .vr2-stat--low svg, .vr2-stat--low strong { color: #d97706; }
.vr2-stat--none{ border-top: 3px solid #ef4444; } .vr2-stat--none svg, .vr2-stat--none strong { color: #dc2626; }
.vr2-section {
  background: #fff;
  border-radius: 16px;
  overflow: visible;
  box-shadow: 0 1px 6px rgba(15,23,42,0.07);
  flex-shrink: 0;
}
.vr2-section-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px 4px; flex-wrap: nowrap; width: 100%; box-sizing: border-box; }
.vr2-section-head-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 auto;
  min-width: 0;
}
.vr2-section-title { font-size: 14px; font-weight: 700; color: #0f172a; flex: 0 0 auto; white-space: nowrap; }
.vr2-section-fill-btn {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  margin-left: auto;
  padding: 6px 12px;
  border: none;
  border-radius: 10px;
  background: #eff6ff;
  color: #1d4ed8;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.vr2-section-fill-btn:active { opacity: 0.85; }

.visinv-fill-dialog:not([open]) {
  display: none;
}
.visinv-fill-dialog {
  margin: 0;
  padding: 0;
  border: none;
  max-width: 100%;
  width: 100%;
  height: 100%;
  max-height: 100%;
  background: transparent;
  overflow: visible;
}
.visinv-fill-dialog[open] {
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.visinv-fill-dialog::backdrop {
  background: rgba(15, 23, 42, 0.42);
}
.visinv-fill-dialog-sheet {
  position: relative;
  z-index: 1;
  width: min(100%, 440px);
  margin: 0 auto;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  border-radius: 20px 20px 0 0;
  background: #fff;
  box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.16);
}
.visinv-fill-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.visinv-fill-dialog-head strong { font-size: 16px; }
.visinv-fill-dialog-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 10px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 16px;
  cursor: pointer;
}
.visinv-fill-dialog-lead { margin: 0 0 12px; font-size: 13px; line-height: 1.4; }
.visinv-fill-mode-btns,
.visinv-fill-pct-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.visinv-fill-pct-btns { grid-template-columns: repeat(3, 1fr); }
.visinv-fill-mode-btn,
.visinv-fill-pct-btn,
.visinv-fill-apply-btn {
  padding: 14px 12px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.visinv-fill-pct-btn { font-size: 16px; }
.visinv-fill-back-btn {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 10px;
  border: none;
  background: none;
  color: #64748b;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.visinv-fill-pack-field {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.visinv-fill-pack-field span { font-size: 14px; font-weight: 600; color: #334155; }
.visinv-fill-pack-field input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  font: inherit;
  font-size: 18px;
  font-weight: 700;
}
.visinv-fill-apply-btn { width: 100%; }

.vr2-section-badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.vr2-section-badge.ok   { background: #dcfce7; color: #166534; }
.vr2-section-badge.low  { background: #fef3c7; color: #d97706; }
.vr2-section-badge.none { background: #fee2e2; color: #dc2626; }
.vr2-section-hint { font-size: 12px; padding: 0 14px 8px; margin: 0; color: #64748b; }
.vr2-table-head { display: grid; grid-template-columns: 1fr minmax(0, 96px) minmax(0, 96px); gap: 4px; padding: 4px 14px 6px; font-size: 11px; color: #94a3b8; font-weight: 600; border-bottom: 1px solid #f0f4fa; }
.vr2-row { display: grid; grid-template-columns: 48px 1fr minmax(0, 96px) minmax(0, 96px); gap: 8px; align-items: center; padding: 10px 14px; border-bottom: 1px solid #f0f4fa; }
.vr2-table-head--status { grid-template-columns: 1fr minmax(0, 112px); }
.vr2-row--status { grid-template-columns: 48px 1fr minmax(0, 112px); }
.vr2-row--employee-edit {
  grid-template-columns: 48px 1fr minmax(0, 168px);
  align-items: center;
}
.vr2-table-head--edit {
  grid-template-columns: 1fr minmax(0, 168px);
}
.vr2-status-edit {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
}
.vr2-status-edit-btn {
  border: 1.5px solid #e2e8f0;
  background: #fff;
  color: #475569;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.vr2-status-edit-btn.is-active {
  color: #fff;
  border-color: transparent;
}
.vr2-status-edit-btn--none.is-active { background: #ef4444; }
.vr2-status-edit-btn--low.is-active { background: #f59e0b; }
.vr2-status-edit-btn--ok.is-active { background: #22c55e; }
.vr2-status-edit-btn:not(.is-active):active { background: #f1f5f9; }
.vr2-edit-hint {
  margin: 0 12px 10px;
  padding: 10px 12px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.4;
}
.vr2-reopen-btn {
  justify-self: end;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  color: #0f172a;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.vr2-reopen-btn:active { background: #f1f5f9; }
.vr2-row:last-of-type { border-bottom: none; }
.vr2-thumb-wrap {
  border: none;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: zoom-in;
  border-radius: 10px;
  overflow: hidden;
  display: block;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}
.vr2-thumb-wrap .vr2-thumb {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  background: #f8fafc;
  display: block;
}
.vr2-thumb { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; background: #f8fafc; display: block; }
.vr2-thumb--empty { width: 48px; height: 48px; border-radius: 10px; background: #f1f5f9; display: inline-block; }
.vr2-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.vr2-info .visinv-volume-notice {
  margin: 6px 0 2px;
  padding: 8px 10px;
  text-align: left;
}
.vr2-info .visinv-volume-notice-value {
  font-size: 18px;
}
.vr2-row--volume-attn .vr2-thumb,
.vr2-row--volume-attn .vr2-thumb-wrap {
  box-shadow: 0 0 0 2px #fdba74;
  border-radius: 10px;
}
.vr2-name { font-size: 13px; font-weight: 600; color: #0f172a; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; line-height: 1.3; }
.vr2-pack-info { font-size: 11px; color: #94a3b8; }
.vr2-status-pill {
  justify-self: end;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}
.vr2-status-pill.low {
  background: #fef3c7;
  color: #d97706;
}
.vr2-status-pill.none {
  background: #fee2e2;
  color: #dc2626;
}
.vr2-status-pill.ok {
  background: #dcfce7;
  color: #16a34a;
}
/* Ячейки со степперами — те же классы, что «Вы еще не заказывали» (.mini-unsold2-stepper) */
.vr2-cell-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
}
.vr2-cell-step .mini-unsold2-stepper {
  flex-shrink: 0;
  align-self: center;
}
.vr2-cell-step .mini-unsold2-step-btn {
  width: auto;
}
.vr2-unit-price {
  font-size: 10px;
  color: #94a3b8;
  text-align: center;
  line-height: 1.2;
  max-width: 100%;
}
.vr2-cell-step--na {
  justify-content: center;
  align-items: center;
  min-height: 44px;
}
.vr2-cell-step--readonly {
  min-height: 44px;
}
.vr2-readonly-qty {
  min-width: 34px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}
.vr2-readonly-qty.is-active {
  background: #dbeafe;
  color: #1d57e8;
}
.vr2-show-all { display: block; width: 100%; padding: 10px; border: none; background: none; color: #1d57e8; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; text-align: center; border-top: 1px solid #f0f4fa; -webkit-tap-highlight-color: transparent; }
.vr2-footer { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
.vr2-footer-sum { text-align: center; font-size: 14px; margin: 0; }
.vr2-footer-sum strong { color: #0f172a; font-weight: 800; }
.vr2-btn-primary { width: 100%; padding: 16px; border-radius: 18px; border: none; background: #1d57e8; color: #fff; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 8px 20px rgba(29,87,232,0.35); -webkit-tap-highlight-color: transparent; }
.vr2-btn-primary:disabled {
  background: #e5e7eb;
  color: #94a3b8;
  box-shadow: none;
  cursor: not-allowed;
}
.vr2-btn-primary.is-busy,
.vr2-btn-success.is-busy {
  pointer-events: none;
  opacity: 0.92;
}
.visinv-cart-btn-spin {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  flex-shrink: 0;
  animation: visinv-cart-spin 0.7s linear infinite;
}
.vr2-btn-success .visinv-cart-btn-spin {
  border-color: rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
}
.visinv-cart-add-overlay-host {
  position: relative;
}
.visinv-cart-add-overlay {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: visinv-cart-overlay-in 0.2s ease-out;
}
.visinv-cart-add-overlay-card {
  width: min(100%, 320px);
  padding: 22px 20px 18px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
  text-align: center;
}
.visinv-cart-add-overlay-spinner {
  width: 44px;
  height: 44px;
  margin: 0 auto 14px;
  border: 3px solid #e2e8f0;
  border-top-color: #1d57e8;
  border-radius: 50%;
  animation: visinv-cart-spin 0.75s linear infinite;
}
.visinv-cart-add-overlay-check {
  width: 44px;
  height: 44px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  line-height: 44px;
  animation: visinv-cart-check-pop 0.35s ease-out;
}
.visinv-cart-add-overlay-title {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
}
.visinv-cart-add-overlay-progress {
  margin: 0 0 14px;
  font-size: 14px;
  color: #64748b;
}
.visinv-cart-add-overlay-bar {
  height: 6px;
  border-radius: 999px;
  background: #e8eef7;
  overflow: hidden;
}
.visinv-cart-add-overlay-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1d57e8, #3b82f6);
  transition: width 0.12s ease-out;
}
.visinv-cart-add-overlay.is-success .visinv-cart-add-overlay-card {
  box-shadow: 0 16px 40px rgba(34, 197, 94, 0.22);
}
@keyframes visinv-cart-spin {
  to { transform: rotate(360deg); }
}
@keyframes visinv-cart-overlay-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes visinv-cart-check-pop {
  0% { transform: scale(0.6); opacity: 0; }
  70% { transform: scale(1.08); }
  100% { transform: scale(1); opacity: 1; }
}
.vr2-btn-success {
  width: 100%;
  padding: 16px;
  border-radius: 18px;
  border: none;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 20px rgba(34,197,94,0.32);
  -webkit-tap-highlight-color: transparent;
}
.vr2-btn-success:disabled {
  background: #e5e7eb;
  color: #94a3b8;
  box-shadow: none;
  cursor: not-allowed;
}
.vr2-ordered-note {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 16px;
  padding: 12px 14px;
  color: #14532d;
}
.vr2-ordered-note > strong {
  display: block;
  font-size: 13px;
  margin-bottom: 8px;
}
.vr2-ordered-note ul {
  display: flex;
  flex-direction: column;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.vr2-ordered-note li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}
.vr2-ordered-note li span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vr2-ordered-note li strong {
  flex-shrink: 0;
}
.vr2-btn-ghost { width: 100%; padding: 14px; border-radius: 18px; border: 1.5px solid #e2e8f0; background: #fff; color: #334155; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; -webkit-tap-highlight-color: transparent; }
.vr2-all-ok { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 40px 20px; text-align: center; }
.vr2-ok-icon { width: 56px; height: 56px; border-radius: 999px; background: #22c55e; color: #fff; font-size: 28px; display: flex; align-items: center; justify-content: center; margin: 0 auto; }

/* ── Экран 3 legacy ─── */
.visinv-restock {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 14px calc(16px + env(safe-area-inset-bottom, 0px));
}

.visinv-restock-lead {
  font-size: 14px;
  margin: 0;
}

.visinv-restock-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
}

.visinv-restock-row {
  display: grid;
  grid-template-columns: 52px 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  row-gap: 6px;
  padding: 12px 14px;
  border-bottom: 1px solid #f0f4f9;
}

.visinv-restock-row:last-child { border-bottom: 0; }

.visinv-restock-thumb {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  grid-row: 1 / 3;
  background: #f1f5f9;
}

.visinv-restock-thumb--empty {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: #f1f5f9;
  grid-row: 1 / 3;
  display: block;
}

.visinv-restock-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.visinv-restock-name {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.visinv-badge {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
}

.visinv-badge--none { background: #fee2e2; color: #dc2626; }
.visinv-badge--low  { background: #fef3c7; color: #d97706; }

.visinv-restock-steppers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  grid-column: 2;
}

.visinv-stepper {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 4px 8px;
}

.visinv-stepper strong {
  font-size: 15px;
  font-weight: 700;
  min-width: 3ch;
  text-align: center;
  color: #0f172a;
}

.visinv-step-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid #dde4f0;
  background: #fff;
  color: #0f172a;
  font-size: 18px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.visinv-restock-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.visinv-finish-btn {
  width: 100%;
  padding: 15px;
  border-radius: 16px;
  border: 1px solid #dde4f0;
  background: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.visinv-finish-btn--primary {
  background: linear-gradient(160deg, #1a7cff 0%, #0b52f0 100%);
  color: #fff;
  border-color: #0b52f0;
  box-shadow: 0 10px 24px rgba(11, 82, 240, 0.35);
}

.visinv-restock-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 40px 20px;
  text-align: center;
}

.visinv-restock-done-icon {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: #dcfce7;
  color: #16a34a;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

/* Модальное окно подтверждения сброса инвентаризации */
/* Внутри dialog (top layer) — position:absolute, за пределами — position:fixed */
.visinv-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: visinvFadeIn 0.15s ease;
}

/* Когда оверлей внутри dialog — нужен absolute */
dialog .visinv-confirm-overlay {
  position: absolute;
}

/* Увеличение фото на экране завершения инвентаризации */
.visinv-zoom-overlay {
  position: fixed;
  inset: 0;
  z-index: 13050;
  background: rgba(15, 23, 42, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-top));
  box-sizing: border-box;
  animation: visinvFadeIn 0.15s ease;
}
.visinv-zoom-img {
  max-width: 100%;
  max-height: min(88dvh, 88vh);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}
.visinv-zoom-close {
  position: absolute;
  top: max(10px, calc(env(safe-area-inset-top, 0px) + 8px));
  right: max(12px, env(safe-area-inset-right, 0px));
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: none;
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
  font-size: 26px;
  line-height: 1;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 2;
  -webkit-tap-highlight-color: transparent;
}

@keyframes visinvFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.visinv-confirm-modal {
  background: #fff;
  border-radius: 22px;
  padding: 28px 22px 22px;
  width: min(100%, 340px);
  text-align: center;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2);
  animation: visinvSlideUp 0.18s ease;
}

@keyframes visinvSlideUp {
  from { transform: translateY(16px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.visinv-confirm-ico {
  font-size: 40px;
  margin-bottom: 12px;
  line-height: 1;
}

.visinv-confirm-title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
}

.visinv-confirm-text {
  margin: 0 0 22px;
  font-size: 14px;
  color: #64748b;
  line-height: 1.5;
}

.visinv-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.visinv-confirm-btn {
  padding: 13px 10px;
  border-radius: 14px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.1s ease;
}

.visinv-confirm-btn:active { transform: scale(0.96); }

.visinv-confirm-btn--cancel {
  background: #f1f5f9;
  color: #334155;
}

.visinv-confirm-btn--danger {
  background: #ef4444;
  color: #fff;
}

.mini-filter-toggle-icon {
  width: 22px;
  height: 22px;
  display: block;
  pointer-events: none;
}

.mini-catalog-facet-panel {
  flex: 1 1 220px;
  min-width: 0;
}

@media (max-width: 520px) {
  .mini-catalog-facet-panel:not(.hidden) {
    flex-basis: 100%;
  }
}

.mini-catalog-facet-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.mini-catalog-facet {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  flex: 1 1 140px;
}

.mini-catalog-facet-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.mini-catalog-facet-select {
  width: 100%;
  margin: 0;
  font-size: 14px;
}

.mini-catalog-facet-reset-inline {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  align-self: center;
}

.mini-catalog-reset-btn {
  width: auto;
  white-space: nowrap;
  background: #f8fafc;
  color: #475569;
  border: 1px solid var(--border);
}

/* Каталог mini: плитки как у маркетплейса — фото сверху на всю ширину, мягкая тень, ровная сетка */
#miniapp-products .product-card {
  min-width: 0;
  padding: 10px 0 0;
  border: none;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.05),
    0 6px 20px rgba(15, 23, 42, 0.07);
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 0;
}

#miniapp-products .mini-catalog-card-body {
  padding: 10px 10px 6px;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

#miniapp-products .mini-catalog-card-country {
  margin: 2px 0 0;
  font-size: 11px;
  line-height: 1.25;
}

#miniapp-products .mini-catalog-card-controls {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
}

#miniapp-products .mini-catalog-hide-btn {
  border: 1px solid #dbe3ee;
  background: #f8fafc;
  color: #475569;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 600;
}

#miniapp-products .product-media-column.mini-product-media {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  border-radius: 0;
  flex-shrink: 0;
}

#miniapp-products .product-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

#miniapp-products .mini-catalog-product-img--lazy {
  opacity: 0;
}

#miniapp-products .mini-product-media {
  position: relative;
}

#miniapp-products .mini-product-media--out-of-stock .product-image,
#miniapp-products .mini-product-media--out-of-stock .mini-catalog-product-img {
  filter: grayscale(0.35) brightness(0.92);
}

.mini-product-out-of-stock-label {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.42);
  color: #fff;
  font-size: clamp(14px, 4vw, 18px);
  font-weight: 800;
  letter-spacing: 0.01em;
  text-align: center;
  line-height: 1.2;
}

.mini-product-out-of-stock-label--hero {
  border-radius: 18px;
}

.mini-product-hero--out-of-stock .mini-product-hero-image {
  filter: grayscale(0.35) brightness(0.92);
}

.mini-catalog-card--out-of-stock {
  opacity: 0.92;
}

.mini-offer-band--out-of-stock,
.mini-detail-offer-row--out-of-stock {
  opacity: 0.72;
}

.mini-offer-out-of-stock-note {
  margin: 0;
  padding: 8px 12px 12px;
  font-size: 13px;
  font-weight: 600;
}

.visibility-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

.switch-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
}

.switch-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.switch-track--warn {
  background: #fecaca;
}

.switch-input:checked + .switch-track--warn {
  background: #f97316;
}

.mini-supplier-product-top em.is-out {
  color: #c2410c;
}

.mini-product-overlay-corner {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  z-index: 1;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  box-sizing: border-box;
}

.mini-product-overlay-tags-slot {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.mini-product-country-tag {
  flex: 0 0 auto;
  max-width: min(132px, 46%);
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: #1e293b;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#miniapp-products .mini-product-overlay-corner .mini-product-country-tag {
  position: static;
}

.mini-product-tags-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
}

.mini-product-tag-pill {
  display: inline-block;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  background: var(--tag-bg, #64748b);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#miniapp-products .product-card h3 {
  margin: 0;
  font-size: 13px;
  line-height: 1.38;
  min-height: 2.76em;
  max-height: 2.76em;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #1e293b;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  word-break: break-word;
}

.product-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.admin-card {
  grid-template-columns: 120px 1fr;
  align-items: start;
  position: relative;
  padding-left: 42px;
}

.admin-card-content {
  display: grid;
  gap: 10px;
  position: relative;
  padding-right: 40px;
}

.admin-card .product-image {
  width: 120px;
  height: 120px;
}

.product-media-column {
  display: grid;
  gap: 6px;
  align-content: start;
}

.product-vertical-thumbs {
  display: grid;
  gap: 6px;
}

.product-media-tools {
  display: grid;
  gap: 6px;
}

.media-image-item {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.media-image-item .product-thumb {
  width: 100%;
  height: 100%;
}

.media-image-empty-slot {
  display: grid;
  place-items: center;
  gap: 4px;
  background: #f8fafc;
  color: #64748b;
}

.media-image-empty-plus {
  font-size: 22px;
  line-height: 1;
}

.media-image-overlay {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  padding: 8px;
  background: rgba(15, 23, 42, 0.3);
}

.media-image-item.selected .media-image-overlay {
  display: flex;
}

.media-image-item.selected .product-thumb {
  filter: brightness(0.72);
}

.product-thumb {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
  background: #eef2f7;
  border: 1px solid var(--border);
}

.product-image {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 10px;
  background: #eef2f7;
}

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chips-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.chip {
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
}

.chip--out-of-stock {
  background: #fef3c7;
  color: #b45309;
}

.brand-alias-chip {
  font-size: 11px;
  padding: 3px 7px;
  color: #334155;
  background: #f1f5f9;
}

.price-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
}

.mini-price-grid {
  align-items: flex-start;
}

.mini-price-col {
  display: grid;
  gap: 4px;
}

.mini-pack-meta {
  font-size: 13px;
}

#miniapp-products .mini-offer-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 8px 10px;
  margin-top: auto;
}

#miniapp-products .mini-offer-band {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  border-radius: 10px;
  overflow: hidden;
  min-height: 48px;
  width: 100%;
  max-width: 100%;
}

#miniapp-products .mini-offer-band--piece {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e8ecf1;
  box-shadow: inset 3px 0 0 #bae6fd;
}

#miniapp-products .mini-offer-band--pack {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e8ecf1;
  box-shadow: inset 3px 0 0 #86efac;
}

#miniapp-products .mini-offer-band-main {
  flex: 1;
  min-width: 0;
  padding: 8px 8px 8px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  overflow: hidden;
}

#miniapp-products .mini-offer-band-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#miniapp-products .mini-offer-band--piece .mini-offer-band-title {
  color: #334155;
}

#miniapp-products .mini-offer-band--pack .mini-offer-band-title {
  color: #334155;
}

#miniapp-products .mini-offer-band-price {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#miniapp-products .mini-offer-band-meta {
  font-size: 11px;
  line-height: 1.25;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#miniapp-products .mini-offer-empty {
  margin: 0;
  font-size: 13px;
}

#miniapp-products .mini-offer-band-controls {
  flex: 0 0 auto;
  /* На узкой карточке фиксированный min-width:96px раздувал строку и ломал выравнивание */
  width: clamp(76px, 34%, 112px);
  min-width: 0;
  max-width: 42%;
  display: flex;
  align-items: stretch;
  align-self: stretch;
}

#miniapp-products .mini-offer-band-controls--piece {
  border-left: 1px solid #e8ecf1;
  background: rgba(255, 255, 255, 0.85);
}

#miniapp-products .mini-offer-band-controls--pack {
  border-left: 1px solid #e8ecf1;
  background: rgba(255, 255, 255, 0.85);
}

#miniapp-products .mini-offer-band-stepper {
  display: grid;
  grid-template-columns: 1fr minmax(26px, auto) 1fr;
  align-items: stretch;
  width: 100%;
  min-height: 48px;
}

#miniapp-products .mini-offer-band-stepper--piece .mini-offer-band-step-btn {
  color: #0ea5e9;
}

#miniapp-products .mini-offer-band-stepper--piece .mini-offer-band-qty {
  color: #0f172a;
}

#miniapp-products .mini-offer-band-stepper--pack .mini-offer-band-step-btn {
  color: #0ea5e9;
}

#miniapp-products .mini-offer-band-stepper--pack .mini-offer-band-qty {
  color: #0f172a;
}

#miniapp-products .mini-offer-band-step-btn {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  font-weight: 700;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#miniapp-products .mini-offer-band-step-btn:active {
  background: rgba(15, 23, 42, 0.06);
}

#miniapp-products .mini-offer-band-qty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  border-left: 1px solid rgba(148, 163, 184, 0.35);
  border-right: 1px solid rgba(148, 163, 184, 0.35);
}

#miniapp-products .mini-offer-band-plus {
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  font-weight: 700;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
}

#miniapp-products .mini-offer-band-plus--piece {
  background: rgba(255, 255, 255, 0.95);
  color: #0ea5e9;
}

#miniapp-products .mini-offer-band-plus--piece:active {
  background: #f0f9ff;
}

#miniapp-products .mini-offer-band-plus--pack {
  background: rgba(255, 255, 255, 0.95);
  color: #0ea5e9;
}

#miniapp-products .mini-offer-band-plus--pack:active {
  background: #f0f9ff;
}

.mini-buy-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mini-buy-btn {
  background: #0ea5e9;
  color: #fff;
  border-color: #0ea5e9;
  padding: 7px 10px;
}

.mini-buy-mode-btn {
  border: 1px solid #dbeafe;
  background: #f8fbff;
  color: #1d4ed8;
  border-radius: 12px;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 44px;
  align-items: center;
  overflow: hidden;
}

.mini-buy-mode-label {
  font-weight: 700;
  font-size: 20px;
  line-height: 1;
  text-align: center;
  padding: 14px 8px;
}

.mini-buy-mode-plus {
  border-left: 1px solid #dbeafe;
  font-weight: 700;
  font-size: 28px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #2563eb;
  background: #eff6ff;
}

.mini-buy-mode-filled {
  cursor: default;
}

.mini-buy-mode-stepper {
  display: grid;
  grid-template-columns: minmax(28px, 32px) minmax(22px, 1fr) minmax(28px, 32px);
  align-items: stretch;
  align-self: stretch;
  min-height: 48px;
  border-left: 1px solid #dbeafe;
  background: #eff6ff;
}

.mini-buy-step-btn {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #2563eb;
  font-weight: 700;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mini-buy-step-btn:active {
  background: rgba(37, 99, 235, 0.12);
}

.mini-buy-step-qty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  color: #1e40af;
  min-width: 0;
}

.mini-catalog-top-bar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  position: relative;
  z-index: 12;
  margin: 0 0 10px;
  padding: 0 0 10px;
  box-sizing: border-box;
  background: transparent;
}

/* Full-bleed: поиск и категории до краёв вьюпорта */
body.mini-app-page .mini-catalog-top-bar {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  padding-left: calc(50vw - 50%);
  padding-right: calc(50vw - 50%);
}

/* «Каталог» и корзина — закреплены при прокрутке (fixed: стабильнее sticky в Telegram WebView) */
body.mini-app-page {
  --mini-catalog-head-fixed-h: 52px;
}

body.mini-app-page [data-mini-section="catalog"]:not(.hidden) .mini-catalog-head-row {
  position: fixed;
  left: 0;
  right: 0;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  max-width: min(1100px, 100%);
  margin: 0 auto;
  padding: 8px var(--mini-side-pad, 12px) 10px;
  box-sizing: border-box;
  background: var(--bg, #f6f7fb);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
}

body.mini-app-page.tg-webapp [data-mini-section="catalog"]:not(.hidden) .mini-catalog-head-row {
  top: var(--mini-fullscreen-safe-top, 48px);
}

body.mini-app-page [data-mini-section="catalog"]:not(.hidden) .mini-catalog-search-line {
  margin-top: var(--mini-catalog-head-fixed-h);
}

.mini-catalog-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.mini-catalog-search-line {
  display: flex;
  width: 100%;
  min-width: 0;
}

.mini-catalog-title {
  margin: 0;
  line-height: 1.2;
  white-space: nowrap;
  min-width: 0;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.mini-catalog-top-bar .mini-catalog-search-input {
  height: 42px;
  margin: 0;
  padding-left: 12px;
  padding-right: 12px;
}

@media (max-width: 380px) {
  .mini-catalog-top-bar {
    gap: 8px;
  }

  .mini-catalog-title {
    font-size: 22px;
  }

  .mini-catalog-top-bar .mini-catalog-search-input {
    height: 40px;
    padding-left: 10px;
    padding-right: 10px;
    font-size: 14px;
  }

  .mini-filter-toggle-btn {
    width: 40px;
    height: 40px;
  }
}

.mini-cart-panel {
  position: fixed;
  inset: 0;
  z-index: 10040;
  border-radius: 0;
  margin: 0;
  max-height: 100vh;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0;
  box-shadow: none;
  padding: 0;
  background: #f8fafc;
}

.mini-cart-panel-scroll {
  --mini-cart-side-pad: var(--mini-side-pad, 12px);
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px var(--mini-cart-side-pad) 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mini-cart-checkout-footer {
  flex-shrink: 0;
  padding: 14px var(--mini-side-pad, 12px) calc(86px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 -6px 24px rgba(15, 23, 42, 0.08);
  position: sticky;
  bottom: 0;
  z-index: 4;
}

.mini-cart-checkout-blocked-msg {
  margin: 0 0 12px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 500;
  color: #9a3412;
  text-align: center;
  line-height: 1.4;
  background: #fff7ed;
  border-radius: 12px;
  border: 1px solid #fed7aa;
}

.mini-cart-checkout-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.mini-cart-checkout-total-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  overflow: hidden;
}

.mini-cart-checkout-label {
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
}

.mini-cart-footer-amount {
  font-size: 26px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-cart-checkout-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 14px;
  border: none;
  border-radius: 14px;
  background: #2563eb;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
  max-width: 100%;
  box-sizing: border-box;
}

.mini-cart-checkout-btn:active {
  opacity: 0.92;
}

.mini-cart-checkout-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.mini-cart-checkout-arrow {
  font-size: 18px;
  line-height: 1;
}

.mini-cart-checkout-delivery {
  margin: 12px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: #94a3b8;
  text-align: center;
}

.mini-cart-delivery-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: currentColor;
  opacity: 0.85;
}

.mini-checkout-club-address textarea,
#checkout-delivery-address[readonly] {
  background: #f8fafc;
  color: #334155;
  border-color: #dbeafe;
}

@media (max-width: 420px) {
  .mini-cart-checkout-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .mini-cart-checkout-btn {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
  }
}

@media (max-width: 520px) {
  .mini-cart-panel-scroll {
    --mini-cart-side-pad: var(--mini-side-pad, 12px);
    padding: 12px var(--mini-cart-side-pad) 12px;
  }

  .mini-cart-item {
    grid-template-columns: 92px minmax(0, 1fr) 28px;
    gap: 10px;
    padding: 9px;
  }

  .mini-cart-thumb-wrap {
    width: 92px;
    height: 102px;
  }

  .mini-cart-item-meta > strong {
    font-size: 14px;
  }

  .mini-cart-line-price {
    font-size: 16px;
  }

  .mini-cart-stepper {
    grid-template-columns: 30px 34px 30px;
  }

  .mini-cart-step-btn {
    height: 32px;
  }

  .mini-cart-group-actions {
    gap: 6px;
  }

  .mini-cart-clear-section {
    font-size: 11px;
  }

  body.mini-club-scope #mini-cart-panel .mini-cart-checkout-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr);
    gap: 10px;
  }

  body.mini-club-scope #mini-cart-panel .mini-cart-checkout-btn {
    width: 100%;
    padding: 14px 12px;
    font-size: 14px;
  }

}

.mini-cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mini-cart-header h2 {
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

#mini-cart-close {
  border-color: #e5e7eb;
  background: #fff;
  border-radius: 12px;
  color: #334155;
  padding: 9px 12px;
}

.mini-cart-overview {
  width: fit-content;
  margin: -2px 0 6px;
  color: #475569;
  font-size: 15px;
  font-weight: 800;
  background: #f1f5f9;
  border-radius: 999px;
  padding: 6px 12px;
}

.mini-cart-mode-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

body.mini-club-scope #mini-cart-panel .mini-cart-mode-cards {
  display: none !important;
}

body.mini-club-scope #mini-cart-panel .mini-cart-overview {
  display: none !important;
}

body.mini-club-scope #mini-cart-panel .mini-cart-checkout-footer {
  padding: 8px var(--mini-side-pad, 12px) calc(8px + env(safe-area-inset-bottom, 0px));
}

body.mini-club-scope #mini-cart-panel .mini-cart-checkout-delivery {
  display: flex;
  margin-top: 4px;
  justify-content: center;
  font-size: 10px;
}

/* Кабинет управляющего: корзина только вертикально, без сдвига экрана влево-вправо */
html:has(body.mini-club-scope.mini-cart-open) {
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

body.mini-club-scope.mini-cart-open {
  overflow-x: hidden;
  overscroll-behavior-x: none;
  touch-action: pan-y;
  max-width: 100vw;
}

body.mini-club-scope.mini-cart-open .mini-cart-panel,
body.mini-club-scope.mini-cart-open .mini-cart-checkout-footer {
  overflow-x: hidden;
  overscroll-behavior-x: none;
  touch-action: pan-y;
  max-width: 100%;
}

body.mini-club-scope.mini-cart-open .mini-cart-panel-scroll {
  overflow-x: hidden;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  max-width: 100%;
}

body.mini-club-scope.mini-cart-open #mini-cart-items {
  overflow: visible;
  touch-action: auto;
}

body.mini-club-scope.mini-cart-open .mini-cart-item,
body.mini-club-scope.mini-cart-open .mini-cart-item-bottom,
body.mini-club-scope.mini-cart-open .mini-cart-checkout-row {
  min-width: 0;
  max-width: 100%;
}

/* Кабинет управляющего: корзина как на макете (список + свайп удаления) */
body.mini-club-scope #mini-cart-panel.hidden {
  display: none !important;
}

body.mini-club-scope #mini-cart-panel:not(.hidden) {
  background: #eef1f5;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}

body.mini-club-scope #mini-cart-panel .mini-cart-overview,
body.mini-club-scope #mini-cart-panel .mini-cart-mode-cards {
  display: none !important;
}

body.mini-club-scope #mini-cart-panel .mini-cart-panel-scroll {
  --mini-cart-side-pad: 0;
  flex: 1 1 0;
  min-height: 0;
  padding-top: calc(var(--mini-cart-safe-top, 0px) + env(safe-area-inset-top, 0px) + 10px);
  padding-bottom: 10px;
  padding-left: 0 !important;
  padding-right: 0 !important;
  gap: 8px;
  overflow-y: auto !important;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

body.mini-club-scope #mini-cart-panel .mini-cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 10px 14px 8px;
}

body.mini-club-scope #mini-cart-panel .mini-cart-header h2 {
  font-size: 22px;
  letter-spacing: -0.03em;
}

body.mini-club-scope #mini-cart-panel #mini-cart-close {
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 8px;
}

body.mini-club-scope #mini-cart-panel #mini-cart-items {
  margin: 0;
}

body.mini-club-scope #mini-cart-panel .mini-cart-club-sections {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

body.mini-club-scope #mini-cart-panel .mini-cart-group--club {
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
}

body.mini-club-scope #mini-cart-panel .mini-cart-group-title {
  margin: 0 0 8px;
  padding: 0 14px;
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

body.mini-club-scope #mini-cart-panel .mini-cart-club-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

body.mini-club-scope #mini-cart-panel .mini-cart-swipe {
  position: relative;
  overflow: hidden;
  background: #fff;
}

body.mini-club-scope #mini-cart-panel .mini-cart-swipe-under {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #ef4444;
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
}

body.mini-club-scope #mini-cart-panel .mini-cart-swipe-delete-btn {
  width: 92px;
  border: none;
  background: transparent;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 6px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

body.mini-club-scope #mini-cart-panel .mini-cart-swipe-delete-btn:active {
  opacity: 0.92;
}

body.mini-club-scope #mini-cart-panel .mini-cart-swipe-front {
  position: relative;
  z-index: 1;
  background: #fff;
  transition: transform 0.22s ease-out;
  touch-action: pan-y;
}

body.mini-club-scope #mini-cart-panel .mini-cart-swipe-front.is-dragging {
  transition: none;
}

body.mini-club-scope #mini-cart-panel .mini-cart-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  grid-template-rows: auto auto auto;
  align-items: start;
  gap: 4px 12px;
  padding: 10px 14px;
  background: #fff;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

body.mini-club-scope #mini-cart-panel .mini-cart-thumb-wrap {
  grid-column: 1;
  grid-row: 1 / 4;
  align-self: center;
}

body.mini-club-scope #mini-cart-panel .mini-cart-row-text {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
}

body.mini-club-scope #mini-cart-panel .mini-cart-row-stepper-col {
  grid-column: 3;
  grid-row: 1 / 3;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  align-self: center;
}

body.mini-club-scope #mini-cart-panel .mini-cart-row-bottom {
  grid-column: 2 / 4;
  grid-row: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

body.mini-club-scope #mini-cart-panel .mini-cart-row-bottom .mini-cart-row-country {
  flex: 1;
  min-width: 0;
}

body.mini-club-scope #mini-cart-panel .mini-cart-swipe + .mini-cart-swipe .mini-cart-row,
body.mini-club-scope #mini-cart-panel .mini-cart-swipe:not(:last-child) .mini-cart-row {
  border-bottom: 1px solid #f1f5f9;
}

body.mini-club-scope #mini-cart-panel .mini-cart-thumb-wrap {
  width: 76px;
  height: 84px;
  border: none;
  border-radius: 10px;
  background: #f8fafc;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.mini-club-scope #mini-cart-panel .mini-cart-select-check {
  top: 3px;
  left: 3px;
}

body.mini-club-scope #mini-cart-panel .mini-cart-select-check .mini-cart-select-box {
  width: 20px;
  height: 20px;
  border-radius: 5px;
}

body.mini-club-scope #mini-cart-panel .mini-cart-select-check .mini-cart-select-input {
  width: 28px;
  height: 28px;
}

body.mini-club-scope #mini-cart-panel .mini-cart-thumb {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border: none;
  border-radius: 0;
}

body.mini-club-scope #mini-cart-panel .mini-cart-thumb--empty {
  width: 76px;
  height: 84px;
  background: #f8fafc;
  border-radius: 10px;
}

body.mini-club-scope #mini-cart-panel .mini-cart-row-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-self: center;
}

body.mini-club-scope #mini-cart-panel .mini-cart-row-title {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  color: #0f172a;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

body.mini-club-scope #mini-cart-panel .mini-cart-row-vol {
  margin: 0;
  font-size: 12px;
  line-height: 1.3;
  color: #64748b;
}

body.mini-club-scope #mini-cart-panel .mini-cart-row-pack-hint {
  color: #64748b;
}

body.mini-club-scope #mini-cart-panel .mini-cart-row-country {
  margin: 0;
  font-size: 11px;
  line-height: 1.25;
  color: #94a3b8;
}

body.mini-club-scope #mini-cart-panel .mini-cart-stepper {
  grid-template-columns: 30px 34px 30px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  box-shadow: none;
  background: #fff;
}

body.mini-club-scope #mini-cart-panel .mini-cart-step-btn {
  height: 30px;
  font-size: 18px;
  color: #334155;
}

body.mini-club-scope #mini-cart-panel .mini-cart-step-value {
  font-size: 14px;
  font-weight: 700;
}

body.mini-club-scope #mini-cart-panel .mini-cart-line-price {
  font-size: 10px;
  font-weight: 600;
  color: #94a3b8;
  margin: 0;
  white-space: nowrap;
  flex-shrink: 0;
}

body.mini-club-scope #mini-cart-panel .mini-cart-item-actions,
body.mini-club-scope #mini-cart-panel .mini-cart-remove-btn {
  display: none !important;
}

body.mini-club-scope #mini-cart-panel .mini-cart-checkout-footer {
  padding-left: 14px;
  padding-right: 14px;
  box-shadow: 0 -1px 0 #e2e8f0, 0 -8px 20px rgba(15, 23, 42, 0.05);
}

body.mini-club-scope #mini-cart-panel .mini-cart-footer-amount {
  font-size: 22px;
}

.mini-cart-mode-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.mini-cart-mode-card.pack {
  background: #f0fdf4;
}

.mini-cart-mode-card.piece {
  background: #eff6ff;
}

.mini-cart-mode-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}

.mini-cart-mode-icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.mini-cart-mode-card.pack .mini-cart-mode-icon {
  color: #16a34a;
}

.mini-cart-mode-card.piece .mini-cart-mode-icon {
  color: #3b82f6;
}

.mini-cart-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 30px;
  gap: 12px;
  padding: 9px;
  border: 1px solid #edf2f7;
  border-radius: 14px;
  align-items: start;
  background: #fff;
  box-shadow: 0 1px 5px rgba(15, 23, 42, 0.04);
}

.mini-cart-item--unavailable .mini-cart-thumb-wrap {
  opacity: 0.65;
}

.mini-cart-unavail-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 600;
  color: #9a3412;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  padding: 2px 8px;
}

.mini-cart-line-price--muted {
  color: #94a3b8;
  text-decoration: line-through;
  font-weight: 600;
}

.mini-cart-group.pack .mini-cart-item.mini-cart-item--unavailable {
  background: #f8fafc;
}

.mini-cart-group.piece .mini-cart-item.mini-cart-item--unavailable {
  background: #f8fafc;
}

.mini-cart-item-meta {
  display: grid;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.mini-cart-item-meta > strong {
  color: #0f172a;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 800;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.mini-cart-thumb-wrap {
  width: 96px;
  height: 108px;
  border-radius: 14px;
  border: 1px solid #edf2f7;
  overflow: hidden;
  background: #fff;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.mini-cart-select-check {
  position: absolute;
  top: 5px;
  left: 5px;
  z-index: 3;
  margin: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mini-cart-select-check .mini-cart-select-box {
  width: 20px;
  height: 20px;
  border-radius: 5px;
}

.mini-cart-select-check .mini-cart-select-input {
  width: 28px;
  height: 28px;
}

.mini-cart-select-input {
  position: absolute;
  opacity: 0;
  width: 22px;
  height: 22px;
  margin: 0;
  cursor: pointer;
}

.mini-cart-select-box {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.28);
  background: rgba(255, 255, 255, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.mini-cart-select-input:checked + .mini-cart-select-box {
  background: #2563eb;
  border-color: #2563eb;
}

.mini-cart-select-input:checked + .mini-cart-select-box::after {
  content: "";
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-1px, -1px);
}

.mini-cart-select-box.is-indeterminate {
  background: #2563eb;
  border-color: #2563eb;
}

.mini-cart-select-box.is-indeterminate::after {
  content: "";
  width: 10px;
  height: 2px;
  background: #fff;
  border: none;
  transform: none;
}

.mini-cart-select-all-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 2px 10px;
}

.mini-cart-clear-selected-btn {
  border: none;
  background: transparent;
  color: #dc2626;
  font-size: 14px;
  font-weight: 700;
  padding: 6px 0;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.mini-cart-clear-selected-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.mini-cart-clear-selected-btn:not(:disabled):active {
  opacity: 0.72;
}

.mini-cart-select-all-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}

.mini-cart-select-all-label .mini-cart-select-box {
  pointer-events: none;
  flex: 0 0 auto;
}

.mini-cart-select-all-label .mini-cart-select-input {
  position: absolute;
  opacity: 0;
  width: 22px;
  height: 22px;
  margin: 0;
}

.mini-cart-item--deselected,
body.mini-club-scope #mini-cart-panel .mini-cart-swipe.mini-cart-item--deselected {
  opacity: 0.58;
}

body.mini-club-scope #mini-cart-panel .mini-cart-select-all-bar {
  padding: 2px 14px 10px;
}

body.mini-club-scope #mini-cart-panel .mini-cart-thumb-wrap {
  position: relative;
  overflow: visible;
}

body.mini-club-scope #mini-cart-panel .mini-cart-thumb-wrap .mini-cart-thumb,
body.mini-club-scope #mini-cart-panel .mini-cart-thumb-wrap .mini-cart-thumb--empty {
  border-radius: 10px;
}

.mini-cart-thumb {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.mini-cart-item-actions {
  display: flex;
  justify-content: flex-end;
  margin-left: auto;
  min-width: 0;
  align-self: start;
}

.mini-cart-line-price {
  color: #0f172a;
  font-size: 17px;
  line-height: 1;
  font-weight: 900;
  white-space: nowrap;
}

.mini-cart-group {
  border-radius: 18px;
  padding: 12px 10px;
  margin-bottom: 14px;
}

.mini-cart-group.pack {
  background: #f3fbf5;
  border: 1px solid #e4f7e9;
}

.mini-cart-group.piece {
  background: #f4f8ff;
  border: 1px solid #e2edff;
}

#mini-cart-items {
  margin-left: calc(-1 * var(--mini-cart-side-pad));
  margin-right: calc(-1 * var(--mini-cart-side-pad));
}

#mini-cart-panel .mini-cart-group {
  border-radius: 0;
  padding: 12px var(--mini-cart-side-pad);
}

#mini-cart-panel .mini-cart-group.pack {
  border-left: 0;
  border-right: 0;
}

#mini-cart-panel .mini-cart-group.piece {
  border-left: 0;
  border-right: 0;
}

.mini-cart-group-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.mini-cart-group-head-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.mini-cart-group-head-text {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.mini-cart-group-head-text strong {
  font-size: 16px;
  line-height: 1.1;
  font-weight: 900;
}

.mini-cart-group.pack .mini-cart-group-head strong,
.mini-cart-group.pack .mini-cart-group-head span {
  color: #166534;
}

.mini-cart-group.piece .mini-cart-group-head strong,
.mini-cart-group.piece .mini-cart-group-head span {
  color: #1d4ed8;
}

.mini-cart-group-head-icon {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
}

.mini-cart-group-head-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.mini-cart-group.pack .mini-cart-group-head-icon {
  color: #16a34a;
}

.mini-cart-group.piece .mini-cart-group-head-icon {
  color: #3b82f6;
}

.mini-cart-group-stats {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 800;
}

.mini-cart-group-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.mini-cart-clear-section {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  color: #64748b;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.mini-cart-group-menu {
  position: relative;
}

.mini-cart-group-menu summary {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.8);
  color: #64748b;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  list-style: none;
}

.mini-cart-group-menu summary::-webkit-details-marker {
  display: none;
}

.mini-cart-group-menu-list {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 3;
  width: 172px;
  padding: 6px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.14);
}

.mini-cart-group-menu-list button {
  width: 100%;
  border: 0;
  border-radius: 9px;
  background: transparent;
  padding: 9px 10px;
  color: #334155;
  font: inherit;
  font-size: 13px;
  text-align: left;
}

.mini-cart-group-menu-list button:active {
  background: #f1f5f9;
}

.mini-cart-clear-section svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.mini-cart-group-collapse {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.mini-cart-group.pack .mini-cart-group-collapse {
  background: #16a34a;
}

.mini-cart-group.piece .mini-cart-group-collapse {
  background: #2563eb;
}

.mini-cart-group.pack .mini-cart-group-stats {
  background: #dcfce7;
  color: #166534;
}

.mini-cart-group.piece .mini-cart-group-stats {
  background: #dbeafe;
  color: #1d4ed8;
}

.mini-cart-group-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: transparent;
  border-radius: 0;
  padding: 0;
}

.mini-cart-group.pack .mini-cart-item {
  background: #fff;
}

.mini-cart-group.piece .mini-cart-item {
  background: #fff;
}

.mini-cart-group.pack .mini-cart-qty-badge {
  background: #dcfce7;
  color: #166534;
}

.mini-cart-group.piece .mini-cart-qty-badge {
  background: #dbeafe;
  color: #1d4ed8;
}

.mini-cart-qty-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 800;
  background: #dcfce7;
  color: #166534;
  margin-top: 1px;
}

.mini-cart-stepper {
  display: grid;
  grid-template-columns: 34px 42px 34px;
  align-items: center;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  width: max-content;
  justify-self: start;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.mini-cart-step-btn {
  border-radius: 0;
  border: 0;
  border-right: 1px solid #e5e7eb;
  background: #fff;
  color: #1e3a8a;
  height: 32px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
}

.mini-cart-stepper .mini-cart-step-btn:last-child {
  border-right: 0;
  border-left: 1px solid #e5e7eb;
}

.mini-cart-step-value {
  text-align: center;
  font-weight: 700;
  font-size: 16px;
}

.mini-cart-remove-btn {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  border: 1px solid #edf2f7;
  border-radius: 12px;
  background: #fff;
  color: #64748b;
  font-size: 22px;
  font-weight: 500;
}

.mini-cart-remove-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.mini-cart-remove-btn:hover {
  color: #334155;
}

.mini-cart-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 0;
}

.mini-cart-undo-bar {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  z-index: 2;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #0f172a;
  color: #fff;
  font-size: 13px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.22);
}

.mini-cart-undo-bar.is-visible {
  display: flex;
}

.mini-cart-undo-bar button {
  border: 0;
  background: transparent;
  color: #93c5fd;
  font: inherit;
  font-weight: 800;
}

.mini-cart-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  z-index: 10030;
}

@media (max-width: 700px) {
  .mini-cart-overview {
    font-size: 20px;
  }

  .mini-cart-mode-cards {
    grid-template-columns: 1fr;
  }
}

.price-stack-right {
  display: grid;
  justify-items: end;
  gap: 4px;
  font-size: 14px;
}

.price-stack-right span {
  white-space: nowrap;
}

.admin-price-line {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  white-space: nowrap;
}

.admin-quick-price-btn {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  font: inherit;
  color: #0f172a;
  font-weight: 700;
  cursor: pointer;
  border-bottom: 1px dashed #cbd5e1;
}

.admin-quick-price-btn:hover {
  color: #0b74ff;
  border-bottom-color: #93c5fd;
}

.admin-quick-price-input {
  width: 96px;
  border: 1px solid #93c5fd;
  border-radius: 8px;
  padding: 2px 6px;
  font: inherit;
  font-weight: 700;
  color: #0f172a;
  background: #fff;
}

.image-preview-list {
  display: grid;
  grid-template-columns: 120px;
  gap: 10px;
}

.image-preview-item {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 10px;
  padding: 0;
  width: 120px;
  height: 120px;
  cursor: pointer;
  user-select: none;
  position: relative;
  overflow: hidden;
}

.image-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  display: block;
  background: #eef2f7;
}

.image-preview-meta {
  margin-top: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.image-preview-overlay {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  background: rgba(15, 23, 42, 0.45);
  color: #fff;
  box-sizing: border-box;
}

.image-preview-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
}

.image-preview-actions .tiny-btn {
  font-size: 11px;
  padding: 4px 6px;
}

.image-preview-item.selected img {
  filter: brightness(0.72);
}

.image-preview-item.selected .image-preview-overlay {
  display: flex;
}

.admin-image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 25000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.admin-image-lightbox.hidden {
  display: none !important;
}

.admin-image-lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  margin: 0;
  padding: 0;
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
}

.admin-image-lightbox-panel {
  position: relative;
  z-index: 1;
  max-width: min(96vw, 720px);
  max-height: min(88vh, 720px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-image-lightbox-img {
  display: block;
  max-width: 100%;
  max-height: min(88vh, 720px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.35);
}

.admin-image-lightbox-close {
  position: absolute;
  top: -12px;
  right: -12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #0f172a;
  font-size: 22px;
  line-height: 1;
  font-weight: 400;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.2);
}

body.admin-image-lightbox-open {
  overflow: hidden;
}

.image-preview-empty-slot {
  border: 1px dashed var(--border);
  background: #f8fafc;
  border-radius: 10px;
  width: 120px;
  height: 120px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.image-preview-empty-plus {
  font-size: 24px;
  line-height: 1;
  color: #94a3b8;
}

.tiny-btn {
  border: 1px solid var(--border);
  background: #fff;
  color: #111827;
  border-radius: 8px;
  padding: 4px 8px;
  width: auto;
  font-size: 12px;
}

.inline-save-btn {
  background: #0ea5e9;
  color: #fff;
  border-color: #0ea5e9;
}

.inline-cancel-btn {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fecaca;
}

#quick-create-category {
  font-size: 13px;
  padding: 8px 10px;
}

.actions-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.actions-right {
  justify-content: flex-end;
  margin-bottom: 12px;
}

.create-media-layout {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.create-fields-column {
  display: grid;
  gap: 10px;
}

.create-field-row {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.create-field-row label {
  margin: 10px 0 0;
}

.create-field-control {
  width: 100%;
}

.create-sale-modes-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.create-sale-modes-row .switch-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  margin: 0;
}

.create-pack-size-row .pack-size-field {
  min-width: 0;
}

.sale-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.sale-column {
  display: grid;
  gap: 10px;
  align-content: start;
}

.sale-column .switch-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  margin: 0;
}

.create-triple-row,
.inline-triple-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}

.create-triple-field,
.inline-triple-field {
  min-width: 0;
}

.volume-inline-group {
  display: grid;
  grid-template-columns: 120px 84px;
  gap: 8px;
}

.volume-inline-group select {
  font-size: 13px;
  padding-right: 30px;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236b7280' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: calc(100% - 14px) 50%;
  background-size: 12px 8px;
}

.bulk-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.bulk-select-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 4px;
}

.bulk-select-all input {
  width: auto;
}

.product-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-card .product-actions {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
}

.admin-card.selected {
  border-color: #93c5fd;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.card-select {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.card-select input {
  width: 14px;
  height: 14px;
  margin: 0;
}

.product-menu-wrap {
  position: relative;
}

.product-menu-trigger {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: #374151;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  padding: 0;
}

.product-menu {
  position: absolute;
  right: 0;
  bottom: 32px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  min-width: 160px;
  padding: 6px;
  display: grid;
  gap: 4px;
  z-index: 10;
}

.product-menu.hidden {
  display: none;
}

.product-menu-item {
  border: 1px solid transparent;
  background: #fff;
  color: #111827;
  border-radius: 8px;
  padding: 8px 10px;
  text-align: left;
}

.product-menu-item:hover {
  background: #f3f4f6;
}

.product-menu-item.danger {
  color: #b91c1c;
}

.inline-editor {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  display: grid;
  gap: 8px;
  background: #fbfcff;
}

.inline-field-row {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.inline-field-row label {
  margin: 10px 0 0;
}

.inline-field-control {
  width: 100%;
}

.inline-image-picker {
  width: 120px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.inline-image-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 6px;
}

.inline-image-slot {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  background: #eef2f7;
  border: 1px solid var(--border);
  padding: 0;
  cursor: pointer;
}

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

.inline-image-empty {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 20px;
}

.visibility-row {
  margin-top: 2px;
}

.admin-card .visibility-row {
  display: flex;
  justify-content: flex-end;
}

.switch-row {
  display: inline-flex;
  align-items: center;
  gap: 0;
  color: #111827;
  font-size: 13px;
}

.switch-text {
  color: #111827;
}

.switch {
  position: relative;
  width: 33px;
  height: 18px;
  display: inline-flex;
  align-items: center;
}

.switch-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  margin: 0;
  z-index: 2;
}

.switch-track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: linear-gradient(to bottom, #c92933 0%, #b41f29 100%);
  border: 2px solid #7a7a7a;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.18);
  transition: background 0.2s ease;
}

.switch-thumb {
  position: absolute;
  top: 50%;
  left: 1px;
  width: 15px;
  height: 15px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #dddddd 78%, #c8c8c8 100%);
  border: 1px solid #bfbfbf;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  transition: left 0.2s ease;
}

.switch-input:checked + .switch-track {
  background: linear-gradient(to bottom, #28c238 0%, #1fad2f 100%);
}

.switch-input:checked + .switch-track .switch-thumb {
  left: 16px;
}

/* Админ-панель: модули системы (боковое меню + рабочая область) */
.admin-app {
  display: grid;
  grid-template-columns: minmax(200px, 260px) 1fr;
  min-height: 100vh;
  box-sizing: border-box;
}

.admin-sidebar {
  border-right: 1px solid var(--border);
  background: #f8fafc;
  padding: 20px 14px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-sidebar-head {
  padding: 0 6px 4px;
}

.admin-app-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.admin-sidebar-sub {
  margin: 4px 0 0;
  font-size: 12px;
}

.admin-module-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-nav-group {
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}

.admin-nav-group-title {
  margin: 0 0 8px 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #64748b;
}

.admin-nav-group-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 10px;
  margin-left: 4px;
  border-left: 2px solid #cbd5e1;
}

.admin-nav-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: #334155;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.admin-nav-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.admin-nav-btn.active {
  background: #fff;
  border-color: var(--border);
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.admin-nav-btn--sub {
  font-size: 13px;
  padding: 8px 11px;
  border-radius: 8px;
}

.admin-workspace {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #fff;
}

.admin-module-header {
  padding: 20px 24px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.admin-module-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.admin-module-header-actions {
  flex-shrink: 0;
}

.admin-module-breadcrumb {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.02em;
}

.admin-module-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
  flex: 1;
  min-width: 0;
}

.admin-module-body {
  padding: 20px 24px 40px;
  max-width: 1200px;
  box-sizing: border-box;
}

.order-status-list-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.order-status-list-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.order-status-list-label {
  font-weight: 600;
  color: #0f172a;
}

.order-status-list-code {
  font-size: 12px;
}

@media (max-width: 900px) {
  .admin-app {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border);
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
    padding: 14px 12px;
  }

  .admin-module-nav {
    flex-direction: row;
    flex-wrap: wrap;
    flex: 1;
    gap: 6px;
    align-items: flex-start;
  }

  .admin-nav-group {
    flex-basis: 100%;
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
  }

  .admin-nav-group-items {
    flex-direction: row;
    flex-wrap: wrap;
    padding-left: 0;
    margin-left: 0;
    border-left: none;
    gap: 6px;
    align-items: center;
  }

  .admin-nav-btn--sub {
    width: auto;
  }

  .admin-nav-btn {
    width: auto;
    padding: 8px 12px;
    font-size: 13px;
  }

  .admin-module-body {
    padding: 16px 14px 32px;
  }
}

.tab-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.tab-btn {
  width: auto;
  background: #e5e7eb;
  color: #111827;
  border-radius: 999px;
  padding: 8px 14px;
}

.tab-btn.active {
  background: var(--primary);
  color: #fff;
}

.hidden {
  display: none;
}

body.mini-client-cabinet #mini-manager-club-card,
body.mini-client-cabinet #mini-open-visinv {
  display: none !important;
}

body.mini-club-scope #mini-open-addresses-dialog {
  display: none !important;
}

.category-list {
  display: grid;
  gap: 8px;
}

.category-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.category-item-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.category-thumb {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid #dbe3ef;
  object-fit: cover;
  background: #f8fafc;
  flex-shrink: 0;
}

.category-thumb--empty {
  border-style: dashed;
  background: #f8fafc;
}

.subcategory-item {
  margin-left: 22px;
}

.category-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.category-menu-wrap {
  position: relative;
}

.category-menu-trigger {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: #374151;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  padding: 0;
}

.category-menu {
  position: absolute;
  right: 0;
  top: 32px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  min-width: 160px;
  padding: 6px;
  display: grid;
  gap: 4px;
  z-index: 10;
}

.category-menu.hidden {
  display: none;
}

.category-menu-item {
  border: 1px solid transparent;
  background: #fff;
  color: #111827;
  border-radius: 8px;
  padding: 8px 10px;
  text-align: left;
}

.category-menu-item:hover {
  background: #f3f4f6;
}

.category-menu-item.danger {
  color: #b91c1c;
}

.tree-toggle {
  width: 24px;
  height: 24px;
  padding: 0;
  margin-right: 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: #374151;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}

.tree-toggle-chevron {
  display: inline-block;
  transition: transform 0.15s ease;
}

.tree-toggle.collapsed .tree-toggle-chevron {
  transform: rotate(-90deg);
}

.subcount-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  margin-left: 8px;
  padding: 0 6px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

/* Резервируем место под скроллбар, чтобы ширина не прыгала при смене секций (каталог ↔ короткие экраны). */
html:has(body.mini-app-page) {
  scrollbar-gutter: stable;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

.mini-app-page {
  padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  overscroll-behavior-y: contain;
  overscroll-behavior-x: none;
  overflow-x: hidden;
  touch-action: pan-y;
  width: 100%;
  max-width: 100vw;
}

html:has(body.mini-app-page),
body.mini-app-page {
  margin: 0;
  height: 100dvh;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

.mini-app-page .app {
  min-height: 100dvh;
  padding-top: calc(env(safe-area-inset-top, 0px) + 12px);
  box-sizing: border-box;
  max-width: 100vw;
  overflow-x: hidden;
}

/* ─── Telegram WebApp: единая система отступов ──────────────────────────────
   JS (miniapp.html) пишет :root --mini-tg-top-offset (viewport + safeAreaInset).
   Клиент Telegram дополнительно выставляет --tg-safe-area-inset-* и
   --tg-content-safe-area-inset-* (зона под системную шапку / жесты).
   --mini-app-safe-top = max(наш расчёт, официальные inset) + 20px доп. воздуха под шапкой TG.
   ─────────────────────────────────────────────────────────────────────────── */
body.mini-app-page {
  --mini-app-content-inset-top: 0px;
  --mini-app-safe-top: 0px;
  /* Как у .container (width: min(1100px, 94%)) — те же боковые поля, что на главной */
  --mini-side-pad: max(0px, calc((100vw - min(1100px, 94vw)) / 2));
}

.mini-app-page.tg-webapp {
  --mini-tg-top-offset: 0px;
  --mini-tg-top-extra: 12px;
  --mini-tg-page-gap: 10px;
  padding-top: 0;
  --mini-app-content-inset-top: max(
    var(--tg-content-safe-area-inset-top, 0px),
    var(--tg-safe-area-inset-top, 0px)
  );
  --mini-app-safe-top: calc(max(var(--mini-tg-top-offset, 0px), var(--mini-app-content-inset-top)) + 20px);
  --mini-fullscreen-safe-top: calc(var(--mini-app-safe-top) + var(--mini-tg-top-extra) + 10px);
}

.mini-app-page.tg-webapp.tg-ios {
  --mini-tg-top-extra: 26px;
  --mini-tg-page-gap: 12px;
}

/* Основной контейнер приложения */
.mini-app-page.tg-webapp .container {
  padding-top: 0;
}

.mini-app-page.tg-webapp .app {
  /* Align section titles to same height as club picker (--mini-fullscreen-safe-top) */
  padding-top: calc(var(--mini-fullscreen-safe-top) - var(--mini-tg-page-gap));
}

/* Экран входа (fixed на весь экран) — отступ сверху как у основного контента */
.mini-app-page.tg-webapp .mini-auth-gate {
  padding-top: calc(20px + var(--mini-app-safe-top));
  box-sizing: border-box;
}

/* Секции основного экрана */
.mini-app-page.tg-webapp .mini-app-section {
  padding-top: var(--mini-tg-page-gap);
}

.mini-app-page.tg-webapp [data-mini-section="profile"] {
  padding-top: var(--mini-tg-page-gap);
}

/* Catalog: safe-area учтён в sticky .mini-catalog-head-row */
.mini-app-page.tg-webapp .mini-catalog-top-bar {
  padding-top: 0;
}

/* Fullscreen-диалоги (заказы) */
.mini-app-page.tg-webapp .mini-orders-screen {
  padding-top: var(--mini-fullscreen-safe-top);
}

.mini-app-page.tg-webapp .mini-orders-head {
  margin-top: 0;
}

/* Корзина — тот же верхний отступ, что у .app */
.mini-app-page.tg-webapp .mini-cart-panel .mini-cart-panel-scroll {
  padding-top: calc(12px + var(--mini-app-safe-top));
}

/* Адреса (новый экран): отступ только в шапке, без дубля на .mini-addresses-screen */
.mini-addresses-screen.mini-addr-screen {
  padding: 0;
  gap: 0;
  background: #f0f4fb;
}

.mini-app-page.tg-webapp .mini-addresses-screen.mini-addr-screen {
  padding-top: 0;
}

/* Форма адреса (старый layout) — один отступ сверху */
.mini-app-page.tg-webapp .mini-addresses-screen.mini-address-form-screen {
  padding-top: var(--mini-fullscreen-safe-top);
}

.mini-app-page.tg-webapp .mini-address-form-screen .mini-addresses-close-btn {
  top: calc(22px + var(--mini-app-safe-top));
}

.mini-app-page.tg-webapp .mini-address-form-screen .mini-address-form-title {
  margin-top: 12px;
}

/* Диалог профиля */
.mini-app-page.tg-webapp .mini-profile-dialog {
  padding-top: var(--mini-fullscreen-safe-top);
}

.mini-auth-gate {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  background: #f6f7fb;
}

.mini-startup-loader {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 24%, rgba(14, 165, 233, 0.14), transparent 34%),
    #f6f7fb;
}

body:not(.mini-startup-loading) .mini-startup-loader,
.mini-startup-loader.hidden {
  display: none;
}

.mini-startup-loader-card {
  width: min(100%, 320px);
  text-align: center;
  padding: 28px 22px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
}

.mini-startup-loader-logo {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.28);
}

.mini-startup-loader-logo span {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.55);
  border-top-color: #fff;
  animation: miniStartupSpin 0.85s linear infinite;
}

.mini-startup-loader-title {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.03em;
}

.mini-startup-loader-text {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.45;
  color: #64748b;
}

.mini-startup-loader-bar {
  height: 5px;
  margin-top: 22px;
  overflow: hidden;
  border-radius: 999px;
  background: #e0f2fe;
}

.mini-startup-loader-bar span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0ea5e9, #2563eb);
  animation: miniStartupBar 1.15s ease-in-out infinite;
}

body.mini-startup-loading main.app,
body.mini-startup-loading .footer-nav,
body.mini-startup-loading #mini-cart-panel,
body.mini-startup-loading #mini-cart-backdrop {
  visibility: hidden;
  pointer-events: none;
}

@keyframes miniStartupSpin {
  to { transform: rotate(360deg); }
}

@keyframes miniStartupBar {
  0% { transform: translateX(-115%); }
  100% { transform: translateX(255%); }
}

.mini-auth-gate.hidden {
  display: none;
}

.mini-auth-gate--browser {
  background: #0b0f14;
  padding: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  align-items: flex-start;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mini-auth-browser {
  width: min(100%, 420px);
  margin: 0 auto;
}

.mini-auth-browser.hidden {
  display: none;
}

.mini-auth-browser-shell {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mini-auth-browser-brand {
  text-align: center;
  padding: 8px 4px 0;
}

.mini-auth-browser-logo {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: #f8fafc;
  line-height: 1.1;
}

.mini-auth-browser-tagline {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.45;
  color: #94a3b8;
}

.mini-auth-browser-card {
  background: #151b24;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 20px;
  padding: 20px 18px 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.mini-auth-browser-card-title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: -0.02em;
}

.mini-auth-browser-card-lead {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.5;
  color: #94a3b8;
}

.mini-auth-browser-steps {
  margin: 0 0 18px;
  padding-left: 20px;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.55;
}

.mini-auth-browser-steps li + li {
  margin-top: 8px;
}

.mini-auth-browser-bot {
  color: #38bdf8;
  font-weight: 700;
}

.mini-auth-browser-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  margin-top: 10px;
  padding: 12px 16px;
  border-radius: 14px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  box-sizing: border-box;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mini-auth-browser-btn.hidden {
  display: none;
}

.mini-auth-browser-widget-wrap {
  min-height: 48px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 6px 0 4px;
}

.mini-auth-browser-widget-wrap iframe {
  border-radius: 14px !important;
}

.mini-auth-browser-widget-err {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.4;
  color: #fca5a5;
  text-align: center;
}

.mini-auth-browser-widget-err.hidden {
  display: none;
}

.mini-auth-browser-btn--primary {
  margin-top: 0;
  border: none;
  background: linear-gradient(90deg, #0ea5e9, #2563eb);
  color: #fff;
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.35);
}

.mini-auth-browser-btn--primary:disabled {
  opacity: 0.65;
  cursor: wait;
}

.mini-auth-browser-btn--ghost {
  border: 1px dashed rgba(148, 163, 184, 0.35);
  background: transparent;
  color: #94a3b8;
  font-weight: 600;
}

.mini-auth-browser-btn:active {
  opacity: 0.88;
}

.mini-auth-browser-wait.hidden {
  display: none;
}

.mini-auth-browser-login.hidden {
  display: none;
}

.mini-auth-browser-widget-wrap.hidden {
  display: none;
}

.mini-auth-gate--browser .mini-auth-card {
  background: #151b24;
  border: 1px solid rgba(148, 163, 184, 0.14);
  color: #e2e8f0;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.mini-auth-gate--browser .mini-auth-gate-title,
.mini-auth-gate--browser .mini-auth-step-title {
  color: #f8fafc;
}

.mini-auth-gate--browser .mini-auth-gate-lead,
.mini-auth-gate--browser .mini-auth-label,
.mini-auth-gate--browser .muted {
  color: #94a3b8;
}

.mini-auth-gate--browser .mini-auth-input {
  background: #0f172a;
  border-color: rgba(148, 163, 184, 0.22);
  color: #f8fafc;
}

.mini-auth-gate--browser .mini-auth-primary-btn {
  background: linear-gradient(90deg, #0ea5e9, #2563eb);
}

.mini-auth-gate--browser .web-auth-confirm-title {
  color: #f8fafc;
}

.mini-auth-browser-back-link {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 0;
  border: none;
  background: none;
  color: #64748b;
  font: inherit;
  font-size: 13px;
  text-align: center;
  cursor: pointer;
}

.mini-auth-gate--browser .mini-auth-browser-back-link {
  color: #94a3b8;
}

.mini-auth-browser-back-link.hidden {
  display: none;
}

.mini-auth-card {
  width: min(100%, 380px);
  padding: 22px 18px;
}

.mini-auth-gate-title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.mini-auth-gate-lead {
  margin: 0 0 18px;
  font-size: 14px;
}

.mini-auth-step-title {
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 600;
}

.mini-auth-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #334155;
}

.mini-auth-input {
  width: 100%;
  box-sizing: border-box;
  height: 48px;
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 0 14px;
  font-size: 16px;
  margin-bottom: 12px;
}

.mini-auth-primary-btn {
  width: 100%;
  margin-top: 4px;
  min-height: 48px;
  border-radius: 12px;
  border: none;
  background: #0ea5e9;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.mini-auth-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}

.mini-auth-row .mini-auth-primary-btn {
  flex: 1;
  margin-top: 0;
}

/* ══════════════════════════════════
   Telegram Onboarding — новый дизайн
   ══════════════════════════════════ */
.mag-screen {
  width: 100%;
  max-width: 400px;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 24px calc(env(safe-area-inset-bottom, 0px) + 32px);
  padding-top: calc(env(safe-area-inset-top, 0px) + 20px);
  box-sizing: border-box;
}
.mag-screen.hidden { display: none; }

.mag-illustration {
  width: 180px;
  height: 165px;
  flex-shrink: 0;
  margin-bottom: 12px;
}
.mag-illustration svg { width: 100%; height: 100%; }

.mag-title {
  font-size: 26px;
  font-weight: 800;
  color: #111827;
  text-align: center;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.mag-title--left { text-align: left; align-self: flex-start; }

.mag-subtitle {
  font-size: 15px;
  color: #6b7280;
  text-align: center;
  margin: 0 0 20px;
  line-height: 1.5;
}
.mag-subtitle--left { text-align: left; align-self: flex-start; }

/* Карточка пользователя Telegram */
.mag-user-card {
  width: 100%;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(15,23,42,.08);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.mag-user-avatar-wrap {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  position: relative;
}
.mag-user-avatar {
  position: absolute;
  inset: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}
.mag-user-avatar.hidden { display: none; }
.mag-user-avatar-fallback {
  position: absolute;
  inset: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}
.mag-user-avatar-fallback.hidden { display: none !important; }
.mag-user-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mag-user-name { font-size: 15px; font-weight: 700; color: #111827; }
.mag-user-handle { font-size: 13px; color: #6b7280; }
.mag-tg-icon { flex-shrink: 0; }

/* Список преимуществ */
.mag-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mag-feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: #374151;
  font-weight: 500;
}
.mag-feature-icon { width: 20px; height: 20px; flex-shrink: 0; }

/* Кнопки */
.mag-primary-btn {
  width: 100%;
  min-height: 52px;
  border-radius: 14px;
  border: none;
  background: #2563EB;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  margin-top: auto;
  letter-spacing: -0.01em;
  transition: opacity .15s;
}
.mag-primary-btn:active { opacity: .85; }
.mag-primary-btn:disabled { opacity: .55; cursor: not-allowed; }

.mag-role-options {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}
.mag-role-option {
  width: 100%;
  text-align: left;
  border: 2px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
  padding: 16px 18px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color .15s, background .15s;
}
.mag-role-option:active:not(:disabled) {
  border-color: #2563eb;
  background: #eff6ff;
}
.mag-role-option:disabled {
  opacity: .55;
  cursor: not-allowed;
}
.mag-role-option__title {
  font-size: 17px;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.01em;
}
.mag-role-option__hint {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.4;
}

.mag-skip-btn {
  background: none;
  border: none;
  color: #2563EB;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  padding: 10px 0 4px;
}
.mag-skip-btn:disabled { opacity: .5; cursor: not-allowed; }

/* Карточка телефона */
.mag-phone-card {
  width: 100%;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(15,23,42,.07);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.mag-phone-flag { font-size: 22px; }
.mag-phone-number { font-size: 18px; font-weight: 600; color: #111827; letter-spacing: .01em; }

/* Инфо-строки */
.mag-info-rows {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 28px;
}
.mag-info-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.mag-info-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mag-info-icon svg { width: 18px; height: 18px; }
.mag-info-icon--check { background: #EFF6FF; color: #2563EB; }
.mag-info-icon--clock { background: #FEF3C7; color: #D97706; }
.mag-info-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mag-info-title { font-size: 14px; font-weight: 600; color: #111827; }
.mag-info-sub { font-size: 12px; color: #6b7280; }

/* Классическая форма (вне Telegram) — скрыта по умолчанию, JS показывает при необходимости */
#mini-auth-classic.hidden { display: none !important; }
#mini-auth-classic:not(.hidden) { display: block; }

/* Убираем старые элементы */
.mini-auth-tg-btn { display: none; }
.mini-auth-or { display: none; }

/* Поле ввода телефона на экране 2 */
.mag-phone-input-card {
  width: 100%;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(15,23,42,.07);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  border: 2px solid #e5e7eb;
  transition: border-color .2s;
}
.mag-phone-input-card:focus-within { border-color: #2563eb; }
.mag-phone-input-prefix {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  flex-shrink: 0;
}
.mag-phone-input-field {
  flex: 1;
  border: none;
  outline: none;
  font-size: 18px;
  font-weight: 600;
  color: #111827;
  background: transparent;
  letter-spacing: 0.02em;
}
.mag-phone-input-field::placeholder { color: #9ca3af; font-weight: 400; }
.mag-tg-autofill-btn {
  width: 100%;
  min-height: 42px;
  border-radius: 10px;
  border: 1.5px solid #e5e7eb;
  background: #f9fafb;
  color: #374151;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-bottom: 14px;
}
.mag-tg-autofill-btn:active { background: #f3f4f6; }

.mini-auth-error {
  margin: 12px 0 0;
  font-size: 13px;
  color: #b91c1c;
}

/* ══════════════════════════════════
   Бейдж уведомлений на nav-кнопке
   ══════════════════════════════════ */
.footer-nav-btn__icon--badge-wrap {
  position: relative;
  overflow: hidden;
}

.mini-notif-badge {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  pointer-events: none;
}
.mini-notif-badge.hidden { display: none; }
/* SVG-иконка для nav-кнопки уведомлений */
.footer-nav-btn__svg { display: block; }
.footer-nav-btn__svg--active { display: none; }
.footer-nav-btn.is-active .footer-nav-btn__svg--inactive { display: none; }
.footer-nav-btn.is-active .footer-nav-btn__svg--active { display: block; }
.footer-nav-btn__label {
  display: none !important;
}

/* ══════════════════════════════════
   Секция уведомлений
   ══════════════════════════════════ */
.mini-notif-shell {
  padding: 0 0 80px;
  min-height: 100%;
}

.mini-profile-notif-block {
  margin: 0 12px;
}

.mini-notif-header--profile {
  padding: 0 4px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mini-notif-header--profile .mini-notif-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
}

.mini-notif-list--profile {
  padding: 0;
  gap: 8px;
}

.mini-notif-list--profile .mini-notif-empty {
  padding: 20px 0;
}
.mini-notif-header {
  padding: 0 16px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mini-notif-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
  margin: 0;
}
.mini-notif-refresh-btn {
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
}
.mini-notif-refresh-btn:active { background: #f3f4f6; }
.mini-notif-refresh-btn:disabled {
  opacity: 0.65;
  cursor: default;
}
.mini-notif-refresh-btn.is-loading svg {
  animation: notif-spin .8s linear infinite;
}
@keyframes notif-spin { to { transform: rotate(360deg); } }
.mini-notif-list {
  padding: 0 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mini-notif-empty {
  text-align: center;
  padding: 40px 0;
  color: #9ca3af;
  font-size: 14px;
}
.mini-notif-item {
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  display: flex;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(15,23,42,.06);
  border: 1px solid #f1f5f9;
}
.mini-notif-item--pending {
  border-color: #bfdbfe;
  background: #f0f7ff;
}
.mini-notif-item--webauth {
  border-color: #fde68a;
  background: #fffbeb;
}
.mini-notif-item-icon--warn {
  background: #fef3c7;
  color: #d97706;
}

/* Web-auth экран ожидания (в браузере) */
.web-auth-confirm-box { text-align: center; padding: 8px 0 4px; }
.web-auth-confirm-icon { margin-bottom: 12px; }
.web-auth-confirm-title { font-size: 17px; font-weight: 700; color: #0f172a; margin: 0 0 6px; }
.web-auth-confirm-sub { font-size: 13px; margin: 0 0 16px; }
.web-auth-code-block {
  background: #f1f5f9; border-radius: 14px;
  padding: 14px 20px; margin-bottom: 16px;
  display: flex; flex-direction: column; gap: 4px; align-items: center;
}
.web-auth-code-label { font-size: 12px; color: #6b7280; }
.web-auth-code {
  font-size: 32px; font-weight: 900;
  letter-spacing: .12em; color: #2563eb;
  font-variant-numeric: tabular-nums;
}
.web-auth-status {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 14px; color: #6b7280; margin-bottom: 4px;
}
.web-auth-spinner {
  width: 16px; height: 16px;
  border: 2px solid #e5e7eb;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: notif-spin .8s linear infinite;
  flex-shrink: 0;
}

.web-auth-qr-wrap {
  margin: 0 0 14px;
}

.web-auth-qr-wrap.hidden {
  display: none !important;
}

.web-auth-qr {
  display: block;
  margin: 0 auto 8px;
  border-radius: 12px;
  background: #fff;
  padding: 8px;
}

.web-auth-qr-hint {
  margin: 0;
  font-size: 12px;
}

.web-auth-command-label {
  display: block;
  text-align: left;
  font-size: 12px;
  margin: 0 0 6px;
}

.web-auth-command-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 14px;
}

.web-auth-command-input {
  flex: 1 1 auto;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #0f172a;
}

.mini-auth-gate--browser .web-auth-command-input {
  background: #0f172a;
  border-color: rgba(148, 163, 184, 0.28);
  color: #e2e8f0;
}

.web-auth-command-copy {
  flex-shrink: 0;
  align-self: center;
}

.mini-notif-item-icon {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 12px;
  background: #eff6ff;
  display: flex; align-items: center; justify-content: center;
  color: #2563eb;
}
.mini-notif-item--pending .mini-notif-item-icon { background: #dbeafe; }
.mini-notif-item-body { flex: 1; min-width: 0; }
.mini-notif-item-title { font-size: 14px; font-weight: 600; color: #111827; margin-bottom: 3px; }
.mini-notif-item-sub { font-size: 12px; color: #6b7280; margin-bottom: 2px; }
.mini-notif-item-stats {
  display: flex; gap: 8px; margin: 6px 0;
  font-size: 12px; font-weight: 600;
}
.mini-notif-status { font-size: 12px; font-weight: 600; border-radius: 6px; padding: 2px 8px; display: inline-block; margin: 4px 0; }
.mini-notif-status--pending { background: #fef3c7; color: #92400e; }
.mini-notif-status--accepted { background: #d1fae5; color: #065f46; }
.mini-notif-status--rejected { background: #fee2e2; color: #991b1b; }
.mini-notif-actions { display: flex; gap: 8px; margin: 8px 0 4px; }
.mini-notif-btn {
  flex: 1; min-height: 36px;
  border-radius: 10px; border: none;
  font-size: 13px; font-weight: 600; cursor: pointer;
}
.mini-notif-btn--accept { background: #2563eb; color: #fff; }
.mini-notif-btn--accept:active { opacity: .85; }
.mini-notif-btn--reject { background: #f3f4f6; color: #374151; }
.mini-notif-btn--reject:active { opacity: .8; }
.mini-notif-open-btn {
  background: none; border: none;
  color: #2563eb; font-size: 12px; font-weight: 600;
  cursor: pointer; padding: 4px 0; display: block; margin-top: 4px;
}

/* ══════════════════════════════════
   Просмотр инвентаризации (диалог)
   ══════════════════════════════════ */
/* Полноэкранный просмотр инвентаризации */
.visinv-view-full { max-height: 100dvh; }
.visinv-view-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.visinv-view-head::after {
  content: "";
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
}
.visinv-view-head-title {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.visinv-view-head-title strong { font-size: 16px; font-weight: 700; }
.visinv-view-head-date { font-size: 11px; color: #94a3b8; }
.visinv-view-share-btn {
  background: #eff6ff;
  border: none;
  border-radius: 10px;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  color: #2563eb; cursor: pointer;
}
.visinv-view-share-btn:active { background: #dbeafe; }

/* Карточка статистики */
.visinv-view-stats-wrap { padding: 0 12px 4px; flex-shrink: 0; }
.ivd-summary-card {
  background: #fff;
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 2px 10px rgba(15,23,42,.07);
}
.ivd-sum-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.ivd-sum-left { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.ivd-sum-col { display: flex; flex-direction: column; gap: 1px; }
.ivd-sum-num { font-size: 28px; font-weight: 900; line-height: 1; }
.ivd-sum-num--blue   { color: #2563eb; }
.ivd-sum-num--orange { color: #f59e0b; }
.ivd-sum-label { font-size: 11px; color: #64748b; }
.ivd-sum-badges { display: flex; gap: 5px; flex-wrap: wrap; }
.ivd-badge { font-size: 11px; font-weight: 600; border-radius: 6px; padding: 2px 7px; }
.ivd-badge--ok   { background: #dcfce7; color: #166534; }
.ivd-badge--low  { background: #fef3c7; color: #92400e; }
.ivd-badge--none { background: #fee2e2; color: #991b1b; }
.ivd-sum-ring { flex-shrink: 0; }
.ivd-sum-bar { height: 8px; background: #e2e8f0; border-radius: 4px; overflow: hidden; margin-bottom: 10px; }
.ivd-sum-bar-fill { height: 100%; background: linear-gradient(90deg,#60a5fa,#2563eb); border-radius: 4px; transition: width .4s; }
.ivd-sum-footer { display: flex; align-items: center; justify-content: space-between; }
.ivd-sum-status { font-size: 13px; font-weight: 700; }
.ivd-sum-status--ok   { color: #16a34a; }
.ivd-sum-status--warn { color: #d97706; }
.ivd-sum-sku { font-size: 12px; color: #64748b; }

/* Просмотр инвентаризации из истории — один скролл в .vr2-scroll, футер закреплён */
#visinv-view-dialog[open] {
  z-index: 1250;
  height: 100dvh;
  height: 100svh;
  max-height: 100svh;
}
#visinv-full-history-dialog[open] { z-index: 1240; }
.visinv-under-modal { pointer-events: none !important; }

#visinv-view-dialog .visinv-screen {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
#visinv-view-dialog .visinv-head,
#visinv-view-dialog .visinv-view-stats-wrap {
  flex-shrink: 0;
}
#visinv-view-dialog .visinv-body.visinv-body--restock {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: none !important;
}
#visinv-view-dialog .visinv-view-product-list {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}
#visinv-view-dialog .visinv-view-product-list > .vr2-screen.vr2-screen--restock {
  flex: 1 1 auto;
  min-height: 0;
  flex-shrink: 1;
  height: auto;
  max-height: none;
  padding: 8px 0 0;
  gap: 0;
  box-sizing: border-box;
}
#visinv-view-dialog .vr2-scroll {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  display: block;
}
#visinv-view-dialog .vr2-scroll > .vr2-section {
  flex-shrink: 0;
  overflow: visible;
}
#visinv-view-dialog .vr2-footer--dock {
  flex-shrink: 0;
}
.ivd-prod-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #fff;
  border-radius: 14px;
  margin-bottom: 6px;
}
.ivd-prod-img {
  width: 48px; height: 48px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: #f1f5f9;
}
.ivd-prod-img--empty { width: 48px; height: 48px; border-radius: 10px; background: #f1f5f9; flex-shrink: 0; }
.ivd-prod-info { flex: 1; min-width: 0; }
.ivd-prod-name { font-size: 13px; font-weight: 500; color: #0f172a; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ivd-dec { font-size: 11px; font-weight: 600; border-radius: 5px; padding: 2px 7px; display: inline-block; }
.ivd-dec--ok   { background: #dcfce7; color: #166534; }
.ivd-dec--low  { background: #fef3c7; color: #92400e; }
.ivd-dec--none { background: #fee2e2; color: #991b1b; }
.ivd-cart-ctrl { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.ivd-cart-btn {
  width: 30px; height: 30px;
  border-radius: 8px; border: 1.5px solid #e2e8f0;
  background: #f8fafc; font-size: 16px; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: #2563eb;
}
.ivd-cart-btn--inc { background: #2563eb; color: #fff; border-color: #2563eb; }
.ivd-cart-btn:disabled { opacity: .4; cursor: not-allowed; }
.ivd-cart-qty { font-size: 13px; font-weight: 700; min-width: 36px; text-align: center; color: #0f172a; white-space: nowrap; }

.visinv-view-dialog { max-height: 90dvh; }
.visinv-view-uid { font-size: 16px; font-weight: 700; margin: 0; }
.visinv-view-meta { font-size: 12px; color: #6b7280; margin: 2px 0 0; }
.visinv-view-stats {
  display: flex; gap: 10px;
  padding: 8px 16px 6px;
  font-size: 13px; font-weight: 600;
  border-bottom: 1px solid #f1f5f9;
}
.visinv-view-stat { border-radius: 6px; padding: 3px 8px; }
.visinv-view-stat--ok  { background: #d1fae5; color: #065f46; }
.visinv-view-stat--low { background: #fef3c7; color: #92400e; }
.visinv-view-stat--none{ background: #fee2e2; color: #991b1b; }
.visinv-view-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid #f1f5f9;
}
.visinv-view-item:last-child { border-bottom: none; }
.visinv-view-img {
  width: 50px; height: 50px;
  border-radius: 10px; object-fit: cover; flex-shrink: 0;
  background: #f3f4f6;
}
.visinv-view-img--empty { width: 50px; height: 50px; border-radius: 10px; background: #f3f4f6; flex-shrink: 0; }
.visinv-view-meta { flex: 1; min-width: 0; }
.visinv-view-name { font-size: 13px; font-weight: 500; color: #111827; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.visinv-view-dec { font-size: 11px; font-weight: 600; border-radius: 4px; padding: 1px 5px; }
.visinv-view-dec--ok   { background: #d1fae5; color: #065f46; }
.visinv-view-dec--low  { background: #fef3c7; color: #92400e; }
.visinv-view-dec--none { background: #fee2e2; color: #991b1b; }
.visinv-view-qty { display: block; font-size: 11px; color: #6b7280; margin-top: 2px; }
.visinv-view-cart-ctrl {
  display: flex; align-items: center; gap: 6px;
  flex-shrink: 0;
}
.visinv-view-cart-qty { font-size: 15px; font-weight: 700; min-width: 22px; text-align: center; color: #111827; }
.mini-error-msg { color: #b91c1c; font-size: 14px; text-align: center; padding: 20px 0; }

.mini-auth-error.hidden {
  display: none;
}

.mini-auth-locked .footer-nav,
.mini-auth-locked main.app,
.mini-auth-locked [data-mini-shell="app"] {
  visibility: hidden;
  pointer-events: none;
}

.mini-auth-locked .mini-supplier-cabinet:not(.hidden),
.mini-auth-locked .mini-picker-cabinet:not(.hidden),
.mini-auth-locked #mini-checkout-dialog[open] {
  visibility: visible;
  pointer-events: auto;
}

.mini-auth-locked #mini-auth-logout-btn {
  display: none;
}

.footer-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 30;
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: stretch;
  gap: 2px;
  box-sizing: border-box;
}

.footer-nav > .footer-nav-btn {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  max-width: none;
  overflow: hidden;
}

.footer-nav > .footer-nav-btn.hidden,
#mini-nav-mgr-cart {
  display: none !important;
}

.mini-home-shell {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0 0 8px;
}

.mini-home-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.mini-home-header-main {
  flex: 1;
  min-width: 0;
}

.mini-home-greet {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 800;
  color: #0f172a;
}

.mini-home-manager-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 14px;
  flex-wrap: wrap;
}

.mini-home-manager-row #mini-home-lead {
  margin: 0;
  flex: 1;
  min-width: 0;
}

.mini-home-category-card,
.mini-home-product-card {
  font: inherit;
  font-weight: 400;
  color: #111827;
  cursor: pointer;
  box-sizing: border-box;
}

.mini-home-search-row {
  display: grid;
  grid-template-columns: 1fr 42px;
  gap: 8px;
}

.mini-home-search-trigger {
  border: 1px solid #e8edf6;
  background: #fff;
  border-radius: 14px;
  min-height: 44px;
  color: #77829b;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  font-size: 15px;
  text-align: left;
}

.mini-home-search-trigger svg,
.mini-home-filters-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.mini-home-filters-btn {
  border: 1px solid #e3e9f4;
  background: #fff;
  border-radius: 14px;
  min-height: 44px;
  color: #697995;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mini-home-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mini-home-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mini-home-block-head h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.mini-home-link-btn {
  width: auto;
  border: none;
  background: transparent;
  color: #0b74ff;
  font-size: 16px;
  font-weight: 700;
  padding: 0;
}

.mini-home-categories-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.mini-home-category-card {
  border: none;
  background: #fff;
  border-radius: 14px;
  padding: 10px 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  text-align: center;
}

.mini-home-category-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  background: linear-gradient(180deg, #f4f8ff 0%, #eef3fb 100%);
  object-fit: cover;
}

.mini-home-category-image--all {
  display: grid;
  place-items: center;
}

.mini-home-all-categories-icon {
  width: 42px;
  height: 42px;
  fill: #0b74ff;
}

.mini-home-category-name {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
  line-height: 1.15;
}

.mini-home-banner {
  border-radius: 16px;
  background: linear-gradient(135deg, #eef5ff 0%, #f7fbff 58%, #dceaff 100%);
  border: 1px solid #e4ecf9;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mini-home-banner h3 {
  margin: 0 0 6px;
  font-size: 28px;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.mini-home-banner p {
  margin: 0;
  color: #59667c;
}

.mini-home-banner-btn {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: none;
  background: #fff;
  color: #0b74ff;
  font-size: 24px;
  padding: 0;
  flex-shrink: 0;
}

.mini-home-products-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mini-home-product-card {
  border: none;
  background: #fff;
  border-radius: 14px;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.mini-home-product-media {
  position: relative;
  width: 100%;
}

.mini-home-product-card .mini-product-overlay-corner .mini-product-country-tag {
  position: static;
}

.mini-home-product-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
}

.mini-home-product-title {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
  line-height: 1.2;
  min-height: 2.4em;
  max-height: 2.4em;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.mini-home-product-bottom {
  margin-top: auto;
}

.mini-home-product-price {
  font-size: 26px;
  line-height: 1;
  color: #0f172a;
}

.footer-nav-btn {
  border-radius: 12px;
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 4px 0;
  font: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 0;
  height: 48px;
  width: auto;
  max-width: none;
  box-sizing: border-box;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.footer-nav-btn__icon {
  position: relative;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  margin: 0 auto;
}

.footer-nav-btn__img {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 28px;
  object-fit: contain;
  transition: opacity 0.16s ease;
  pointer-events: none;
}

.footer-nav-btn__img--active {
  opacity: 0;
}

.footer-nav-btn.active .footer-nav-btn__img--inactive {
  opacity: 0;
}

.footer-nav-btn.active .footer-nav-btn__img--active {
  opacity: 1;
}

.footer-nav-btn.active {
  color: var(--primary);
}

/* profile_* PNG — глиф чуть ниже в кадре; object-position стабильнее transform в iOS */
.footer-nav-btn[data-mini-nav="profile"] .footer-nav-btn__img,
.footer-nav-btn[data-mini-orders-nav="profile"] .footer-nav-btn__img {
  transform: translate(-50%, -50%);
  object-position: 50% 44%;
}

.mini-app-section {
  min-height: 40vh;
}

.mini-profile-header {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  margin: 0 0 10px;
  padding-right: max(0px, env(safe-area-inset-right, 0px));
  box-sizing: border-box;
}

.mini-profile-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
  flex-shrink: 0;
}

/* Скрываем кнопку «Выйти» внутри Telegram Mini App (только веб-версия её показывает) */
body.tg-webapp #mini-auth-logout-btn { display: none !important; }

/* ══ Onboarding управляющего ══ */
.mini-mgr-onboarding {
  position: fixed;
  inset: 0;
  z-index: 10002;
  background: #f6f7fb;
  display: flex;
  justify-content: center;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-x: none;
}
.mini-mgr-onboarding.hidden { display: none; }

.mini-mgr-onboarding-inner {
  width: 100%;
  max-width: 480px;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding: var(--mini-fullscreen-safe-top, calc(var(--mini-app-safe-top, env(safe-area-inset-top, 0px)) + 20px)) 16px calc(env(safe-area-inset-bottom, 0px) + 20px);
  box-sizing: border-box;
  overflow-x: hidden;
  max-width: min(480px, 100vw);
}

.mini-mgr-onboard-progress {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.mini-mgr-onboard-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #e5e7eb;
  transition: background .2s, transform .2s;
}
.mini-mgr-onboard-dot.is-active {
  background: #2563eb;
  transform: scale(1.15);
}

.mini-mgr-onboard-screen {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.mini-mgr-onboard-screen.hidden { display: none; }

.mini-mgr-onboard-screen--1 {
  gap: 0;
}

.mini-mgr-onboard-header--center {
  text-align: center;
  padding: 0 8px 12px;
}
.mini-mgr-onboard-header--center .mcp-title {
  font-size: 22px;
  margin-bottom: 8px;
}
.mini-mgr-onboard-header--center .mcp-subtitle {
  font-size: 14px;
  line-height: 1.45;
}

/* Превью экрана «Выберите клуб» */
.mini-mgr-onboard-mock {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 0 16px;
  min-height: 0;
}

.mini-mgr-onboard-mock-phone {
  width: 100%;
  max-width: 300px;
  background: #fff;
  border-radius: 28px;
  padding: 10px;
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(15, 23, 42, 0.04);
}

.mini-mgr-onboard-mock-screen {
  background: #f6f7fb;
  border-radius: 20px;
  padding: 14px 12px 12px;
}

.mini-mgr-onboard-mock-title {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.mini-mgr-onboard-mock-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border-radius: 10px;
  padding: 9px 12px;
  margin-bottom: 10px;
  color: #94a3b8;
  font-size: 13px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05);
}
.mini-mgr-onboard-mock-search svg {
  flex-shrink: 0;
}

.mini-mgr-onboard-mock-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mini-mgr-mock-club-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}

.mini-mgr-mock-club-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mini-mgr-mock-club-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mini-mgr-mock-club-name {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}

.mini-mgr-mock-club-addr {
  font-size: 11px;
  color: #6b7280;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-mgr-mock-club-chevron {
  flex-shrink: 0;
}

/* Иконки возможностей */
.mini-mgr-onboard-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 0 4px 16px;
}

.mini-mgr-onboard-feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.mini-mgr-onboard-feature-ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #eff6ff;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mini-mgr-onboard-feature-label {
  font-size: 10px;
  line-height: 1.25;
  color: #64748b;
  font-weight: 500;
}

.mini-mgr-onboard-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
  flex-shrink: 0;
}

.mini-mgr-onboard-footer .mcp-open-btn {
  margin-bottom: 0;
}

.mini-mgr-onboard-skip {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px;
  align-self: center;
}

.mini-mgr-onboard-title {
  margin: 0 0 12px;
  font-size: 26px;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.mini-mgr-onboard-title--center,
.mini-mgr-onboard-lead--center {
  text-align: center;
}

.mini-mgr-onboard-lead--center {
  padding: 0 8px;
}

.mini-mgr-onboard-lead {
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.5;
  color: #6b7280;
}

.mini-mgr-onboard-screen--2 {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mini-mgr-onboard-screen--hidden-products {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mini-mgr-onboard-screen--staff {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mini-mgr-onboard-screen--visinv {
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: none;
  touch-action: pan-y;
  max-width: 100%;
}

.mini-mgr-onboard-visinv-hero {
  position: relative;
  margin: 0 -8px 14px;
  padding: 18px 12px 22px;
  border-radius: 0 0 28px 28px;
  background:
    linear-gradient(180deg, rgba(219, 234, 254, 0.55) 0%, rgba(255, 255, 255, 0) 100%),
    radial-gradient(ellipse 120% 80% at 50% 0%, rgba(59, 130, 246, 0.12), transparent 70%);
  overflow: hidden;
}

.mini-mgr-onboard-visinv-phone {
  max-width: 220px;
  margin: 0 auto;
  padding: 10px;
  border-radius: 32px;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  box-shadow:
    0 24px 48px rgba(15, 23, 42, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.mini-mgr-onboard-visinv-phone-screen {
  background: #f6f7fb;
  border-radius: 24px;
  padding: 10px 10px 12px;
  overflow: hidden;
}

.mini-mgr-onboard-visinv-phone-top {
  display: grid;
  grid-template-columns: 24px 1fr 24px;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.mini-mgr-onboard-visinv-phone-back,
.mini-mgr-onboard-visinv-phone-menu {
  font-size: 16px;
  color: #64748b;
  text-align: center;
  line-height: 1;
}

.mini-mgr-onboard-visinv-phone-progress-text {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  text-align: center;
  margin-bottom: 5px;
}

.mini-mgr-onboard-visinv-phone-progress-text strong {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
}

.mini-mgr-onboard-visinv-phone-progress-bar {
  height: 6px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.mini-mgr-onboard-visinv-phone-progress-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0b74ff, #0052d4);
}

.mini-mgr-onboard-visinv-sku {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  margin-bottom: 6px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
  min-width: 0;
}

.mini-mgr-onboard-visinv-sku--open {
  flex-direction: column;
  align-items: stretch;
  padding: 10px;
}

.mini-mgr-onboard-visinv-sku-open-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.mini-mgr-onboard-visinv-sku-ico {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  flex-shrink: 0;
  background: #e2e8f0 center/cover no-repeat;
}

.mini-mgr-onboard-visinv-sku-ico--pepsi {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e3a8a 100%);
}

.mini-mgr-onboard-visinv-sku-ico--drpepper {
  background: linear-gradient(135deg, #7f1d1d 0%, #450a0a 100%);
}

.mini-mgr-onboard-visinv-sku-ico--lipton {
  background: linear-gradient(135deg, #84cc16 0%, #4d7c0f 100%);
}

.mini-mgr-onboard-visinv-sku-name {
  flex: 1;
  font-size: 11px;
  font-weight: 700;
  color: #0f172a;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-mgr-onboard-visinv-sku-chevron {
  color: #94a3b8;
  font-size: 14px;
  flex-shrink: 0;
}

.mini-mgr-onboard-visinv-sku-open-body {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px;
  margin-top: 8px;
  align-items: start;
}

.mini-mgr-onboard-visinv-sku-photo {
  width: 72px;
  height: 88px;
  border-radius: 12px;
  background: linear-gradient(160deg, #ecfccb 0%, #84cc16 55%, #4d7c0f 100%);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.mini-mgr-onboard-visinv-sku-meta {
  font-size: 9px;
  line-height: 1.45;
  color: #64748b;
}

.mini-mgr-onboard-visinv-sku-meta strong {
  color: #475569;
  font-weight: 700;
}

.mini-mgr-onboard-visinv-mark {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 8px 2px 6px;
  font-size: 10px;
  color: #64748b;
}

.mini-mgr-onboard-visinv-mark em {
  font-style: normal;
  font-size: 9px;
  color: #2563eb;
  font-weight: 600;
}

.mini-mgr-onboard-visinv-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.mini-mgr-onboard-visinv-act {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 52px;
  border-radius: 14px;
  color: #fff;
  padding: 8px 4px;
}

.mini-mgr-onboard-visinv-act-ico {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

.mini-mgr-onboard-visinv-act-label strong {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.mini-mgr-onboard-visinv-act--ok { background: #22c55e; }
.mini-mgr-onboard-visinv-act--low { background: #f59e0b; }
.mini-mgr-onboard-visinv-act--no { background: #ef4444; }

.mini-mgr-onboard-visinv-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 14px;
  max-width: 100%;
}

.mini-mgr-onboard-visinv-feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  min-width: 0;
}

.mini-mgr-onboard-visinv-feature-ico {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #eff6ff;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mini-mgr-onboard-visinv-feature-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 10px;
  color: #64748b;
  line-height: 1.25;
  min-width: 0;
}

.mini-mgr-onboard-visinv-feature-text strong {
  font-size: 11px;
  font-weight: 800;
  color: #0f172a;
}

.mini-mgr-onboard-step5-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin: 6px 0 14px;
  max-width: 100%;
  overflow: hidden;
}

.mini-mgr-onboard-step5-phone {
  min-width: 0;
  max-width: 100%;
  background: linear-gradient(180deg, rgba(99,102,241,0.10), rgba(99,102,241,0.04));
  border-radius: 26px;
  padding: 10px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.10), 0 0 0 1px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

.mini-mgr-onboard-step5-phone--right {
  background: linear-gradient(180deg, rgba(124,58,237,0.12), rgba(124,58,237,0.05));
}

.mini-mgr-onboard-step5-screen {
  background: #fff;
  border-radius: 18px;
  padding: 12px;
  overflow: hidden;
  max-width: 100%;
  box-sizing: border-box;
}

.mini-mgr-onboard-step5-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.mini-mgr-onboard-step5-badge-ok {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
  color: #065f46;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 6px 10px;
  border-radius: 999px;
  width: fit-content;
}

.mini-mgr-onboard-step5-sub {
  font-size: 10px;
  color: #64748b;
}

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

.mini-mgr-onboard-step5-stat {
  border-radius: 14px;
  padding: 10px 10px;
  background: #f8fafc;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}

.mini-mgr-onboard-step5-stat strong {
  font-size: 10px;
  color: #64748b;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.mini-mgr-onboard-step5-stat span {
  font-size: 14px;
  font-weight: 900;
  color: #0f172a;
}

.mini-mgr-onboard-step5-stat--ok { background: rgba(34,197,94,0.10); }
.mini-mgr-onboard-step5-stat--warn { background: rgba(245,158,11,0.12); }
.mini-mgr-onboard-step5-stat--bad { background: rgba(239,68,68,0.12); }

.mini-mgr-onboard-step5-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mini-mgr-onboard-step5-item,
.mini-mgr-onboard-step5-cart-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 14px;
  background: #f8fafc;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.04);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.mini-mgr-onboard-step5-item-text,
.mini-mgr-onboard-step5-cart-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.mini-mgr-onboard-step5-thumb {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #e2e8f0, #f8fafc);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
  flex-shrink: 0;
}

.mini-mgr-onboard-step5-item-name {
  font-weight: 900;
  color: #0f172a;
  font-size: 11px;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-mgr-onboard-step5-item-sub {
  font-size: 10px;
  color: #64748b;
  margin-top: 2px;
}

.mini-mgr-onboard-step5-chip {
  margin-left: auto;
  font-size: 9px;
  font-weight: 900;
  padding: 6px 8px;
  border-radius: 999px;
  flex-shrink: 0;
  max-width: 42%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-mgr-onboard-step5-chip--bad { background: rgba(239,68,68,0.12); color: #991b1b; }
.mini-mgr-onboard-step5-chip--warn { background: rgba(245,158,11,0.14); color: #92400e; }

.mini-mgr-onboard-step5-cart-head {
  margin-bottom: 10px;
}
.mini-mgr-onboard-step5-cart-title {
  font-weight: 900;
  font-size: 12px;
  color: #0f172a;
}
.mini-mgr-onboard-step5-cart-sub {
  font-size: 10px;
  color: #64748b;
  margin-top: 2px;
}

.mini-mgr-onboard-step5-cart-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mini-mgr-onboard-step5-qty {
  margin-left: auto;
  width: 30px;
  height: 30px;
  border-radius: 12px;
  background: #ede9fe;
  color: #5b21b6;
  font-weight: 900;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mini-mgr-onboard-step5-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 12px 4px 10px;
  color: #0f172a;
  font-size: 11px;
  font-weight: 800;
}
.mini-mgr-onboard-step5-total strong {
  font-size: 14px;
  font-weight: 900;
}

.mini-mgr-onboard-step5-cta {
  height: 40px;
  border-radius: 14px;
  background: linear-gradient(90deg, #7c3aed, #5b21b6);
  color: #fff;
  font-weight: 900;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mini-mgr-onboard-step5-arrow {
  position: absolute;
  left: calc(50% - 60px);
  top: -6px;
  color: #7c3aed;
  opacity: 0.9;
  pointer-events: none;
}

.mini-mgr-onboard-step5-subtitle {
  margin: 6px 0 10px;
  font-size: 16px;
  font-weight: 900;
  color: #0f172a;
  text-align: center;
}

.mini-mgr-onboard-step5-benefits {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 12px;
  max-width: 100%;
  overflow: hidden;
}

.mini-mgr-onboard-step5-benefit {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(124, 58, 237, 0.06);
  border: 1px solid rgba(124, 58, 237, 0.14);
  border-radius: 16px;
  padding: 12px 14px;
}

.mini-mgr-onboard-step5-benefit-ico {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: #ede9fe;
  color: #6d28d9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mini-mgr-onboard-step5-benefit-text strong {
  display: block;
  font-size: 13px;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.25;
}

.mini-mgr-onboard-step5-benefit-text span {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: #475569;
  line-height: 1.35;
}

.mini-mgr-onboard-staff-hero {
  position: relative;
  margin: 10px 0 14px;
  min-height: 260px;
}

.mini-mgr-onboard-staff-phone {
  width: 170px;
  background: linear-gradient(180deg, rgba(139,92,246,0.18), rgba(139,92,246,0.06));
  border-radius: 26px;
  padding: 10px;
  box-shadow: 0 12px 28px rgba(139, 92, 246, 0.18), 0 0 0 1px rgba(139,92,246,0.18);
}

.mini-mgr-onboard-staff-phone-screen {
  background: #fff;
  border-radius: 18px;
  padding: 14px 12px 12px;
}

.mini-mgr-onboard-staff-phone-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: #7c3aed;
  font-size: 12px;
  letter-spacing: 0.02em;
}

.mini-mgr-onboard-staff-phone-bug {
  width: 18px;
  height: 18px;
  border-radius: 7px;
  background: radial-gradient(circle at 30% 30%, #a78bfa, #7c3aed);
  display: inline-block;
  position: relative;
}
.mini-mgr-onboard-staff-phone-bug::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 5px;
  background: rgba(255,255,255,0.5);
}

.mini-mgr-onboard-staff-phone-title {
  margin-top: 10px;
  font-weight: 800;
  color: #0f172a;
  font-size: 13px;
}

.mini-mgr-onboard-staff-phone-sub {
  margin-top: 4px;
  font-size: 10px;
  color: #64748b;
  line-height: 1.3;
}

.mini-mgr-onboard-staff-phone-input {
  margin-top: 10px;
  height: 26px;
  border-radius: 10px;
  background: #f1f5f9;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.mini-mgr-onboard-staff-phone-btn {
  margin-top: 10px;
  height: 30px;
  border-radius: 12px;
  background: linear-gradient(90deg, #7c3aed, #5b21b6);
  color: #fff;
  font-weight: 800;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mini-mgr-onboard-staff-card {
  position: absolute;
  left: 150px;
  top: 44px;
  width: 260px;
  background: #fff;
  border-radius: 18px;
  padding: 12px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(15, 23, 42, 0.04);
}

.mini-mgr-onboard-staff-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.mini-mgr-onboard-staff-card-title {
  font-weight: 800;
  color: #0f172a;
  font-size: 12px;
}

.mini-mgr-onboard-staff-card-add {
  font-weight: 800;
  color: #2563eb;
  font-size: 11px;
  background: #eff6ff;
  padding: 6px 10px;
  border-radius: 12px;
}

.mini-mgr-onboard-staff-card-row {
  display: grid;
  grid-template-columns: 1fr 88px;
  gap: 8px;
  margin-bottom: 10px;
}

.mini-mgr-onboard-staff-card-filter,
.mini-mgr-onboard-staff-card-role {
  height: 26px;
  border-radius: 12px;
  background: #f1f5f9;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.mini-mgr-onboard-staff-card-person {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 14px;
  background: #f8fafc;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.04);
  margin-bottom: 8px;
}
.mini-mgr-onboard-staff-card-person:last-child { margin-bottom: 0; }

.mini-mgr-onboard-staff-card-ava {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, #e2e8f0, #f8fafc);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
  flex-shrink: 0;
}

.mini-mgr-onboard-staff-card-person-name {
  font-weight: 800;
  color: #0f172a;
  font-size: 12px;
  line-height: 1.15;
}
.mini-mgr-onboard-staff-card-person-sub {
  font-size: 10px;
  color: #64748b;
  margin-top: 2px;
}

.mini-mgr-onboard-staff-card-pill {
  margin-left: auto;
  font-size: 10px;
  font-weight: 800;
  color: #059669;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 5px 10px;
  border-radius: 999px;
  flex-shrink: 0;
}

.mini-mgr-onboard-staff-arrow {
  position: absolute;
  left: 126px;
  top: 18px;
  color: #8b5cf6;
  opacity: 0.9;
  pointer-events: none;
}

.mini-mgr-onboard-staff-snacks {
  position: absolute;
  left: 120px;
  top: 190px;
  width: 340px;
  height: 70px;
  pointer-events: none;
  opacity: 0.95;
}

.mini-mgr-onboard-staff-snack {
  position: absolute;
  bottom: 0;
  width: 92px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, #f1f5f9, #fff);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(15, 23, 42, 0.04);
}
.mini-mgr-onboard-staff-snack--1 { left: 0; transform: rotate(-8deg); }
.mini-mgr-onboard-staff-snack--2 { left: 70px; transform: rotate(-2deg); }
.mini-mgr-onboard-staff-snack--3 { left: 150px; transform: rotate(4deg); }
.mini-mgr-onboard-staff-snack--4 { left: 230px; transform: rotate(10deg); }

.mini-mgr-onboard-staff-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(139, 92, 246, 0.10);
  border: 1px solid rgba(139, 92, 246, 0.25);
  color: #4c1d95;
  margin: 0 0 14px;
}

.mini-mgr-onboard-staff-note-ico {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(139, 92, 246, 0.12);
  color: #7c3aed;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mini-mgr-onboard-staff-note-text {
  font-size: 13px;
  line-height: 1.45;
  font-weight: 700;
}

.mini-mgr-onboard-hidden-hero {
  position: relative;
  margin: 6px 0 18px;
}

.mini-mgr-onboard-hidden-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.mini-mgr-onboard-hidden-catalog-stock {
  font-size: 10px;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.mini-mgr-onboard-hidden-catalog-stock i {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #22c55e;
  display: inline-block;
}

.mini-mgr-onboard-hidden-catalog-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.9);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.12);
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.mini-mgr-onboard-hidden-catalog-badge svg {
  color: #94a3b8;
}

.mini-mgr-onboard-hidden-card {
  background: #fff;
  border-radius: 18px;
  padding: 12px 12px 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.10), 0 0 0 1px rgba(15, 23, 42, 0.04);
  min-width: 0;
}

.mini-mgr-onboard-hidden-card--tilted {
  transform: rotate(-10deg) translateY(-6px);
  transform-origin: 50% 60%;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(15, 23, 42, 0.05);
}

.mini-mgr-onboard-hidden-card-img {
  height: 72px;
  border-radius: 14px;
  background: linear-gradient(135deg, #e0f2fe, #eef2ff);
  position: relative;
  overflow: hidden;
}

.mini-mgr-onboard-hidden-card-img::after {
  content: "";
  position: absolute;
  inset: -30% -30%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.85), transparent 55%);
  transform: rotate(10deg);
}

.mini-mgr-onboard-hidden-card-img--shoe { background: linear-gradient(135deg, #dbeafe, #f1f5f9); }
.mini-mgr-onboard-hidden-card-img--bag { background: linear-gradient(135deg, #f8fafc, #e2e8f0); }
.mini-mgr-onboard-hidden-card-img--headphones { background: linear-gradient(135deg, #e0e7ff, #f1f5f9); }

.mini-mgr-onboard-hidden-card-lines {
  margin: 10px 0 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mini-mgr-onboard-hidden-card-lines span {
  height: 8px;
  border-radius: 999px;
  background: #e5e7eb;
  display: block;
}
.mini-mgr-onboard-hidden-card-lines span:last-child {
  width: 70%;
  opacity: 0.75;
}

.mini-mgr-onboard-hidden-card-price {
  font-weight: 800;
  font-size: 13px;
  color: #0f172a;
}

.mini-mgr-onboard-hidden-card-stock {
  margin-top: 6px;
  font-size: 11px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
}
.mini-mgr-onboard-hidden-card-stock i {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #22c55e;
  display: inline-block;
}
.mini-mgr-onboard-hidden-card-stock--hidden {
  color: #64748b;
}
.mini-mgr-onboard-hidden-card-stock--hidden i { display: none; }
.mini-mgr-onboard-hidden-card-stock--hidden svg { color: #94a3b8; }

.mini-mgr-onboard-hidden-slot {
  border-radius: 18px;
  border: 2px dashed #cbd5e1;
  background: rgba(255,255,255,0.55);
  padding: 12px;
  min-height: 142px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mini-mgr-onboard-hidden-slot-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  color: #2563eb;
}

.mini-mgr-onboard-hidden-slot-ico {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: #eff6ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #2563eb;
}

.mini-mgr-onboard-hidden-slot-text {
  font-weight: 800;
  font-size: 12px;
  color: #2563eb;
  line-height: 1.15;
}

.mini-mgr-onboard-hidden-arrow {
  position: absolute;
  right: 44px;
  top: -10px;
  color: #2563eb;
  opacity: 0.9;
  pointer-events: none;
}

.mini-mgr-onboard-hidden-benefits {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 10px;
}

.mini-mgr-onboard-hidden-benefit {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}

.mini-mgr-onboard-hidden-benefit-ico {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: #eff6ff;
  color: #2563eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mini-mgr-onboard-hidden-benefit-text {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

@media (max-width: 420px) {
  .mini-mgr-onboard-hidden-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .mini-mgr-onboard-hidden-arrow {
    display: none;
  }
  .mini-mgr-onboard-staff-hero {
    min-height: 300px;
  }
  .mini-mgr-onboard-staff-card {
    position: relative;
    left: 0;
    top: 0;
    width: auto;
    margin-top: 10px;
  }
  .mini-mgr-onboard-staff-arrow,
  .mini-mgr-onboard-staff-snacks {
    display: none;
  }

  .mini-mgr-onboard-step5-hero {
    grid-template-columns: 1fr;
  }
  .mini-mgr-onboard-step5-arrow {
    display: none;
  }
}

.mini-mgr-onboard-lead--compact {
  margin-bottom: 16px;
}

.mini-mgr-onboard-trees {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 16px;
}

.mini-mgr-onboard-club-tree {
  --club-tree-accent: #8b5cf6;
  --club-tree-accent-soft: rgba(139, 92, 246, 0.12);
  --club-tree-line: rgba(139, 92, 246, 0.45);
}

.mini-mgr-onboard-club-tree--green {
  --club-tree-accent: #10b981;
  --club-tree-accent-soft: rgba(16, 185, 129, 0.12);
  --club-tree-line: rgba(16, 185, 129, 0.45);
}

.mini-mgr-onboard-club-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--club-tree-accent-soft);
  border: 1px solid color-mix(in srgb, var(--club-tree-accent) 18%, transparent);
}

.mini-mgr-onboard-club-head-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #fff;
  color: var(--club-tree-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
}

.mini-mgr-onboard-club-head-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.mini-mgr-onboard-club-head-text strong {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.mini-mgr-onboard-club-head-text span {
  font-size: 12px;
  color: #64748b;
  line-height: 1.3;
}

.mini-mgr-onboard-tree-lines {
  display: block;
  width: 100%;
  height: 22px;
  margin: 0 0 2px;
  color: var(--club-tree-line);
}

.mini-mgr-onboard-tree-nodes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.mini-mgr-onboard-tree-node {
  background: #fff;
  border-radius: 12px;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
  min-height: 72px;
}

.mini-mgr-onboard-tree-node-ico {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--club-tree-accent-soft);
  color: var(--club-tree-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mini-mgr-onboard-tree-node-label {
  font-size: 9px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}

.mini-mgr-onboard-tree-node-val {
  font-size: 8px;
  color: #94a3b8;
  line-height: 1.25;
}

.mini-mgr-onboard-isolated {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  margin-bottom: 16px;
}

.mini-mgr-onboard-isolated-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #fff;
  color: #059669;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mini-mgr-onboard-isolated-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.mini-mgr-onboard-isolated-text strong {
  font-size: 14px;
  font-weight: 800;
  color: #065f46;
  line-height: 1.3;
}

.mini-mgr-onboard-isolated-text span {
  font-size: 12px;
  color: #047857;
  line-height: 1.45;
}

.mini-mgr-onboard-footer--step {
  margin-top: auto;
  padding-top: 4px;
}

.mini-mgr-onboard-back {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px;
  align-self: center;
}

.mini-mgr-onboard-steps {
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  counter-reset: mgr-step;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mini-mgr-onboard-steps li {
  counter-increment: mgr-step;
  background: #fff;
  border-radius: 12px;
  padding: 12px 14px 12px 44px;
  position: relative;
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}
.mini-mgr-onboard-steps li::before {
  content: counter(mgr-step);
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mini-mgr-onboard-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}

.mini-mgr-onboard-secondary {
  width: 100%;
  min-height: 52px;
  border-radius: 14px;
  border: none;
  background: transparent;
  color: #2563eb;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.mini-mgr-onboarding .mag-primary-btn,
.mini-mgr-onboard-screen .mag-primary-btn {
  margin-top: auto;
}

.mini-mgr-context-hint {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #eff6ff;
  color: #475569;
  font-size: 13px;
  line-height: 1.45;
}
.mini-mgr-context-hint--dialog {
  margin-top: 0;
  margin-bottom: 12px;
}

.mcp-empty-state {
  text-align: center;
  padding: 28px 16px 12px;
}
.mcp-empty-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
}
.mcp-empty-lead {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.5;
}
.mcp-empty-create-btn {
  width: 100%;
  max-width: 280px;
}

.visinv-head-sub {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 400;
}

/* ══ Экран выбора клуба (дизайн 1:1) ══ */
.mini-club-picker {
  position: fixed; inset: 0; z-index: 10001; /* выше auth gate (10000) */
  background: #f6f7fb;
  display: flex; flex-direction: column;
  align-items: center;
  overflow-y: auto;
}
.mini-club-picker.hidden { display: none; }

/* ══ Экран выбора клуба — дизайн 1:1 ══ */
.mcp-shell {
  width: 100%; max-width: 480px;
  display: flex; flex-direction: column;
  min-height: 100%; position: relative;
}

/* Шапка */
.mcp-header {
  padding: var(--mini-fullscreen-safe-top, calc(var(--mini-app-safe-top, env(safe-area-inset-top, 0px)) + 20px)) 20px 16px;
  background: #f6f7fb;
}
.mcp-title {
  font-size: 24px; font-weight: 800; color: #0f172a;
  letter-spacing: -0.02em; margin: 0 0 6px;
}
.mcp-subtitle { font-size: 14px; color: #6b7280; margin: 0; line-height: 1.45; }

/* Прокручиваемая зона */
.mcp-scroll {
  flex: 1; overflow-y: auto;
  padding: 4px 16px calc(env(safe-area-inset-bottom, 0px) + 24px);
  display: flex; flex-direction: column; gap: 10px;
}

/* Карточка «Добавить новый клуб» */
.mcp-new-club-card {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border-radius: 16px; padding: 14px 16px;
  border: 1.5px dashed #2563eb; cursor: pointer;
  text-align: left; width: 100%;
  transition: background .15s;
}
.mcp-new-club-card:active { background: #eff6ff; }
.mcp-new-club-icon {
  width: 42px; height: 42px; border-radius: 10px;
  background: #eff6ff; color: #2563eb;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.mcp-new-club-text { flex: 1; }
.mcp-new-club-label { display: block; font-size: 15px; font-weight: 700; color: #2563eb; }
.mcp-new-club-sub { display: block; font-size: 12px; color: #6b7280; margin-top: 2px; }

.mcp-inline-form {
  background: #fff;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 2px 12px rgba(15,23,42,.06);
}
.mcp-inline-form.hidden { display: none; }

/* Список */
.mcp-list { display: flex; flex-direction: column; gap: 10px; }
.mcp-empty { text-align: center; color: #9ca3af; padding: 24px 0; font-size: 14px; }

/* Карточка клуба */
.mcp-club-card {
  background: #fff; border-radius: 18px;
  padding: 16px; box-shadow: 0 2px 12px rgba(15,23,42,.08);
}
.mcp-club-top { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.mcp-club-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.mcp-club-info { flex: 1; min-width: 0; }
.mcp-club-name-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; }
.mcp-club-name { font-size: 17px; font-weight: 700; color: #0f172a; }
.mcp-club-addr {
  display: flex; align-items: center; gap: 4px;
  font-size: 13px; color: #6b7280;
}

/* Статистика внутри карточки */
.mcp-club-stats {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px; margin-bottom: 14px;
}
.mcp-stat-block {
  display: flex; align-items: center; gap: 8px;
  background: #f8fafc; border-radius: 10px; padding: 10px 10px;
}
.mcp-stat-text { display: flex; flex-direction: column; gap: 1px; }
.mcp-stat-val { font-size: 13px; font-weight: 700; color: #0f172a; }
.mcp-stat-val--blue { color: #2563eb; }
.mcp-stat-sub { font-size: 11px; color: #94a3b8; }

/* Кнопка открытия */
.mcp-open-btn {
  width: 100%; padding: 14px; border: none; border-radius: 12px;
  background: #2563eb; color: #fff;
  font-size: 15px; font-weight: 700; cursor: pointer;
  transition: opacity .15s;
}
.mcp-open-btn:active { opacity: .88; }

/* Подвал */
.mcp-footer-note {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 12px; color: #9ca3af; line-height: 1.4;
  padding: 4px 0 8px;
}

/* Форма создания клуба */
.mcp-create-form {
  position: absolute; inset: 0; z-index: 10;
  background: #f6f7fb;
  display: flex; flex-direction: column; justify-content: center;
  padding: 20px;
}
.mcp-create-form.hidden { display: none; }
.mcp-create-inner {
  background: #fff; border-radius: 20px;
  padding: 24px; display: flex; flex-direction: column; gap: 12px;
  box-shadow: 0 4px 24px rgba(15,23,42,.1);
}
.mcp-create-title { font-size: 20px; font-weight: 800; margin: 0; }
.mcp-input {
  width: 100%; padding: 13px 14px; border-radius: 12px;
  border: 1.5px solid #e5e7eb; font-size: 15px; outline: none;
  box-sizing: border-box;
}
.mcp-input:focus { border-color: #2563eb; }
.mcp-form-row { display: flex; gap: 10px; margin-top: 4px; }
.mcp-submit-btn {
  flex: 1; padding: 13px; border: none; border-radius: 12px;
  background: #2563eb; color: #fff;
  font-size: 15px; font-weight: 700; cursor: pointer;
}

/* Mini App кабинет сборщика */
.mini-picker-cabinet {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: #f2f2f7;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

.mini-picker-cabinet.hidden {
  display: none;
}

.mini-picker-shell {
  width: 100%;
  max-width: 480px;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.mini-picker-header.hidden {
  display: none !important;
}

.mini-picker-shell--subpage .mini-picker-scroll {
  padding-top: calc(var(--mini-fullscreen-safe-top, calc(var(--mini-app-safe-top, env(safe-area-inset-top, 0px)) + 20px)) + 6px);
}

.mini-picker-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: var(--mini-fullscreen-safe-top, calc(var(--mini-app-safe-top, env(safe-area-inset-top, 0px)) + 20px)) 16px 16px;
  background: #f6f7fb;
}

.mini-picker-title {
  margin: 0 0 6px;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.mini-picker-subtitle {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: #6b7280;
}

.mini-picker-close-btn {
  border-radius: 12px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
}

.mini-picker-scroll {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 16px calc(92px + env(safe-area-inset-bottom, 0px));
}

.mini-picker-panel.hidden {
  display: none !important;
}

.mini-picker-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mini-picker-panel-title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.mini-picker-orders-list,
.mini-picker-order-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mini-picker-dashboard-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(2, minmax(82px, 0.55fr));
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid #e7eef8;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.08);
}

.mini-picker-dashboard-kicker {
  display: block;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
}

.mini-picker-dashboard-main strong {
  display: inline-block;
  margin: 6px 6px 4px 0;
  color: #2563eb;
  font-size: 34px;
  line-height: 1;
  font-weight: 900;
}

.mini-picker-dashboard-main > span:not(.mini-picker-dashboard-kicker) {
  color: #2563eb;
  font-size: 15px;
  font-weight: 800;
}

.mini-picker-dashboard-main small {
  display: block;
  color: #94a3b8;
  font-size: 12px;
}

.mini-picker-dashboard-stat {
  display: grid;
  place-items: center;
  gap: 4px;
  border-left: 1px solid #f1f5f9;
}

.mini-picker-dashboard-stat span {
  color: #94a3b8;
  font-size: 12px;
}

.mini-picker-dashboard-stat strong {
  color: #0f172a;
  font-size: 24px;
  line-height: 1;
}

.mini-picker-orders-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}

.mini-picker-orders-head h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  color: #0f172a;
}

.mini-picker-orders-count {
  color: #94a3b8;
  font-size: 13px;
  font-weight: 600;
}

.mini-picker-order-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  grid-template-areas:
    "icon main status"
    "buttons buttons buttons";
  gap: 10px 12px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid #e7eef8;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.08);
}

body.mini-picker-mode .mini-picker-order-actions,
body.mini-picker-mode .mini-picker-order-actions select,
body.mini-picker-mode [data-mini-picker-order-status],
body.mini-picker-mode .mini-picker-order-details {
  display: none !important;
}

.mini-picker-order-icon {
  grid-area: icon;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 20px;
  font-weight: 800;
}

.mini-picker-order-main {
  grid-area: main;
  min-width: 0;
}

.mini-picker-order-main strong {
  display: block;
  color: #0f172a;
  font-size: 16px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-picker-order-main p {
  margin: 3px 0 0;
  color: #64748b;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-picker-order-main .muted {
  display: block;
  color: #94a3b8;
  font-size: 12px;
  margin-top: 3px;
}

.mini-picker-order-status {
  grid-area: status;
  justify-self: end;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--status-color, #eff6ff);
  color: var(--status-text-color, #2563eb);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.mini-picker-order-status[style*="--status-color"] {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.mini-picker-order-actions {
  grid-area: actions;
  justify-self: end;
}

.mini-picker-order-actions select {
  width: auto;
  max-width: 150px;
  padding: 8px 26px 8px 10px;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
}

.mini-picker-order-details {
  grid-area: details;
  border-top: 1px solid #f1f5f9;
  padding-top: 10px;
}

.mini-picker-order-details summary {
  cursor: pointer;
  color: #2563eb;
  font-size: 13px;
  font-weight: 800;
  list-style: none;
}

.mini-picker-order-details summary::-webkit-details-marker {
  display: none;
}

.mini-picker-order-details summary::after {
  content: "›";
  display: inline-block;
  margin-left: 6px;
  transition: transform 0.15s ease;
}

.mini-picker-order-details[open] summary::after {
  transform: rotate(90deg);
}

.mini-picker-order-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.mini-picker-order-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: 12px;
  background: #f8fafc;
}

.mini-picker-order-item img,
.mini-picker-order-item-empty {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #e2e8f0;
  object-fit: cover;
}

.mini-picker-order-item-main {
  min-width: 0;
}

.mini-picker-order-item-main strong {
  display: block;
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-picker-order-item-main small,
.mini-picker-order-item-empty-note {
  color: #64748b;
  font-size: 12px;
}

.mini-picker-order-buttons {
  grid-area: buttons;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mini-picker-order-buttons--single {
  grid-template-columns: 1fr;
}

.mini-picker-order-buttons--done {
  align-items: center;
}

.mini-picker-order-done-note {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 14px;
  background: #ecfdf5;
  color: #15803d;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.mini-picker-order-btn {
  border: 0;
  border-radius: 14px;
  padding: 12px 10px;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.mini-picker-order-btn--primary {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
}

.mini-picker-order-btn--secondary {
  background: #eff6ff;
  color: #2563eb;
}

/* Сборка — экран сборщика (макет v3) */
.mini-pick2-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.mini-pick2-title {
  margin: 0 0 4px;
  font-size: 30px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.mini-pick2-subtitle {
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
  color: #8e8e93;
}

.mini-pick2-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.mini-pick2-head-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid #e8edf3;
  border-radius: 12px;
  background: #fff;
  color: #64748b;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mini-pick2-head-btn__dot {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #007aff;
  border: 2px solid #fff;
}

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

.mini-pick2-stat-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #eef1f6;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
  min-width: 0;
}

.mini-pick2-stat-ico {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
}

.mini-pick2-stat-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  min-width: 0;
}

.mini-pick2-stat-ico--blue {
  background: #e8f2ff;
  color: #007aff;
}

.mini-pick2-stat-ico--orange {
  background: #fff3e8;
  color: #f97316;
}

.mini-pick2-stat-ico--green {
  background: #e8faf0;
  color: #22c55e;
}

.mini-pick2-stat-val {
  font-size: 20px;
  line-height: 1;
  font-weight: 800;
  color: #0f172a;
}

.mini-pick2-stat-label {
  font-size: 11px;
  font-weight: 600;
  color: #8e8e93;
  line-height: 1.2;
  text-align: left;
}

.mini-pick2-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.mini-pick2-search {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  height: 46px;
  border: 1px solid #e8edf3;
  border-radius: 14px;
  background: #fff;
}

.mini-pick2-search__ico {
  display: flex;
  color: #aeaeb2;
  flex-shrink: 0;
}

.mini-pick2-search__input {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: 14px;
  color: #0f172a;
  outline: none;
}

.mini-pick2-search__input::placeholder {
  color: #aeaeb2;
}

.mini-pick2-search-filter {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid #e8edf3;
  border-radius: 14px;
  background: #fff;
  color: #64748b;
  padding: 0;
  cursor: pointer;
}

.mini-pick2-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  margin-bottom: 14px;
  scrollbar-width: none;
}

.mini-pick2-chips::-webkit-scrollbar {
  display: none;
}

.mini-pick2-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #e8edf3;
  border-radius: 999px;
  background: #fff;
  color: #636366;
  padding: 8px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mini-pick2-chip__ico {
  display: flex;
  align-items: center;
  justify-content: center;
  color: inherit;
}

.mini-pick2-chip.is-active {
  border-color: #007aff;
  background: #007aff;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.28);
}

.mini-pick2-chip__count {
  min-width: 22px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

.mini-pick2-chip__count.is-zero {
  opacity: 0.55;
}

.mini-pick2-chip.is-active .mini-pick2-chip__count {
  background: rgba(255, 255, 255, 0.28);
  color: #fff;
  opacity: 1;
}

.mini-pick2-order-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 8px;
}

.mini-pick2-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #eef1f6;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}

.mini-pick2-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  flex-shrink: 0;
}

.mini-pick2-card-icon--new {
  background: #e8f2ff;
  color: #007aff;
}

.mini-pick2-card-icon--urgent {
  background: #ffeceb;
  color: #ff3b30;
}

.mini-pick2-card-icon--progress,
.mini-pick2-card-icon--work {
  background: #fff3e8;
  color: #f97316;
}

.mini-pick2-card-icon--done {
  background: #e8faf0;
  color: #22c55e;
}

.mini-pick2-card-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mini-pick2-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.mini-pick2-card-head-left {
  min-width: 0;
  flex: 1;
}

.mini-pick2-card-head-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.mini-pick2-card-id-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.mini-pick2-card-id {
  font-size: 13px;
  font-weight: 800;
  color: #1c1c1e;
}

.mini-pick2-order-badge {
  flex-shrink: 0;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.mini-pick2-order-badge--new {
  background: #e8f2ff;
  color: #007aff;
}

.mini-pick2-order-badge--urgent {
  background: #ffeceb;
  color: #ff3b30;
}

.mini-pick2-order-badge--work {
  background: #fff3e8;
  color: #ea580c;
}

.mini-pick2-order-badge--done {
  background: #e8faf0;
  color: #16a34a;
}

.mini-pick2-card-title {
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
  font-weight: 700;
  color: #0f172a;
}

.mini-pick2-card-price {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
}

.mini-pick2-card-chevron {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #c7cdd8;
  padding: 0;
  cursor: pointer;
}

.mini-pick2-card-line {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
  color: #8e8e93;
}

.mini-pick2-card-line-ico {
  display: flex;
  flex-shrink: 0;
  margin-top: 1px;
  color: #aeaeb2;
}

.mini-pick2-card-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 42px;
  margin-top: 4px;
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: rgba(0, 122, 255, 0.2);
  transition: transform 0.12s ease, opacity 0.12s ease, box-shadow 0.12s ease;
}

.mini-pick2-card-action:active,
.mini-pick2-card-action.is-pressed {
  transform: scale(0.97);
  opacity: 0.88;
}

.mini-pick2-card-action.is-pressed {
  pointer-events: none;
}

.mini-pick2-card-chevron:active {
  transform: scale(0.92);
  opacity: 0.7;
}

.mini-pick2-card-action--primary {
  background: #007aff;
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 122, 255, 0.25);
}

.mini-pick2-card-action--primary .mini-pick2-card-action-arrow {
  color: #fff;
}

.mini-pick2-card-action--soft {
  background: #eef5ff;
  color: #007aff;
}

.mini-pick2-card-action--soft .mini-pick2-card-action-arrow {
  color: #007aff;
}

.mini-pick2-card-action-arrow {
  display: flex;
  align-items: center;
}

/* Кнопки сборки — не наследуют глобальный синий button */
.mini-picker-cabinet .mini-pick2-head-btn,
.mini-picker-cabinet .mini-pick2-search-filter,
.mini-picker-cabinet .mini-pick2-chip,
.mini-picker-cabinet .mini-pick2-card-chevron,
.mini-picker-cabinet .mini-pick2-card-action {
  width: auto;
  font-weight: inherit;
}

.mini-picker-home-hero {
  padding: 18px 16px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #ebebf0;
  text-align: center;
}

.mini-picker-home-kicker {
  display: block;
  color: #8e8e93;
  font-size: 13px;
  font-weight: 600;
}

.mini-picker-home-hero strong {
  display: block;
  margin: 6px 0 2px;
  font-size: 40px;
  line-height: 1;
  font-weight: 900;
  color: #007aff;
}

.mini-picker-home-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.mini-picker-home-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 12px 10px;
  border: 1px solid #ebebf0;
  border-radius: 16px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.mini-picker-home-stat span {
  font-size: 12px;
  font-weight: 600;
  color: #8e8e93;
}

.mini-picker-home-stat strong {
  font-size: 24px;
  font-weight: 800;
  color: #007aff;
}

.mini-picker-home-stat[data-mini-picker-home-stat-danger] strong {
  color: #ff3b30;
}

.mini-picker-home-cta {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  background: #007aff;
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 122, 255, 0.28);
}

.mini-picker-profile-card {
  padding: 16px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #ebebf0;
}

.mini-picker-footer {
  position: relative;
  z-index: 30;
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 1fr 1fr auto 1fr 1fr;
  align-items: end;
  gap: 2px;
  padding: 6px 8px calc(8px + env(safe-area-inset-bottom, 0px));
  background: #fff;
  border-top: 1px solid #e8edf6;
  box-sizing: border-box;
  box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.06);
}

.mini-picker-footer-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #8e8e93;
  padding: 6px 4px;
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.15;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mini-picker-footer-btn__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.mini-picker-footer-btn__svg {
  display: block;
  width: 24px;
  height: 24px;
}

.mini-picker-footer-btn__svg--active {
  display: none;
}

.mini-picker-footer-btn.is-active .mini-picker-footer-btn__svg--inactive {
  display: none;
}

.mini-picker-footer-btn.is-active .mini-picker-footer-btn__svg--active {
  display: block;
}

.mini-picker-footer-btn.is-active {
  color: #007aff;
}

.mini-picker-footer-btn__label {
  display: block;
  max-width: 100%;
  text-align: center;
  word-break: break-word;
}

.mini-picker-footer-btn--add {
  align-self: center;
  padding: 0 6px 4px;
}

.mini-picker-footer-btn__add {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-top: -18px;
  border-radius: 999px;
  background: linear-gradient(180deg, #3b9bff 0%, #007aff 100%);
  color: #fff;
  font-size: 32px;
  font-weight: 300;
  line-height: 1;
  box-shadow: 0 6px 18px rgba(0, 122, 255, 0.38);
}

.mini-picker-footer-btn--add.is-active .mini-picker-footer-btn__add {
  box-shadow: 0 6px 20px rgba(0, 122, 255, 0.5);
}

/* Mini App кабинет поставщика */
.mini-supplier-cabinet {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: #f6f7fb;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

.mini-supplier-cabinet.hidden {
  display: none;
}

.mini-supplier-shell {
  width: 100%;
  max-width: 480px;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.mini-supplier-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: var(--mini-fullscreen-safe-top, calc(var(--mini-app-safe-top, env(safe-area-inset-top, 0px)) + 20px)) 16px 14px;
  background: #f6f7fb;
}

.mini-supplier-header.hidden {
  display: none !important;
}

.mini-supplier-shell--subpage .mini-supplier-scroll {
  padding-top: calc(var(--mini-fullscreen-safe-top, calc(var(--mini-app-safe-top, env(safe-area-inset-top, 0px)) + 20px)) + 6px);
}

.mini-supplier-shell--subpage .mini-supplier-panel-title {
  margin-top: 0;
}

.mini-supplier-title {
  margin: 0 0 6px;
  color: #0f172a;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.mini-supplier-subtitle {
  margin: 0;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.45;
}

.mini-supplier-close-btn {
  border-radius: 12px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
}

.mini-supplier-scroll {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  /* место под таббар + выпирающую кнопку «+» (margin-top: -18px, высота 52px) */
  padding: 4px 16px calc(92px + env(safe-area-inset-bottom, 0px));
}

.mini-supplier-dashboard,
.mini-supplier-orders-list,
.mini-supplier-products-list,
.mini-supplier-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Аналитика на главной поставщика */
.mini-supplier-analytics {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 14px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.mini-supplier-analytics-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 14px 16px 10px;
  border-bottom: 1px solid #eef2f7;
}

.mini-supplier-analytics-period {
  font-size: 15px;
  font-weight: 800;
  color: #1d57e8;
  letter-spacing: -0.02em;
}

.mini-supplier-analytics-dyn-title {
  font-size: 14px;
  font-weight: 800;
  color: #16a34a;
}

.mini-supplier-analytics-rows {
  display: flex;
  flex-direction: column;
}

.mini-supplier-analytics-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto auto;
  gap: 10px 8px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid #eef2f7;
}

.mini-supplier-analytics-row:last-child {
  border-bottom: 0;
}

.mini-supplier-analytics-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: #1d57e8;
}

.mini-supplier-analytics-ico svg {
  width: 22px;
  height: 22px;
}

.mini-supplier-analytics-label {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.25;
}

.mini-supplier-analytics-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #1d57e8;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  max-width: 42vw;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-supplier-analytics-delta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.mini-supplier-analytics-delta--good {
  background: #dcfce7;
  color: #15803d;
}

.mini-supplier-analytics-delta--bad {
  background: #fee2e2;
  color: #b91c1c;
}

.mini-supplier-analytics-delta--neutral {
  background: #f1f5f9;
  color: #64748b;
}

.mini-supplier-analytics-foot {
  margin: 0;
  padding: 10px 16px 12px;
  text-align: center;
  font-size: 13px;
}

.mini-supplier-products-toolbar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 4px;
  background: #fff;
}

.mini-supplier-products-search-wrap {
  position: relative;
}

.mini-supplier-products-search-ico {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}

.mini-supplier-products-search-input {
  width: 100%;
  box-sizing: border-box;
  border: 1.5px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
  color: #0f172a;
  padding: 12px 12px 12px 40px;
  font-size: 14px;
  font-weight: 700;
}

.mini-supplier-products-search-input:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.mini-supplier-products-search-meta {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
}

.mini-supplier-products-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  background: #eef2f7;
  border-radius: 14px;
  padding: 4px;
}

.mini-supplier-products-filter-btn {
  padding: 9px 4px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mini-supplier-products-filter-btn.is-active {
  background: #fff;
  color: #0f172a;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.1);
}

.mini-supplier-products-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.mini-supplier-products-head .mini-supplier-panel-title {
  margin: 0;
  flex: 1;
  min-width: 0;
}

.mini-supplier-price-queue-launch {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #dbeafe;
  border-radius: 12px;
  background: #eff6ff;
  color: #2563eb;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mini-supplier-price-queue-launch svg {
  width: 20px;
  height: 20px;
}

.mini-supplier-price-queue-launch.is-active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.mini-supplier-price-queue-launch.has-resume {
  position: relative;
}

.mini-supplier-price-queue-launch.has-resume::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2563eb;
  box-shadow: 0 0 0 2px #eff6ff;
}

.mini-supplier-price-queue {
  padding: 0;
}

body.mini-supplier-price-queue-mode .mini-supplier-header,
body.mini-supplier-price-queue-mode .mini-supplier-products-head,
body.mini-supplier-price-queue-mode .mini-supplier-footer {
  display: none !important;
}

body.mini-supplier-price-queue-mode .mini-supplier-cabinet {
  height: 100%;
}

body.mini-supplier-price-queue-mode .mini-supplier-shell {
  height: 100%;
  max-height: 100%;
}

body.mini-supplier-price-queue-mode .mini-supplier-scroll {
  padding: 0;
  overflow: hidden;
}

body.mini-supplier-price-queue-mode [data-mini-supplier-panel="products"] {
  height: 100%;
  min-height: 0;
}

body.mini-supplier-price-queue-mode .mini-supplier-price-queue {
  height: var(--mini-pq-viewport-h, 100dvh);
  max-height: var(--mini-pq-viewport-h, 100dvh);
  box-sizing: border-box;
  padding-top: calc(var(--mini-fullscreen-safe-top, env(safe-area-inset-top, 0px)) + 4px);
}

.mini-supplier-pq-shell {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  padding: 0 12px calc(8px + env(safe-area-inset-bottom, 0px));
}

.mini-supplier-pq-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-height: 32px;
  padding: 0 4px;
}

.mini-supplier-pq-back {
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: none;
  background: transparent;
  color: #2563eb;
  font-size: 14px;
  font-weight: 700;
  padding: 2px 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mini-supplier-pq-back svg {
  width: 18px;
  height: 18px;
}

.mini-supplier-pq-head-text {
  text-align: center;
  padding: 0 72px;
}

.mini-supplier-pq-head-text strong {
  display: block;
  font-size: 17px;
  line-height: 1.2;
  color: #0f172a;
}

.mini-supplier-pq-progress-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 0 4px;
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
  flex-shrink: 0;
}

.mini-supplier-pq-progress-bar {
  height: 5px;
  margin: 0 4px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
  flex-shrink: 0;
}

.mini-supplier-pq-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #2563eb;
}

.mini-supplier-pq-form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 8px;
}

.mini-supplier-pq-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mini-supplier-pq-product-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid #e7eef8;
  background: #fff;
  box-shadow: 0 1px 6px rgba(15, 23, 42, 0.05);
  flex-shrink: 0;
}

body.mini-supplier-pq-keyboard-open .mini-supplier-pq-product-row {
  grid-template-columns: 44px minmax(0, 1fr);
  padding: 6px 8px;
}

.mini-supplier-pq-photo img,
.mini-supplier-pq-photo .mini-supplier-product-empty {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: contain;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: block;
}

body.mini-supplier-pq-keyboard-open .mini-supplier-pq-photo img,
body.mini-supplier-pq-keyboard-open .mini-supplier-pq-photo .mini-supplier-product-empty {
  width: 44px;
  height: 44px;
}

.mini-supplier-pq-product-text {
  min-width: 0;
  text-align: left;
}

.mini-supplier-pq-title {
  margin: 0;
  font-size: 15px;
  line-height: 1.25;
  color: #0f172a;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body.mini-supplier-pq-keyboard-open .mini-supplier-pq-title {
  font-size: 14px;
  -webkit-line-clamp: 1;
}

.mini-supplier-pq-meta {
  margin: 4px 0 0;
  font-size: 11px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body.mini-supplier-pq-keyboard-open .mini-supplier-pq-meta {
  display: none;
}

.mini-supplier-pq-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.mini-supplier-pq-field {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  cursor: text;
  -webkit-tap-highlight-color: transparent;
}

body.mini-supplier-pq-keyboard-open .mini-supplier-pq-field {
  grid-template-columns: 34px minmax(0, 1fr);
  padding: 6px 8px;
}

.mini-supplier-pq-field.is-active-field {
  border-color: #93c5fd;
  background: #f8fbff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.mini-supplier-pq-field-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #2563eb;
  background: #eff6ff;
}

body.mini-supplier-pq-keyboard-open .mini-supplier-pq-field-icon {
  width: 34px;
  height: 34px;
}

.mini-supplier-pq-field-icon svg {
  width: 20px;
  height: 20px;
}

.mini-supplier-pq-field-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.mini-supplier-pq-field-label {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
}

.mini-supplier-pq-field-hint {
  font-size: 10px;
  line-height: 1.25;
  font-weight: 600;
}

body.mini-supplier-pq-keyboard-open .mini-supplier-pq-field-hint {
  display: none;
}

.mini-supplier-pq-field-input-wrap {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.mini-supplier-pq-field-input-wrap input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 0;
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  outline: none;
}

body.mini-supplier-pq-keyboard-open .mini-supplier-pq-field-input-wrap input {
  font-size: 20px;
}

.mini-supplier-pq-field-suffix {
  font-size: 14px;
  font-weight: 700;
  color: #64748b;
  flex-shrink: 0;
}

.mini-supplier-pq-tap-btn {
  display: none;
  width: 100%;
  padding: 8px 12px;
  border: none;
  border-radius: 12px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.needs-keyboard-tap .mini-supplier-pq-tap-btn {
  display: block;
}

.needs-keyboard-tap .mini-supplier-pq-field.is-active-field {
  animation: mini-sp-queue-pulse 1.15s ease-in-out infinite;
}

@keyframes mini-sp-queue-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.22);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.14);
  }
}

.mini-supplier-pq-msg {
  margin: 0;
  min-height: 14px;
  font-size: 11px;
  text-align: center;
  flex-shrink: 0;
}

.mini-supplier-pq-footer {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 8px;
  flex-shrink: 0;
  padding-top: 4px;
  background: #f6f7fb;
}

.mini-supplier-pq-footer-btn {
  min-height: 46px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

body.mini-supplier-pq-keyboard-open .mini-supplier-pq-footer-btn {
  min-height: 42px;
  font-size: 13px;
}

.mini-supplier-pq-footer-btn.is-skip {
  border: 1.5px solid #dbeafe;
  background: #fff;
  color: #2563eb;
}

.mini-supplier-pq-footer-btn.is-next,
.mini-supplier-pq-footer-btn.is-save {
  border: none;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.24);
}

.mini-supplier-pq-footer-btn.is-next:disabled,
.mini-supplier-pq-footer-btn.is-save:disabled {
  opacity: 0.55;
  cursor: default;
}

.mini-supplier-pq-footer-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.mini-supplier-pq-done {
  padding: 20px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.mini-supplier-panel.hidden {
  display: none !important;
}

.mini-supplier-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-radius: 20px;
  background: linear-gradient(135deg, #fff 0%, #eff6ff 100%);
  border: 1px solid #dbeafe;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.08);
}

.mini-supplier-hero-card--assembly .mini-supplier-hero-main strong {
  color: #0f172a;
}

.mini-supplier-hero-card--assembly .mini-supplier-hero-main > span:not(.mini-supplier-kicker) {
  color: #334155;
}

.mini-supplier-hero-card--assembly .mini-supplier-hero-main small {
  color: #2563eb;
  font-size: 15px;
  font-weight: 800;
}

.mini-supplier-kicker {
  display: block;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.mini-supplier-hero-main strong {
  display: inline-block;
  margin: 6px 6px 4px 0;
  color: #2563eb;
  font-size: 38px;
  line-height: 1;
  font-weight: 900;
}

.mini-supplier-hero-main > span:not(.mini-supplier-kicker) {
  color: #2563eb;
  font-size: 15px;
  font-weight: 800;
}

.mini-supplier-hero-main small {
  display: block;
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}

.mini-supplier-ring {
  width: 96px;
  height: 96px;
  border-radius: 999px;
  background:
    radial-gradient(circle at center, #fff 0 58%, transparent 59%),
    conic-gradient(#22c55e calc(var(--value, 0) * 1%), #dbeafe 0);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.06);
}

.mini-supplier-ring span {
  color: #0f172a;
  font-size: 22px;
  line-height: 1;
  font-weight: 900;
}

.mini-supplier-ring small {
  margin-top: 3px;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.mini-supplier-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.mini-supplier-stat {
  min-width: 0;
  padding: 11px 8px;
  border-radius: 15px;
  background: #fff;
  text-align: center;
  box-shadow: 0 1px 6px rgba(15, 23, 42, 0.07);
  border-top: 3px solid #2563eb;
}

.mini-supplier-stat strong {
  display: block;
  font-size: 24px;
  line-height: 1;
  font-weight: 900;
}

.mini-supplier-stat span {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.mini-supplier-stat--blue strong { color: #2563eb; }
.mini-supplier-stat--green { border-top-color: #22c55e; }
.mini-supplier-stat--green strong { color: #16a34a; }
.mini-supplier-stat--orange { border-top-color: #f59e0b; }
.mini-supplier-stat--orange strong { color: #d97706; }

.mini-supplier-progress-card {
  padding: 13px 14px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 6px rgba(15, 23, 42, 0.07);
}

.mini-supplier-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: #0f172a;
  font-size: 13px;
}

.mini-supplier-progress-head span {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.mini-supplier-progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.mini-supplier-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #22c55e);
}

.mini-supplier-progress-card--assembly .mini-supplier-progress-track span {
  background: linear-gradient(90deg, #f59e0b, #22c55e);
}

.mini-supplier-assembly-breakdown {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.mini-supplier-assembly-breakdown span {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 8px 6px;
  border-radius: 12px;
  background: #f8fafc;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.mini-supplier-assembly-breakdown em {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  margin-bottom: 2px;
}

.mini-supplier-assembly-breakdown em.is-wait { background: #94a3b8; }
.mini-supplier-assembly-breakdown em.is-work { background: #f59e0b; }
.mini-supplier-assembly-breakdown em.is-done { background: #22c55e; }

.mini-supplier-assembly-breakdown strong {
  color: #0f172a;
  font-size: 18px;
  line-height: 1;
  font-weight: 900;
}

.mini-supplier-backlog-note {
  margin: 10px 0 0;
  padding: 8px 10px;
  border-radius: 12px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.mini-supplier-panel-title {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.mini-supplier-footer {
  position: relative;
  z-index: 30;
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 1fr 1fr auto 1fr 1fr;
  align-items: end;
  gap: 2px;
  padding: 6px 8px calc(8px + env(safe-area-inset-bottom, 0px));
  background: #fff;
  border-top: 1px solid #e8edf6;
  box-sizing: border-box;
  box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.06);
}

.mini-supplier-footer-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #64748b;
  padding: 6px 4px;
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.15;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mini-supplier-footer-btn__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.mini-supplier-footer-btn__img,
.mini-supplier-footer-btn__svg {
  display: block;
  width: 24px;
  height: 24px;
}

.mini-supplier-footer-btn__img--active,
.mini-supplier-footer-btn__svg--active {
  display: none;
}

.mini-supplier-footer-btn.is-active .mini-supplier-footer-btn__img--inactive,
.mini-supplier-footer-btn.is-active .mini-supplier-footer-btn__svg--inactive {
  display: none;
}

.mini-supplier-footer-btn.is-active .mini-supplier-footer-btn__img--active,
.mini-supplier-footer-btn.is-active .mini-supplier-footer-btn__svg--active {
  display: block;
}

.mini-supplier-footer-btn__label {
  display: block;
  max-width: 100%;
  text-align: center;
  word-break: break-word;
}

.mini-supplier-footer-btn.is-active {
  color: #2563eb;
}

.mini-supplier-footer-btn--add {
  align-self: center;
  padding: 0 6px 4px;
}

.mini-supplier-footer-btn__add {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-top: -18px;
  border-radius: 999px;
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
  font-size: 32px;
  font-weight: 300;
  line-height: 1;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.38);
}

.mini-supplier-footer-btn--add.is-active .mini-supplier-footer-btn__add {
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

.mini-supplier-home-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.mini-supplier-home-actions button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  border: 1px solid #e7eef8;
  border-radius: 16px;
  background: #fff;
  padding: 14px;
  text-align: left;
  box-shadow: 0 1px 6px rgba(15, 23, 42, 0.07);
}

.mini-supplier-home-actions strong {
  color: #0f172a;
  font-size: 15px;
  font-weight: 900;
}

.mini-supplier-home-actions span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.mini-supplier-order-card,
.mini-supplier-form {
  border: 1px solid #e7eef8;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.08);
}

/* Товары — белый фон, список на всю ширину, без разделителей между строками */
[data-mini-picker-panel="products"],
[data-mini-supplier-panel="products"] {
  gap: 0;
  background: #fff;
}

.mini-picker-scroll:has([data-mini-picker-panel="products"]:not(.hidden)),
.mini-supplier-scroll:has([data-mini-supplier-panel="products"]:not(.hidden)) {
  padding-left: 0;
  padding-right: 0;
  background: #fff;
}

.mini-picker-cabinet:has([data-mini-picker-panel="products"]:not(.hidden)),
.mini-supplier-cabinet:has([data-mini-supplier-panel="products"]:not(.hidden)) {
  background: #fff;
}

[data-mini-picker-panel="products"] .mini-picker-panel-title,
[data-mini-supplier-panel="products"] .mini-supplier-products-head,
[data-mini-picker-panel="products"] .mini-supplier-products-toolbar,
[data-mini-supplier-panel="products"] .mini-supplier-products-toolbar {
  padding-left: 16px;
  padding-right: 16px;
}

[data-mini-supplier-panel="products"] .mini-supplier-products-head .mini-supplier-panel-title {
  padding-left: 0;
  padding-right: 0;
}

[data-mini-supplier-panel="products"] .mini-supplier-products-filters {
  margin-top: 2px;
}

[data-mini-picker-panel="products"] .mini-supplier-products-list,
[data-mini-supplier-panel="products"] .mini-supplier-products-list {
  gap: 0;
  margin: 0;
  width: 100%;
  max-width: none;
  background: #fff;
}

[data-mini-picker-panel="products"]:not(.hidden) .mini-supplier-product-card,
[data-mini-supplier-panel="products"]:not(.hidden) .mini-supplier-product-card {
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
  content-visibility: auto;
  contain-intrinsic-size: auto 88px;
}

[data-mini-picker-panel="products"] .mini-supplier-product-card + .mini-supplier-product-card,
[data-mini-supplier-panel="products"] .mini-supplier-product-card + .mini-supplier-product-card {
  border-top: none;
}

[data-mini-picker-panel="products"] .mini-supplier-product-card.is-expanded,
[data-mini-supplier-panel="products"] .mini-supplier-product-card.is-expanded {
  background: #fff;
  box-shadow: none;
}

[data-mini-picker-panel="products"] .mini-supplier-product-toggle,
[data-mini-supplier-panel="products"] .mini-supplier-product-toggle {
  padding: 8px 16px;
}

[data-mini-picker-panel="products"] .mini-supplier-product-edit-wrap,
[data-mini-supplier-panel="products"] .mini-supplier-product-edit-wrap {
  padding: 0 16px 12px;
}

[data-mini-picker-panel="products"] .mini-supplier-products-list > .mcp-empty,
[data-mini-supplier-panel="products"] .mini-supplier-products-list > .mcp-empty {
  padding: 20px 16px;
}

[data-mini-picker-panel="products"] .mini-supplier-products-pager,
[data-mini-supplier-panel="products"] .mini-supplier-products-pager {
  margin: 0;
  width: 100%;
  max-width: none;
  padding-left: 16px;
  padding-right: 16px;
}

.mini-supplier-products-pager {
  margin: 0 -16px;
  width: calc(100% + 32px);
  max-width: 100vw;
  padding: 12px 12px 4px;
  background: #fff;
  border-top: 1px solid #eef2f7;
  box-sizing: border-box;
}

.mini-supplier-products-pager.hidden {
  display: none;
}

.mini-supplier-products-pager-btns {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
}

.mini-supplier-products-pager-nav {
  flex: 1;
  max-width: 120px;
  min-width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  color: #334155;
  font: inherit;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mini-supplier-products-pager-nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.mini-supplier-products-pager-meta {
  margin: 8px 0 0;
  text-align: center;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.mini-supplier-order-card {
  padding: 14px;
}

.mini-supplier-order-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.mini-supplier-order-top strong {
  display: block;
  color: #0f172a;
  font-size: 16px;
  font-weight: 900;
}

.mini-supplier-order-top p {
  margin: 4px 0 2px;
  color: #64748b;
  font-size: 13px;
}

.mini-supplier-order-top .muted {
  font-size: 12px;
}

.mini-supplier-order-badge {
  flex-shrink: 0;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--status-color, #eff6ff);
  color: var(--status-text-color, #2563eb);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.mini-supplier-order-badge[style*="--status-color"] {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.mini-supplier-order-lines {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
}

.mini-supplier-order-lines summary {
  list-style: none;
  cursor: pointer;
  color: #2563eb;
  font-size: 13px;
  font-weight: 900;
}

.mini-supplier-order-lines summary::-webkit-details-marker { display: none; }

.mini-supplier-order-lines ul {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 9px 0 0;
  padding: 0;
  list-style: none;
}

.mini-supplier-order-lines li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f8fafc;
  color: #0f172a;
  font-size: 12px;
}

.mini-supplier-order-lines li span {
  flex-shrink: 0;
  color: #64748b;
  font-weight: 800;
}

.mini-supplier-order-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 10px;
}

.mini-supplier-order-bottom select,
.mini-supplier-order-bottom button,
.mini-supplier-form input,
.mini-supplier-form select {
  min-width: 0;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 800;
}

.mini-supplier-order-bottom button {
  border: 0;
  background: #eff6ff;
  color: #2563eb;
  cursor: pointer;
}

.mini-supplier-product-card {
  padding: 0;
  overflow: hidden;
}

.mini-supplier-product-card.is-expanded {
  background: #fff;
}

.mini-supplier-product-toggle {
  display: block;
  width: 100%;
  margin: 0;
  padding: 12px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mini-supplier-product-top {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) auto 18px;
  gap: 10px 12px;
  align-items: center;
  width: 100%;
}

.mini-supplier-product-summary {
  display: block;
  min-width: 0;
}

.mini-supplier-product-card img,
.mini-supplier-product-empty {
  width: 70px;
  height: 70px;
  border-radius: 10px;
  background: transparent;
  object-fit: cover;
  border: none;
}

.mini-supplier-product-empty {
  background: transparent;
}

.mini-supplier-product-title {
  display: block;
  color: #0f172a;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  white-space: normal;
}

.mini-supplier-product-country {
  margin: 2px 0 4px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.25;
}

.mini-supplier-product-price-meta {
  display: block;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
}

.mini-supplier-product-chevron {
  color: #94a3b8;
  font-size: 14px;
  line-height: 1;
  justify-self: end;
}

.mini-supplier-product-card em {
  align-self: start;
  border-radius: 999px;
  padding: 5px 8px;
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
}

.mini-supplier-product-card em.is-active { background: #dcfce7; color: #16a34a; }
.mini-supplier-product-card em.is-draft { background: #fef3c7; color: #d97706; }
.mini-supplier-product-card em.is-off { background: #f1f5f9; color: #64748b; }

.mini-supplier-product-edit-wrap {
  padding: 0 12px 12px;
  border-top: 1px solid #f1f5f9;
  background: #f8fafc;
}

.mini-supplier-product-edit-wrap.hidden {
  display: none;
}

.mini-supplier-product-edit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  padding-top: 12px;
}

.mini-supplier-product-edit label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.mini-supplier-product-edit input[type="number"] {
  width: 100%;
  min-width: 0;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px;
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
}

.mini-supplier-toggle-row {
  grid-column: 1 / -1;
  flex-direction: row !important;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
}

.mini-supplier-toggle-row input {
  width: 20px;
  height: 20px;
}

.mini-supplier-product-edit button {
  grid-column: 1 / -1;
  border: 0;
  border-radius: 14px;
  background: #2563eb;
  color: #fff;
  padding: 12px;
  font-size: 14px;
  font-weight: 900;
}

.mini-supplier-product-msg {
  grid-column: 1 / -1;
  min-height: 16px;
  margin: 0;
  font-size: 12px;
}

.mini-supplier-form {
  display: flex;
  flex-direction: column;
  padding: 14px;
  gap: 12px;
}

.mini-supplier-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.mini-supplier-quick-volume-row,
.supplier-quick-volume-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.mini-supplier-quick-volume-row input,
.supplier-quick-volume-row input {
  min-width: 0;
}

.mini-supplier-quick-volume-row select,
.supplier-quick-volume-row select {
  min-width: 64px;
  padding: 10px 8px;
  border-radius: 12px;
  border: 1px solid #dbeafe;
  background: #fff;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

/* Скрытый input вне display:none — иначе iOS/Telegram не открывает камеру/файлы */
.mini-supplier-file-input-offscreen {
  position: fixed;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.mini-supplier-quick-photos {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mini-supplier-quick-photos-label {
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.mini-supplier-quick-photos-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mini-supplier-quick-photo-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 84px;
  border: 1.5px solid #dbe3ee;
  border-radius: 14px;
  background: #fff;
  color: #0f172a;
  padding: 12px 10px;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mini-supplier-quick-photo-btn__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: #2563eb;
}

.mini-supplier-quick-photo-btn__icon svg {
  display: block;
  width: 24px;
  height: 24px;
}

.mini-supplier-quick-photo-btn__label {
  line-height: 1.2;
  text-align: center;
}

.mini-supplier-quick-photo-btn:active {
  background: #f1f5f9;
}

.mini-supplier-quick-images-meta {
  margin: 0;
  font-size: 12px;
}

.mini-supplier-quick-images-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-supplier-quick-images-thumb {
  position: relative;
  margin: 0;
  width: 72px;
  height: 72px;
  border-radius: 12px;
  overflow: hidden;
  background: #e2e8f0;
}

.mini-supplier-quick-images-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mini-supplier-quick-images-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.mini-supplier-primary-btn {
  border: 0;
  border-radius: 16px;
  background: #2563eb;
  color: #fff;
  padding: 14px;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
  cursor: pointer;
}

.mini-supplier-revenue-toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 2;
  padding-bottom: 4px;
  background: #f6f7fb;
}

.mini-supplier-revenue-period-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mini-supplier-revenue-period-label {
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.mini-supplier-revenue-periods {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  background: #e4ebf5;
  border-radius: 14px;
  padding: 4px;
}

.mini-supplier-revenue-period-btn {
  padding: 10px 4px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #64748b;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mini-supplier-revenue-period-btn.is-active {
  background: #fff;
  color: #0f172a;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.1);
}

.mini-supplier-revenue-date-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.mini-supplier-revenue-date-row span {
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.mini-supplier-revenue-date-row input {
  width: 100%;
  min-width: 0;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 700;
}

.mini-supplier-revenue-result {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mini-supplier-revenue-card {
  padding: 16px;
  border: 1px solid #dbeafe;
  border-radius: 20px;
  background: linear-gradient(135deg, #fff 0%, #eff6ff 100%);
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.08);
}

.mini-supplier-revenue-card strong {
  display: block;
  margin-top: 6px;
  color: #2563eb;
  font-size: 32px;
  line-height: 1;
  font-weight: 900;
}

.mini-supplier-revenue-card small {
  display: block;
  margin-top: 6px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.mini-supplier-revenue-statuses {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mini-supplier-revenue-status {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  padding: 12px;
  border-radius: 15px;
  background: var(--status-color, #fff);
  color: var(--status-text-color, #0f172a);
  border: 1px solid #e7eef8;
  box-shadow: 0 1px 6px rgba(15, 23, 42, 0.07);
}

.mini-supplier-revenue-status[style*="--status-color"] {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

.mini-supplier-revenue-status span {
  font-size: 13px;
  font-weight: 900;
}

.mini-supplier-revenue-status strong {
  font-size: 14px;
  font-weight: 900;
}

.mini-supplier-revenue-status small {
  grid-column: 1 / -1;
  opacity: 0.82;
  font-size: 12px;
  font-weight: 700;
}

/* ══ Профиль управляющего (клуб) — макет 1:1 ══ */
body.mini-club-scope [data-mini-section="profile"] {
  background: #f8f9fb;
  margin: 0 -12px;
  padding: 0 12px 88px;
}

body.mini-club-scope .mini-profile-client-only {
  display: none !important;
}

body.mini-club-scope .mini-profile-header-actions--client,
body.mini-club-scope #mini-inv-code-card {
  display: none !important;
}

.mini-profile-header-actions--mgr {
  gap: 4px;
}

.mgr-profile-head-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 52px;
  padding: 4px 6px;
  border: none;
  background: transparent;
  color: #1a1c21;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mgr-profile-head-btn__ico {
  position: relative;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #334155;
}

.mgr-profile-head-btn__label {
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
  line-height: 1.1;
}

.mgr-profile-notif-badge {
  position: absolute;
  top: -2px;
  right: -6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #7b61ff;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  pointer-events: none;
}

.mgr-profile-notif-badge.hidden {
  display: none;
}

.mgr-club-profile-card--v2 {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 2px 16px rgba(15, 23, 42, 0.06);
  padding: 16px;
  border: 1px solid rgba(15, 23, 42, 0.04);
}

.mgr-club-top {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: start;
  gap: 12px;
  margin-bottom: 14px;
}

.mgr-club-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0ebff;
  color: #7b61ff;
}

.mgr-club-meta {
  min-width: 0;
}

.mgr-club-eyebrow {
  display: block;
  font-size: 12px;
  color: #8a8e9b;
  margin-bottom: 2px;
}

.mgr-club-name {
  display: block;
  font-size: 17px;
  font-weight: 800;
  color: #1a1c21;
  letter-spacing: -0.02em;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mgr-club-name:empty::before {
  content: "Загрузка…";
  color: #94a3b8;
  font-weight: 500;
}

.mgr-club-address {
  display: block;
  font-size: 13px;
  color: #8a8e9b;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mgr-change-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1.5px solid #e8ecf4;
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: inherit;
}

.mgr-change-btn:active {
  background: #f8fafc;
}

.mgr-club-codes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.mgr-club-code-label {
  display: block;
  font-size: 11px;
  color: #8a8e9b;
  margin-bottom: 6px;
  line-height: 1.2;
}

.mgr-club-code-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: #f3f0ff;
  border-radius: 12px;
  padding: 10px 10px;
  min-height: 44px;
}

.mgr-club-code-value {
  font-size: 15px;
  font-weight: 800;
  color: #7b61ff;
  letter-spacing: 0.04em;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mgr-club-code-copy {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #7b61ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.mgr-club-code-copy:active {
  background: rgba(123, 97, 255, 0.12);
}

.mgr-club-settings-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 0 0;
  border: none;
  border-top: 1px solid #f0f2f6;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}

.mgr-club-settings-hint__ico {
  flex-shrink: 0;
  color: #94a3b8;
  display: inline-flex;
}

.mgr-club-settings-hint__text {
  flex: 1;
  font-size: 12px;
  color: #8a8e9b;
  line-height: 1.3;
}

.mgr-club-settings-hint__chev {
  flex-shrink: 0;
  color: #cbd5e1;
}

.mgr-settings-row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 2px 8px;
  width: 100%;
  padding: 12px 0;
  border: none;
  border-bottom: 1px solid #f0f2f6;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  align-items: center;
}

.mgr-settings-row:last-child {
  border-bottom: none;
}

.mgr-settings-row__title {
  grid-column: 1;
  font-size: 15px;
  font-weight: 600;
  color: #1a1c21;
}

.mgr-settings-row__sub {
  grid-column: 1;
  font-size: 12px;
}

.mgr-settings-row > svg {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.mgr-settings-row .mgr-support-unread-badge {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  margin-right: 22px;
}

body.mini-club-scope #mini-profile-jump-orders .mini-profile-menu-ico {
  background: #1a1c21;
  color: #fff;
}

body.mini-club-scope #mini-open-unsold-dialog .mini-profile-menu-right--unsold {
  font-size: 0;
}

body.mini-club-scope #mini-open-unsold-dialog .mini-profile-menu-right--unsold::after {
  content: "В каталог ›";
  font-size: 13px;
  font-weight: 600;
  color: #1d57e8;
}

body.mini-has-mgr-footer-nav .footer-nav,
body.mini-has-starter-nav .footer-nav {
  gap: 2px;
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
}

body.mini-has-mgr-footer-nav .footer-nav-btn,
body.mini-has-starter-nav .footer-nav-btn {
  flex-direction: column;
  gap: 0;
  padding: 6px 2px;
  border-radius: 12px;
  height: 48px;
  min-height: 0;
}

body.mini-has-mgr-footer-nav .footer-nav-btn.active,
body.mini-has-starter-nav .footer-nav-btn.active {
  background: #ede9fe;
}

body.mini-has-mgr-footer-nav .footer-nav-btn.active .footer-nav-btn__svg,
body.mini-has-starter-nav .footer-nav-btn.active .footer-nav-btn__svg {
  color: #7b61ff;
}

body.mini-has-mgr-footer-nav #mini-nav-mgr-cart.active .footer-nav-btn__svg--inactive {
  display: none;
}

body.mini-has-mgr-footer-nav #mini-nav-mgr-cart.active .footer-nav-btn__svg--active {
  display: block;
}

.mini-footer-cart-badge {
  position: absolute;
  top: -3px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #7b61ff;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  pointer-events: none;
}

.mini-footer-cart-badge.hidden {
  display: none;
}

/* ── Настройки клуба (полноэкран) ── */
body.mini-club-settings-open {
  overflow: hidden;
}

body.mini-club-settings-open #mgr-club-settings-section {
  display: flex !important;
}

.mgr-club-settings-screen {
  position: fixed;
  inset: 0;
  bottom: calc(52px + env(safe-area-inset-bottom, 0px));
  z-index: 310;
  background: #f8f9fb;
  flex-direction: column;
  overflow: hidden;
}

.mgr-club-settings-screen.hidden {
  display: none !important;
}

.mgr-club-settings-head {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  padding: 8px 8px 10px;
  background: #f8f9fb;
  flex-shrink: 0;
}

.mgr-club-settings-back {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: #1a1c21;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 10px;
  padding: 0;
}

.mgr-club-settings-back:active {
  background: rgba(15, 23, 42, 0.06);
}

.mgr-club-settings-title {
  margin: 0;
  text-align: center;
  font-size: 17px;
  font-weight: 800;
  color: #1a1c21;
  letter-spacing: -0.02em;
}

.mgr-club-settings-head-spacer {
  width: 40px;
}

.mgr-club-settings-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 16px 20px;
}

.mgr-club-settings-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 2px 16px rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.04);
  padding: 16px;
  margin-bottom: 14px;
}

.mgr-club-settings-preview {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  align-items: start;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f0f2f6;
}

.mgr-club-settings-preview-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0ebff;
  color: #7b61ff;
}

.mgr-club-settings-preview-name {
  display: block;
  font-size: 17px;
  font-weight: 800;
  color: #1a1c21;
  line-height: 1.2;
  margin-top: 2px;
}

.mgr-club-settings-preview-addr {
  display: block;
  font-size: 13px;
  color: #8a8e9b;
  margin-top: 2px;
}

.mgr-settings-field {
  margin-bottom: 14px;
}

.mgr-settings-label {
  display: block;
  font-size: 12px;
  color: #8a8e9b;
  margin-bottom: 6px;
}

.mgr-settings-input-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mgr-settings-input-row--icon .mgr-settings-input-ico {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #7b61ff;
  display: inline-flex;
  pointer-events: none;
  z-index: 1;
}

.mgr-settings-input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 52px 0 14px;
  border: 1.5px solid #e8ecf4;
  border-radius: 14px;
  background: #fff;
  font-size: 15px;
  font-weight: 600;
  color: #1a1c21;
  font-family: inherit;
  box-sizing: border-box;
}

.mgr-settings-input--pad-ico {
  padding-left: 40px;
}

.mgr-settings-input:focus {
  outline: none;
  border-color: #c4b5fd;
  box-shadow: 0 0 0 3px rgba(123, 97, 255, 0.12);
}

.mgr-settings-counter {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  font-weight: 600;
  color: #b0b4c0;
  pointer-events: none;
  white-space: nowrap;
}

.mgr-settings-email-clear {
  position: absolute;
  right: 48px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 999px;
  background: #eef0f4;
  color: #64748b;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.mgr-settings-email-clear.hidden {
  display: none;
}

.mgr-settings-card-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 4px 0 0;
  font-size: 12px;
  color: #8a8e9b;
  line-height: 1.35;
}

.mgr-settings-card-note__ico {
  flex-shrink: 0;
  color: #94a3b8;
  margin-top: 1px;
}

.mgr-settings-save-btn {
  width: 100%;
  min-height: 52px;
  border: none;
  border-radius: 16px;
  background: #7b61ff;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(123, 97, 255, 0.35);
  margin-bottom: 10px;
}

.mgr-settings-save-btn:disabled {
  opacity: 0.65;
}

.mgr-settings-save-btn:active:not(:disabled) {
  transform: scale(0.99);
}

.mgr-settings-err {
  text-align: center;
  margin-bottom: 8px;
}

.mgr-settings-extra {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e8ecf4;
}

.mgr-settings-extra-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 0;
  border: none;
  border-bottom: 1px solid #f0f2f6;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.mgr-settings-extra-row:last-child {
  border-bottom: none;
}

/* Разделитель */
.mgr-divider { height: 1px; background: #f1f5f9; margin: 0 16px; }

/* Строка сотрудников */
.mgr-employees-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: none; border: none; cursor: pointer; width: 100%; text-align: left;
}
.mgr-employees-row:active { background: #f8fafc; }
.mgr-employees-ico {
  width: 42px; height: 42px; border-radius: 12px;
  background: #eff6ff; color: #2563eb;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.mgr-employees-text { flex: 1; }
.mgr-employees-title { display: block; font-size: 15px; font-weight: 600; color: #0f172a; }
.mgr-employees-sub { display: block; font-size: 12px; color: #64748b; margin-top: 2px; }

.mgr-support-unread-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mgr-support-unread-badge.hidden { display: none; }

.mgr-support-list {
  display: contents;
}
.mgr-support-ticket-row {
  width: 100%;
  text-align: left;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  background: #fff;
  cursor: pointer;
}
.mgr-support-ticket-row.has-unread { border-color: #93c5fd; background: #f8fbff; }
.mgr-support-ticket-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.mgr-support-unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2563eb;
  flex-shrink: 0;
}
.mgr-support-ticket-preview { margin: 6px 0 0; font-size: 12px; }
.mgr-support-form label { display: block; margin: 10px 0 4px; font-weight: 600; }
.mgr-support-form input,
.mgr-support-form textarea {
  width: 100%;
  box-sizing: border-box;
}
.mgr-support-thread-messages {
  max-height: 40vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}
.mgr-support-msg {
  border-radius: 12px;
  padding: 10px 12px;
  max-width: 92%;
}
.mgr-support-msg--mine {
  align-self: flex-end;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}
.mgr-support-msg--support {
  align-self: flex-start;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.mgr-support-msg-head { font-size: 11px; margin-bottom: 4px; }
.mgr-support-msg-body { font-size: 14px; line-height: 1.45; white-space: pre-wrap; }
.mgr-support-back { margin-bottom: 8px; }

.admin-support-unread-badge {
  display: inline-flex;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 6px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  vertical-align: middle;
  align-items: center;
  justify-content: center;
}
.admin-support-unread-badge.hidden { display: none; }
.admin-support-unread-badge--rail {
  position: absolute;
  top: 6px;
  right: 8px;
  margin-left: 0;
}
.admin-nav2-rail-btn {
  position: relative;
}

.admin-support-layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: 16px;
  align-items: start;
}
@media (max-width: 900px) {
  .admin-support-layout { grid-template-columns: 1fr; }
}
.admin-support-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.admin-support-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.admin-support-filter-btn {
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}
.admin-support-filter-btn.is-active {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}
.admin-support-ticket-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: calc(100vh - 220px);
  overflow: auto;
}
.admin-support-ticket-item {
  width: 100%;
  text-align: left;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  cursor: pointer;
}
.admin-support-ticket-item.is-active {
  border-color: #2563eb;
  background: #f8fbff;
}
.admin-support-ticket-item.has-unread { border-color: #f59e0b; }
.admin-support-ticket-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.admin-support-unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f59e0b;
  flex-shrink: 0;
  margin-top: 6px;
}
.admin-support-ticket-preview { margin: 6px 0 0; font-size: 12px; }
.admin-support-thread {
  min-height: 200px;
  max-height: calc(100vh - 320px);
  overflow: auto;
  margin: 12px 0;
}
.admin-support-messages { display: flex; flex-direction: column; gap: 10px; }
.admin-support-msg {
  border-radius: 10px;
  padding: 10px 12px;
  max-width: 85%;
}
.admin-support-msg--admin {
  align-self: flex-end;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}
.admin-support-msg--manager {
  align-self: flex-start;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.admin-support-msg-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  margin-bottom: 4px;
}
.admin-support-msg-body { font-size: 14px; line-height: 1.45; }
.admin-support-status-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.admin-support-status-pill--open { background: #dcfce7; color: #166534; }
.admin-support-status-pill--closed { background: #f1f5f9; color: #64748b; }
.admin-support-reply-form textarea { width: 100%; box-sizing: border-box; }

/* Диалог сотрудников: поле + кнопка в одну строку */
.mini-mgr-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.mini-mgr-add-input {
  width: 100%;
  min-width: 0;
  padding: 11px 13px; border-radius: 10px;
  border: 1.5px solid #e5e7eb; font-size: 15px; outline: none;
  box-sizing: border-box;
}
.mini-mgr-add-input:focus { border-color: #2563eb; }
.mini-mgr-add-btn {
  width: auto;
  padding: 11px 16px; border: none; border-radius: 10px;
  background: #2563eb; color: #fff;
  font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.mini-mgr-add-btn:active { opacity: .88; }

/* ══ Карточка клуба в профиле управляющего (старая, будет удалена) ══ */
.mini-manager-club-card { padding: 16px; }
.mini-mgr-club-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.mini-mgr-club-name { font-size: 16px; font-weight: 700; color: #111827; }
.mini-mgr-change-btn { background: none; border: 1px solid #e5e7eb; border-radius: 8px; padding: 5px 10px; font-size: 12px; color: #6b7280; cursor: pointer; }
.mini-mgr-code-row { display: flex; align-items: center; gap: 8px; background: #eff6ff; border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
.mini-mgr-code-label { font-size: 12px; color: #6b7280; }
.mini-mgr-club-code { font-size: 22px; font-weight: 900; color: #2563eb; letter-spacing: .06em; }
.mini-mgr-code-hint { font-size: 11px; color: #9ca3af; }
.mini-mgr-employees-head { font-size: 14px; font-weight: 700; color: #374151; margin-bottom: 8px; }
.mini-mgr-employees-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.mini-mgr-employee-row { display: flex; align-items: center; justify-content: space-between; background: #f9fafb; border-radius: 8px; padding: 8px 10px; font-size: 13px; }
.mini-mgr-access-row {
  background: #f9fafb;
  border: 1px solid #eef2f7;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.mini-mgr-access-row strong,
.mini-mgr-access-row span,
.mini-mgr-access-row small {
  display: block;
}
.mini-mgr-access-row strong { color: #0f172a; font-size: 14px; }
.mini-mgr-access-row span { color: #64748b; margin-top: 2px; }
.mini-mgr-access-row small { color: #94a3b8; line-height: 1.35; margin-top: 4px; }
.mini-mgr-access-revoke {
  color: #dc2626;
  border-color: #fecaca;
  background: #fff;
  white-space: nowrap;
}
.mini-mgr-access-revoke:disabled {
  opacity: .55;
  cursor: not-allowed;
}
.mini-mgr-del-btn { color: #ef4444; font-size: 14px; }
.mini-mgr-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.mini-mgr-add-input {
  width: 100%;
  min-width: 0;
  padding: 11px 13px; border-radius: 10px;
  border: 1.5px solid #e5e7eb; font-size: 15px; outline: none;
  box-sizing: border-box;
}
.mini-mgr-add-input:focus { border-color: #2563eb; }
.mini-mgr-add-btn {
  width: auto;
  min-width: 116px;
  padding: 11px 16px; border: none; border-radius: 10px;
  background: #2563eb; color: #fff; font-size: 14px; font-weight: 600; cursor: pointer;
  white-space: nowrap;
}

/* Сотрудник: скрываем навигацию и стандартный контент */
.employee-nav-hidden { display: none !important; }
body.employee-mode main.app,
body.employee-mode .footer-nav,
body.employee-mode #mini-cart-panel,
body.employee-mode #mini-cart-backdrop {
  display: none !important;
}

/* В режиме сотрудника visinv-dialog — главный экран приложения */
body.employee-mode dialog.visinv-dialog::backdrop { background: transparent; }

body.employee-mode .visinv-dialog[open],
body.employee-mode .employee-visinv[open] {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: 100%;
  height: 100dvh;
  height: 100svh;
  max-height: 100dvh;
  max-height: 100svh;
  margin: 0;
  z-index: 1200;
}

body.employee-mode .visinv-head {
  padding-top: calc(var(--visinv-safe-top, 0px) + env(safe-area-inset-top, 0px) + 10px);
}
.visinv-employee-add-inline {
  width: 100%;
  border: 1px dashed #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
  border-radius: 14px;
  padding: 11px 14px;
  font-size: 14px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.visinv-employee-add-inline span {
  display: inline-flex;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #dbeafe;
}
.visinv-employee-add-product[disabled],
.visinv-employee-add-inline[disabled] {
  opacity: .65;
  pointer-events: none;
}

.mini-profile-logout-btn {
  flex-shrink: 0;
  box-sizing: border-box;
  width: auto;
  max-width: 100%;
  height: 38px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1.5px solid #d1dae8;
  background: #fff;
  color: #334155;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mini-profile-title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.mini-profile-lead {
  margin: 2px 0 0;
  font-size: 13px;
  color: #64748b;
}

.mini-profile-settings-btn {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid #d9e2f3;
  background: #fff;
  color: #425b8f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.mini-profile-settings-btn svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mini-profile-settings-btn:hover {
  border-color: #bfd0ee;
  color: #2f4f86;
}

.mini-profile-settings-btn:focus-visible {
  outline: 2px solid #9ec5ff;
  outline-offset: 2px;
}

.mini-profile-dialog .mini-profile-save-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mini-profile-dialog {
  width: min(760px, 94vw);
  max-height: min(90vh, 860px);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0;
}

.mini-profile-dialog::backdrop {
  background: rgba(15, 23, 42, 0.4);
}

.mini-profile-dialog-head {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mini-profile-dialog-body {
  padding: 14px;
  overflow: auto;
  max-height: calc(90vh - 58px);
}

.mini-profile-card .mini-profile-block-title {
  margin: 0 0 12px;
  font-size: 17px;
}

.mini-profile-save-row {
  margin-top: 12px;
}

.mini-profile-msg {
  margin: 8px 0 0;
  min-height: 1.2em;
}

.mini-profile-edit-card .mini-profile-block-title {
  margin-bottom: 8px;
}

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

@media (max-width: 360px) {
  .mini-profile-stat-value {
    font-size: clamp(18px, 6vw, 24px);
  }

  .mini-profile-stat-tile {
    padding: 10px 8px;
  }
}

.mini-profile-stat-tile {
  padding: 12px 12px 10px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 2px;
  min-width: 0;
}

.mini-profile-stat-btn {
  width: 100%;
  cursor: pointer;
}

.mini-profile-stat-tile--blue {
  background: #eef5ff;
}

.mini-profile-stat-tile--green {
  background: #eefbf3;
}

.mini-profile-stat-tile--purple {
  background: #f5f1ff;
}

.mini-profile-stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.65);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin-bottom: 6px;
}

.mini-profile-stat-tile--blue .mini-profile-stat-icon {
  background: #dbeafe;
  color: #2563eb;
}

.mini-profile-stat-tile--green .mini-profile-stat-icon {
  background: #dcfce7;
  color: #16a34a;
}

.mini-profile-stat-tile--purple .mini-profile-stat-icon {
  background: #ede9fe;
  color: #7c3aed;
}

.mini-profile-stat-icon--sku {
  color: #7c3aed;
}

.mini-profile-stat-icon svg,
.mini-profile-orders-jump-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mini-profile-stat-value {
  font-size: 20px;
  font-weight: 800;
  color: #07142f;
  letter-spacing: -0.02em;
  line-height: 1.18;
  word-break: break-word;
}

.mini-profile-stat-label {
  font-size: 12px;
  font-weight: 600;
  color: #1d2f55;
  line-height: 1.3;
}

.mini-profile-stat-sub {
  font-size: 11px;
  font-weight: 500;
  color: #496189;
  line-height: 1.2;
  text-transform: none;
}

/* Меню профиля — единая карточка */
.mini-profile-menu-card {
  background: #fff;
  border-radius: 18px;
  border: 1px solid #e8eef6;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
}

.mini-profile-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 14px;
  text-align: left;
  background: transparent;
  border: none;
  border-top: 1px solid #f0f4fa;
  font: inherit;
  cursor: pointer;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.12s ease;
}

.mini-profile-menu-item:first-child {
  border-top: none;
}

.mini-profile-menu-item:active {
  background: #f7f9fc;
}

.mini-profile-menu-ico {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mini-profile-menu-ico svg {
  width: 20px;
  height: 20px;
}

.mini-profile-menu-ico--blue   { background: #e8f0fe; color: #1d57e8; }
.mini-profile-menu-ico--red    { background: #fde8e8; color: #e53935; }
.mini-profile-menu-ico--gray   { background: #f1f5f9; color: #64748b; }
.mini-profile-menu-ico--purple { background: #f0ebff; color: #7c3aed; }
.mini-profile-menu-ico--green  { background: #e6f9ee; color: #16a34a; }

.mini-profile-menu-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mini-profile-menu-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}

.mini-profile-menu-meta {
  font-size: 12px;
  color: #64748b;
  line-height: 1.25;
}

.mini-profile-menu-right {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
  color: #1d57e8;
  white-space: nowrap;
}

/* Legacy (старые кнопки-прыжки, используются в диалогах SKU-списка и т.д.) */
.mini-profile-orders-jump {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 12px;
  text-align: left;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.mini-profile-orders-jump:hover {
  border-color: #c9d7ef;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.mini-profile-orders-jump-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.mini-profile-orders-jump-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: #eef5ff;
  color: #2360c6;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.mini-profile-orders-jump-title {
  display: block;
  font-weight: 700;
  font-size: 14px;
  color: #0f172a;
  line-height: 1.2;
}

.mini-profile-orders-jump-meta {
  display: block;
  margin-top: 1px;
  font-size: 12px;
  line-height: 1.25;
}

.mini-profile-orders-jump-right {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 700;
  color: #0f62ff;
  white-space: nowrap;
}

.mini-profile-addresses-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.mini-profile-hint {
  margin: 0 0 12px;
  font-size: 13px;
}

.mini-profile-unsold-card {
  padding: 12px;
}

.mini-profile-unsold-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.mini-profile-unsold-head .mini-profile-block-title {
  margin: 0;
  font-size: 15px;
}

.mini-profile-unsold-note {
  font-size: 12px;
  white-space: nowrap;
}

.mini-profile-unsold-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mini-profile-unsold-item {
  width: 100%;
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 12px;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  text-align: left;
  cursor: pointer;
}

.mini-profile-unsold-item-thumb {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  background: #f1f5f9;
}

.mini-profile-unsold-item-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
  margin: 0;
}

.mini-profile-unsold-item-meta {
  font-size: 11px;
  color: #64748b;
}

.mini-profile-unsold-item-price {
  font-size: 14px;
  font-weight: 700;
  color: #0f62ff;
  white-space: nowrap;
}

/* ── «Вы еще не заказывали» — новый дизайн ────────── */
.mini-unsold2-screen {
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  background: #f0f4fb !important;
}

.mini-unsold2-head { background: #f0f4fb; flex-shrink: 0; }

.mini-unsold2-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding: 10px 12px calc(16px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-sizing: border-box;
}

.mini-unsold2-tip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  padding: 12px 14px;
}

.mini-unsold2-tip-ico {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  font-style: italic;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.mini-unsold2-tip p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: #1e3a5f;
}

.mini-unsold2-tip strong { color: #1d57e8; font-weight: 600; }

/* Поиск */
.mini-unsold2-search-row { display: flex; gap: 8px; align-items: center; }
.mini-unsold2-search-wrap { position: relative; flex: 1 1 auto; min-width: 0; }
.mini-unsold2-search-ico {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: #94a3b8; pointer-events: none;
}
.mini-unsold2-search-input {
  width: 100%; height: 42px; border-radius: 14px; border: 1.5px solid #e2e8f0;
  background: #fff; padding: 0 12px 0 34px; font: inherit; font-size: 14px;
  color: #0f172a; box-sizing: border-box; outline: none;
}
.mini-unsold2-search-input:focus { border-color: #93c5fd; }

/* Пиллы */
.mini-unsold2-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.mini-unsold2-pills::-webkit-scrollbar { display: none; }

.mini-unsold2-pill {
  flex-shrink: 0;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  width: auto;
}

.mini-unsold2-pill.is-active {
  background: #1d57e8;
  border-color: #1d57e8;
  color: #fff;
}

/* Мета-строка */
.mini-unsold2-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mini-unsold2-count {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.mini-unsold2-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #1d57e8;
  cursor: pointer;
  padding: 0;
  width: auto;
  -webkit-tap-highlight-color: transparent;
}

/* Сетка товаров */
.mini-unsold2-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mini-unsold2-msg {
  text-align: center;
  padding: 20px 0;
}

/* Карточка товара */
.mini-unsold2-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 4px rgba(15,23,42,0.07);
}

.mini-unsold2-img-btn {
  background: none;
  border: none;
  padding: 0;
  display: block;
  cursor: pointer;
  width: auto;
  line-height: 0;
  -webkit-tap-highlight-color: transparent;
}

.mini-unsold2-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: #f8fafc;
}

.mini-unsold2-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.mini-unsold2-img--empty {
  width: 100%;
  height: 100%;
  background: #f1f5f9;
}

.mini-unsold2-overlay {
  position: absolute;
  inset: 0;
  padding: 6px;
  pointer-events: none;
}

.mini-unsold2-overlay-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 4px;
}

.mini-unsold2-overlay .mini-product-country-tag {
  flex-shrink: 0;
}

.mini-unsold2-fav {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: none;
  background: rgba(255,255,255,0.9);
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  pointer-events: auto;
  width: auto;
  -webkit-tap-highlight-color: transparent;
}

.mini-unsold2-fav svg { width: 16px; height: 16px; }
.mini-unsold2-fav.is-on { color: #ef4444; }

.mini-unsold2-body {
  padding: 8px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1 1 auto;
}

.mini-unsold2-country {
  font-size: 11px;
  line-height: 1.25;
}

.mini-unsold2-name-btn {
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
  min-height: 2.6em;
  max-height: 2.6em;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  width: auto;
  -webkit-tap-highlight-color: transparent;
}

.mini-unsold2-vol { font-size: 12px; display: block; }

.mini-unsold2-price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.mini-unsold2-price {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
}

.mini-unsold2-from {
  font-size: 11px;
  color: #64748b;
  white-space: nowrap;
}

.mini-unsold2-btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.mini-unsold2-add-btn {
  flex: 1 1 auto;
  min-width: 0;
  padding: 7px 8px;
  border-radius: 10px;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  width: auto;
}

.mini-unsold2-add-btn span {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #1d57e8;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.mini-unsold2-add-btn.is-in-cart {
  background: #e8f0fe;
  border-color: #1d57e8;
  color: #1d57e8;
}

.mini-unsold2-add-btn.is-in-cart span {
  background: #1d57e8;
}

/* Корзина в шапке диалога */
.mini-dialog-cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px 6px 8px;
  border-radius: 12px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  width: auto;
  transition: background 0.12s ease, color 0.12s ease;
}

.mini-dialog-cart-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.mini-dialog-cart-btn--active {
  background: #1d57e8;
  border-color: #1d57e8;
  color: #fff;
}

.mini-unsold-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.mini-unsold-add-btn {
  min-width: 44px;
  height: 30px;
  border-radius: 8px;
  padding: 0 8px;
  border: 1px solid #dbeafe;
  background: #eff6ff;
  color: #0f62ff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mini-unsold-cart-overview {
  width: 100%;
  margin: 8px 0 2px;
}

.mini-unsold-head-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mini-unsold-head-text strong {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.mini-unsold-head-text .muted {
  font-size: 12px;
}

.mini-profile-addresses-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mini-profile-addresses-list.mini-sku-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

/* ── Адреса доставки — новый дизайн ──────────────── */
.mini-addr-screen {
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  background: #f0f4fb !important;
}

.mini-addr-head {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: calc(22px + var(--mini-app-safe-top, 0px)) 14px 10px;
  background: #f0f4fb;
  flex-shrink: 0;
}

.mini-addr-head-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.mini-addr-head-text strong {
  font-size: 17px;
  font-weight: 800;
  color: #0b1220;
  letter-spacing: -0.02em;
}

.mini-addr-head-text .muted {
  font-size: 12px;
}

.mini-addr-add-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: #1d57e8;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
  width: auto;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.mini-addr-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding: 10px 12px calc(20px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-sizing: border-box;
}

/* Карточка адреса */
.mini-address-card2 {
  background: #fff;
  border: 2px solid #e5eef9;
  border-radius: 18px;
  padding: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.mini-address-card2.is-selected {
  border-color: #1d57e8;
}

.mini-addr-radio-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  width: auto;
  -webkit-tap-highlight-color: transparent;
  margin-top: 2px;
}

.mini-addr-radio {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 2px solid #cbd5e1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mini-addr-radio--on {
  background: #1d57e8;
  border-color: #1d57e8;
  color: #fff;
}

.mini-addr-radio--on svg {
  width: 14px;
  height: 14px;
}

.mini-addr-card-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mini-addr-card-row1 {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mini-addr-card-name {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  flex: 1 1 auto;
  min-width: 0;
}

.mini-addr-primary-badge {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  background: #e8f0fe;
  color: #1d57e8;
}

.mini-addr-card-menu {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  color: #64748b;
  font-size: 20px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  width: auto;
  -webkit-tap-highlight-color: transparent;
}

.mini-addr-card-line {
  font-size: 14px;
  color: #334155;
  margin: 0;
  line-height: 1.4;
}

.mini-addr-card-row2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mini-addr-card-note {
  font-size: 12px;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-addr-card-id {
  font-size: 12px;
  font-weight: 500;
  flex-shrink: 0;
}

/* Подсказка */
.mini-addr-tip {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  padding: 12px 14px;
}

.mini-addr-tip-ico {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #1d57e8;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mini-addr-tip-ico svg {
  width: 18px;
  height: 18px;
}

.mini-addr-tip p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: #1e3a5f;
}

/* Большая кнопка внизу */
.mini-addr-footer {
  margin-top: auto;
  padding-top: 4px;
}

.mini-addr-big-btn {
  width: 100%;
  padding: 16px;
  border-radius: 18px;
  border: none;
  background: #1d57e8;
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 8px 20px rgba(29,87,232,0.35);
}

.mini-addr-big-btn:active { opacity: 0.85; }

.mini-addresses-fullscreen {
  width: 100vw;
  max-width: 100vw;
  min-height: 100dvh;
  margin: 0;
  border: none;
  border-radius: 0;
  padding: 0;
  background: #ffffff;
}

.mini-addresses-fullscreen::backdrop {
  background: rgba(15, 23, 42, 0.26);
}

.mini-addresses-screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 14px calc(112px + env(safe-area-inset-bottom, 0px));
  background: #fff;
  position: relative;
}

.mini-addresses-close-btn {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top, 0px));
  right: 14px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #94a3b8;
  font-size: 28px;
  line-height: 1;
  padding: 0;
}

.mini-addresses-title {
  margin: 20px 44px 4px 0;
  font-size: 44px;
  line-height: 1.02;
  letter-spacing: -0.02em;
  font-weight: 800;
  color: #0f172a;
}

.mini-addresses-list {
  padding-bottom: 6px;
}

.mini-address-card {
  border-radius: 24px;
  border: 2px solid #e5eef9;
  padding: 18px 18px 16px;
  background: #fff;
}

.mini-address-card.is-selected {
  border-color: #0f62ff;
}

.mini-address-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: start;
  gap: 10px;
  margin-bottom: 8px;
}

.mini-address-card-title {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
  font-weight: 800;
  color: #0f172a;
}

.mini-address-card-id {
  font-size: 18px;
  color: #0f172a;
  font-weight: 700;
  white-space: nowrap;
}

.mini-address-card-menu {
  width: 32px;
  min-width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 30px;
  line-height: 1;
  padding: 0;
}

.mini-address-card-line {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
  color: #0f172a;
}

.mini-address-card-note {
  margin: 4px 0 0;
  font-size: 18px;
  line-height: 1.35;
  color: #64748b;
}

.mini-addresses-add-wrap {
  position: sticky;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  margin-top: auto;
}

.mini-addresses-add-btn {
  border: 0;
  border-radius: 18px;
  background: #f0f7ff;
  color: #0f62ff;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.mini-addresses-add-btn strong {
  font-size: 22px;
  line-height: 1.1;
}

.mini-addresses-add-btn span {
  font-size: 14px;
  line-height: 1.25;
}

.mini-address-form-screen {
  gap: 14px;
}

.mini-address-form-title {
  margin: 14px 44px 0 0;
  font-size: 34px;
  line-height: 1.05;
  font-weight: 800;
  color: #0f172a;
}

.mini-address-form-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mini-address-tag {
  width: auto;
  min-width: 0;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid #e6edf8;
  background: #f8fafc;
  color: #334155;
  font-size: 18px;
  font-weight: 600;
}

.mini-address-tag.is-active {
  background: #eaf3ff;
  border-color: #0f62ff;
  color: #0f62ff;
}

.mini-address-form-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #94a3b8;
}

.mini-address-input {
  border: 1px solid #e4ebf6;
  border-radius: 16px;
  background: #fff;
  color: #0f172a;
  padding: 14px 16px;
  font-size: 18px;
}

#mini-address-custom-label {
  display: none;
}

.mini-address-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mini-address-form-subtitle {
  margin: 2px 0 0;
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
}

.mini-address-save-btn {
  margin-top: auto;
  border: 0;
  border-radius: 18px;
  background: #0f62ff;
  color: #fff;
  font-size: 19px;
  font-weight: 700;
  padding: 14px 18px;
}

.mini-address-actions-dialog {
  border: 0;
  border-radius: 18px;
  padding: 0;
  width: min(92vw, 360px);
  background: transparent;
}

.mini-address-actions-dialog::backdrop {
  background: rgba(15, 23, 42, 0.34);
}

.mini-address-actions-card {
  background: #fff;
  border-radius: 18px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

.mini-address-action-btn {
  border: 0;
  border-bottom: 1px solid #eef2f7;
  border-radius: 0;
  background: #fff;
  color: #0f172a;
  font-size: 17px;
  font-weight: 600;
  padding: 14px 16px;
}

.mini-address-action-btn:last-child {
  border-bottom: 0;
}

.mini-address-action-btn--danger {
  color: #dc2626;
}

.mini-profile-orders-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mini-orders-fullscreen {
  width: 100vw;
  max-width: 100vw;
  min-height: 100dvh;
  margin: 0;
  border: none;
  border-radius: 0;
  padding: 0;
  background: #f8fafc;
}

.mini-orders-fullscreen::backdrop {
  background: rgba(15, 23, 42, 0.26);
}

.mini-orders-screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 0 0;
  box-sizing: border-box;
}

.mini-orders-screen .mini-orders-head,
.mini-orders-screen .mini-orders-filters,
.mini-orders-screen > .mini-profile-msg,
.mini-orders-screen .mini-orders-list-full {
  padding-left: 12px;
  padding-right: 12px;
  box-sizing: border-box;
}

.mini-orders-head {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 10px;
  align-items: center;
}

.mini-orders-back-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid #dbe3ef;
  background: #fff;
  color: #0f172a;
  font-size: 24px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.mini-orders-search-input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #dbe3ef;
  background: #fff;
  padding: 10px 12px;
}

.mini-orders-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 2px;
}

.mini-orders-filter-btn {
  width: auto;
  min-width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  border: 1px solid #d7deea;
  background: #fff;
  color: #334155;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
}

.mini-orders-filter-count {
  font-size: 11px;
  font-weight: 700;
  background: #e2e8f0;
  color: #475569;
  padding: 2px 6px;
  border-radius: 999px;
  min-width: 1.1rem;
  text-align: center;
  line-height: 1.2;
  flex-shrink: 0;
}

.mini-orders-filter-btn.active .mini-orders-filter-count {
  background: rgba(15, 23, 42, 0.14);
  color: inherit;
}

.mini-orders-filter-btn.active[data-mini-orders-filter="all"] {
  border-color: #bae6fd;
  color: #0369a1;
  background: #e0f2fe;
}

.mini-orders-filter-btn.active[data-mini-orders-filter="new"] {
  border-color: #bfdbfe;
  color: #1d4ed8;
  background: #dbeafe;
}

.mini-orders-filter-btn.active[data-mini-orders-filter="processing"] {
  border-color: #fde68a;
  color: #a16207;
  background: #fef3c7;
}

.mini-orders-filter-btn.active[data-mini-orders-filter="collected"] {
  border-color: #ddd6fe;
  color: #6d28d9;
  background: #ede9fe;
}

.mini-orders-filter-btn.active[data-mini-orders-filter="done"] {
  border-color: #bbf7d0;
  color: #166534;
  background: #dcfce7;
}

.mini-orders-filter-btn.active[data-mini-orders-filter="cancelled"] {
  border-color: #e2e8f0;
  color: #475569;
  background: #f1f5f9;
}

.mini-orders-list-full {
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;
  padding-bottom: 0;
}

.mini-orders-menu {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--border);
  background: #fff;
  border-radius: 0;
  margin-top: auto;
  overflow: hidden;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-sizing: border-box;
  width: 100%;
}

.mini-orders-menu > .footer-nav-btn {
  min-width: 0;
  justify-self: stretch;
}

.mini-order-list-card--full {
  text-align: left;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  color: #0f172a;
  padding: 12px;
}

.mini-order-list-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.mini-order-list-title-wrap {
  display: flex;
  gap: 10px;
}

.mini-order-list-id-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #eff6ff;
  color: #2563eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.mini-order-list-id-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.mini-order-list-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.mini-order-list-date {
  font-size: 12px;
}

.mini-order-status-pill {
  align-self: flex-start;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.mini-order-status-pill--new {
  background: #dbeafe;
  color: #1d4ed8;
}

.mini-order-status-pill--processing {
  background: #fef3c7;
  color: #a16207;
}

.mini-order-status-pill--collected {
  background: #ede9fe;
  color: #6d28d9;
}

.mini-order-status-pill--done {
  background: #dcfce7;
  color: #166534;
}

.mini-order-status-pill--cancelled {
  background: #f1f5f9;
  color: #475569;
}

.mini-order-status-pill--neutral {
  background: #e2e8f0;
  color: #334155;
}

.mini-order-list-bottom {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 8px;
  align-items: end;
}

.mini-order-list-metric-label {
  font-size: 11px;
  display: block;
}

.mini-order-list-metric-value {
  font-size: 13px;
  color: #0f172a;
  display: block;
  font-weight: 700;
}

.mini-order-list-arrow {
  font-size: 20px;
  color: #94a3b8;
}

.mini-address-card .mini-address-label-block,
.mini-address-card .mini-address-line-block,
.mini-address-card .mini-address-comment-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  margin-bottom: 10px;
}

.mini-address-phone-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 10px;
}

.mini-address-phone-row .mini-address-phone-label {
  flex: 1 1 200px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
}

.mini-address-phone-row .mini-address-fill-phone-btn {
  flex: 0 0 auto;
  margin-bottom: 2px;
}

.mini-address-remove {
  margin-top: 4px;
}

.mini-soon-card {
  padding: 24px;
  text-align: center;
}

.admin-top-thumb-cell {
  width: 56px;
  padding: 8px 6px 8px 0;
  vertical-align: middle;
}

.admin-top-thumb-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #f8fafc;
  display: block;
}

.admin-top-thumb-placeholder {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #f1f5f9;
  border: 1px dashed #e2e8f0;
}

.admin-top-table .admin-top-trend.is-up {
  color: #16a34a;
  font-weight: 700;
}

.admin-top-table .admin-top-trend.is-down {
  color: #dc2626;
  font-weight: 700;
}

.admin-top-table .admin-top-trend.is-neutral {
  color: #64748b;
}

/* ── Топ и рейтинг — новый дизайн ─────────────── */
[data-mini-section="top"] {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  box-sizing: border-box;
}

.mini-top2-screen {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 0 12px;
  box-sizing: border-box;
}

/* Шапка, период и статус — те же боковые поля, что у .container (--mini-side-pad) */
.mini-top2-topbar,
.mini-top2-periods,
.mini-top2-status {
  width: 100%;
  box-sizing: border-box;
  padding-left: var(--mini-side-pad);
  padding-right: var(--mini-side-pad);
}

/* Список — до краёв экрана: выходим из .container (94%) на величину --mini-side-pad */
.mini-top2-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex-shrink: 0;
  align-self: stretch;
  width: calc(100% + 2 * var(--mini-side-pad));
  max-width: 100vw;
  margin-left: calc(-1 * var(--mini-side-pad));
  margin-right: calc(-1 * var(--mini-side-pad));
  box-sizing: border-box;
  background: #fff;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
}

.mini-top2-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.mini-top2-topbar-left { flex: 1 1 auto; min-width: 0; }

.mini-top2-title {
  margin: 0 0 2px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.mini-top2-subtitle {
  margin: 0;
  font-size: 13px;
}

.mini-top2-cart-btn { flex-shrink: 0; }

/* Вкладки периода */
.mini-top2-periods {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  background: #e4ebf5;
  border-radius: 14px;
  padding: 4px;
}

.mini-top2-period-btn {
  padding: 8px 4px;
  border-radius: 10px;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  width: auto;
  text-align: center;
}

.mini-top2-period-btn.is-active,
.mini-top2-period-btn.active {
  background: #fff;
  color: #0f172a;
  box-shadow: 0 1px 4px rgba(15,23,42,0.10);
}

/* Фильтры (скрыты — в интерфейсе остаются период 1/7/14/30 и список) */
.mini-top2-filters {
  display: none;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}
.mini-top2-filters::-webkit-scrollbar { display: none; }

.mini-top2-filter-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  width: auto;
}

.mini-top2-filter-btn svg { width: 14px; height: 14px; flex-shrink: 0; }

.mini-top2-filter-btn.is-active,
.mini-top2-filter-btn.active {
  background: #1d57e8;
  border-color: #1d57e8;
  color: #fff;
}

/* Статистика (скрыта вместе с фильтрами) */
.mini-top2-stats {
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.mini-top2-stat {
  background: #fff;
  border-radius: 16px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(15,23,42,0.06);
}

.mini-top2-stat-ico { font-size: 20px; line-height: 1; }
.mini-top2-stat-label { font-size: 11px; color: #64748b; font-weight: 500; }
.mini-top2-stat-val { font-size: 26px; font-weight: 800; color: #0f172a; line-height: 1; }
.mini-top2-stat-sub { font-size: 11px; color: #94a3b8; }

.mini-top2-stat--up .mini-top2-stat-ico { color: #16a34a; }
.mini-top2-stat--up .mini-top2-stat-val { color: #16a34a; }
.mini-top2-stat--down .mini-top2-stat-ico { color: #dc2626; }
.mini-top2-stat--down .mini-top2-stat-val { color: #dc2626; }

.mini-top2-status { font-size: 13px; margin: 0; }
.mini-top2-empty { padding: 20px; text-align: center; }

/* Пока открыт «Топ» — не обрезать список по горизонтали у .container */
body.mini-app-page .container.app:has([data-mini-section="top"]:not(.hidden)) {
  overflow-x: visible;
}

/* Строка товара */
.mini-top2-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid #f0f4fa;
  box-sizing: border-box;
}

.mini-top2-item:first-child { border-top: none; }

/* Левая колонка: #N + дельта */
.mini-top2-left {
  flex-shrink: 0;
  width: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding-top: 2px;
}

.mini-top2-rank {
  font-size: 11px;
  font-weight: 800;
  color: #334155;
  line-height: 1.1;
}

.mini-top2-rank--top1 { color: #f59e0b; }
.mini-top2-rank--top2 { color: #94a3b8; }
.mini-top2-rank--top3 { color: #b45309; }

.mini-top2-rank-delta {
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
}

.mini-top2-rank-delta--up { color: #16a34a; }
.mini-top2-rank-delta--down { color: #dc2626; }
.mini-top2-rank-delta--flat { color: #94a3b8; }

/* Фото */
.mini-top2-img-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  width: auto;
  line-height: 0;
  -webkit-tap-highlight-color: transparent;
}

.mini-top2-img {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: contain;
  background: #f8fafc;
  display: block;
}

.mini-top2-img--empty {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: #f1f5f9;
  display: block;
}

/* Описание */
.mini-top2-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mini-top2-name {
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  width: auto;
  -webkit-tap-highlight-color: transparent;
}

.mini-top2-detail { font-size: 11px; display: block; color: #64748b; }

/* Бейджи */
.mini-top2-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  margin-top: 2px;
  width: fit-content;
}

.mini-top2-badge--hit    { background: #fff3cd; color: #b45309; }
.mini-top2-badge--up     { background: #dcfce7; color: #15803d; }
.mini-top2-badge--down   { background: #fee2e2; color: #b91c1c; }
.mini-top2-badge--new    { background: #ede9fe; color: #6d28d9; }
.mini-top2-badge--unsold { background: #f1f5f9; color: #64748b; }

/* Цена + кнопка шт/уп */
.mini-top2-cart-btns {
  flex: 0 0 84px;
  width: 84px;
  max-width: 84px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
  margin-top: 2px;
}

.mini-top2-sale-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
  justify-content: flex-start;
  width: 100%;
}

.mini-top2-sale-control {
  flex: none;
  width: 100%;
  display: flex;
  justify-content: center;
}

.mini-top2-sale-control .mini-top2-cart-btn,
.mini-top2-sale-control .mini-top2-stepper {
  width: 76px;
  min-width: 76px;
  max-width: 76px;
  box-sizing: border-box;
}

.mini-top2-unit-price {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
  line-height: 1.25;
  width: 100%;
  text-align: center;
  overflow: visible;
}

.mini-top2-cart-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 30px;
  padding: 0 6px;
  border-radius: 8px;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  color: #334155;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  width: auto;
}

.mini-top2-cart-btn span {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #1d57e8;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mini-top2-cart-btn--pack {
  background: #1d57e8;
  border-color: #1d57e8;
  color: #fff;
}

.mini-top2-cart-btn--pack span { background: rgba(255,255,255,0.25); color: #fff; }

.mini-top2-cart-btn.is-in-cart {
  background: #e8f0fe;
  border-color: #1d57e8;
  color: #1d57e8;
}

.mini-top2-cart-btn--pack.is-in-cart {
  background: #0b42c8;
  border-color: #0b42c8;
  color: #fff;
}

.mini-top2-stepper {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border-radius: 8px;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  overflow: hidden;
  flex-shrink: 0;
}

.mini-top2-stepper--pack {
  border-color: #1d57e8;
  background: #e8f0fe;
}

.mini-top2-step-btn {
  width: 24px;
  height: 30px;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  color: #1d57e8;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.mini-top2-step-btn:active {
  background: rgba(29, 87, 232, 0.12);
}

.mini-top2-step-qty {
  min-width: 24px;
  padding: 0 2px;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  color: #0f172a;
}

.mini-top2-stepper--pack .mini-top2-step-btn {
  color: #1d57e8;
}

.mini-top2-stepper--pack .mini-top2-step-qty {
  color: #0f172a;
}

/* Нижняя панель корзины */
.mini-top2-cart-bar {
  position: fixed;
  bottom: calc(60px + env(safe-area-inset-bottom, 0px));
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: #fff;
  border-top: 1px solid #e8eef6;
  box-shadow: 0 -4px 16px rgba(15,23,42,0.10);
  transition: transform 0.2s ease;
}

.mini-top2-cart-bar--empty {
  transform: translateY(120%);
}

.mini-top2-cart-bar-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 12px;
  color: #64748b;
}

#mini-top2-cart-units { font-size: 12px; }

#mini-top2-cart-sum {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  flex-shrink: 0;
  white-space: nowrap;
}

.mini-top2-cart-open-btn {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: none;
  background: #1d57e8;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  width: auto;
  padding: 0 12px;
}

.mini-top-screen {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mini-top-head {
  margin-bottom: 4px;
}

.mini-top-period-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.mini-top-period-btn {
  border: 1px solid #dbe7fb;
  background: #fff;
  color: #0f172a;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.mini-top-period-btn.active {
  border-color: #0f62ff;
  color: #0f62ff;
  background: #eef5ff;
}

.mini-top-title {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
}

.mini-top-sub {
  margin: 8px 0 0;
  font-size: 12px;
}

.mini-top-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mini-top-filter-btn {
  width: auto;
  min-width: 0;
  border: 1px solid #dbe7fb;
  background: #fff;
  color: #0f172a;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
}

.mini-top-filter-btn.active {
  border-color: #0f62ff;
  color: #0f62ff;
  background: #eef5ff;
}

.mini-top-status {
  margin: 0;
}

.mini-top-table-head {
  display: grid;
  grid-template-columns: 36px 48px minmax(0, 1fr) 88px 34px;
  gap: 8px;
  font-size: 10px;
  padding: 0 4px;
}

.mini-top-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mini-top-item {
  display: grid;
  grid-template-columns: 36px 48px minmax(0, 1fr) 88px 34px;
  align-items: center;
  gap: 6px;
  padding: 6px 2px;
  border-bottom: 1px solid #eef2f7;
}

.mini-top-rank {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  text-align: center;
}

.mini-top-thumb-wrap {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mini-top-thumb {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.mini-top-name {
  font-size: 13px;
  line-height: 1.25;
  font-weight: 600;
}

.mini-top-name-volume {
  font-weight: 500;
}

.mini-top-meta {
  font-size: 10px;
  margin-top: 2px;
}

.mini-top-kpi {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
}

.mini-top-price {
  font-size: 18px;
  font-weight: 800;
  text-align: right;
  color: #0b1533;
  letter-spacing: -0.01em;
  line-height: 1.05;
}

.mini-top-change {
  font-size: 14px;
  font-weight: 700;
  text-align: right;
  line-height: 1.05;
}

.mini-top-change.is-up {
  color: #16a34a;
}

.mini-top-change.is-down {
  color: #dc2626;
}

.mini-top-change.is-neutral {
  color: #64748b;
}

.mini-top-add-btn {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 0;
  background: #0f62ff;
  color: #fff;
  font-size: 18px;
  line-height: 1;
  padding: 0;
}

.mini-top-cart-dialog {
  width: min(100%, 360px);
  max-width: calc(100vw - 32px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.15);
}

.mini-top-cart-dialog::backdrop {
  background: rgba(15, 23, 42, 0.35);
}

.mini-top-cart-dialog-inner {
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mini-top-cart-dialog-title {
  margin: 0;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 600;
}

.mini-top-cart-mode-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mini-top-cart-mode-btn {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 8px;
  font-size: 12px;
  font-weight: 600;
  background: #f8fafc;
  color: #334155;
  cursor: pointer;
  line-height: 1.25;
}

.mini-top-cart-mode-btn.is-active {
  border-color: #0f62ff;
  background: #eef5ff;
  color: #0f62ff;
  box-shadow: inset 0 0 0 1px rgba(15, 98, 255, 0.25);
}

.mini-top-cart-qty-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.mini-top-cart-qty-label input {
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 0 12px;
  font-size: 16px;
}

.mini-top-cart-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.mini-top-cart-confirm-btn {
  background: #0f62ff;
  color: #fff;
  border-color: #0f62ff;
}

.mini-checkout-address-block select {
  width: 100%;
}

#checkout-delivery-address {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  min-height: 72px;
}

.admin-clients-table {
  font-size: 14px;
}

.admin-search-queries-table {
  font-size: 14px;
}

.admin-search-queries-table th:first-child,
.admin-search-queries-table td:first-child {
  width: 72px;
}

.admin-search-query-bind-btn {
  min-width: 34px;
  padding-inline: 10px;
  font-size: 18px;
  line-height: 1;
}

.admin-search-alias-bind-row td {
  background: #f8fafc;
  padding: 14px;
}

.admin-search-alias-bind-form {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(160px, 0.8fr) minmax(260px, 1.3fr) auto;
  gap: 10px;
  align-items: center;
}

.admin-search-alias-bind-form p {
  margin: 3px 0 0;
  font-size: 12px;
}

.admin-search-alias-product-filter,
.admin-search-alias-product-select {
  width: 100%;
  min-height: 38px;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
}

.admin-search-alias-actions {
  display: flex;
  gap: 8px;
}

.admin-search-alias-status {
  grid-column: 1 / -1;
}

@media (max-width: 900px) {
  .admin-search-alias-bind-form {
    grid-template-columns: 1fr;
  }

  .admin-search-alias-actions {
    justify-content: flex-start;
  }
}

.admin-client-role-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 120px;
}

.admin-client-role-pill {
  display: inline-flex;
  align-items: center;
  width: auto;
  padding: 4px 9px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.admin-client-role-pill--supplier {
  background: #f5f3ff;
  color: #7c3aed;
}

.admin-client-role-pill--picker {
  background: #fff7ed;
  color: #c2410c;
}

@media (max-width: 700px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .admin-card {
    grid-template-columns: 1fr;
  }

  .admin-card .product-image {
    width: 100%;
    height: 140px;
  }

  .create-media-layout {
    grid-template-columns: 1fr;
  }

  .create-field-row {
    grid-template-columns: 1fr;
  }

  .create-sale-modes-row {
    grid-template-columns: 1fr;
  }

  .create-pack-size-row > div:first-child {
    display: none;
  }

  .sale-columns {
    grid-template-columns: 1fr;
  }

  .create-triple-row,
  .inline-triple-row {
    grid-template-columns: 1fr;
  }
}

/* Product tags (admin) */
.tag-checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: flex-start;
}

.tag-checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
}

.tag-checkbox-row input[type="checkbox"] {
  width: auto;
  margin: 0;
}

.product-tag-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--tag-bg, #64748b);
  line-height: 1.2;
}

.product-tag-chip {
  background: var(--tag-bg, #64748b) !important;
  color: #fff !important;
  border: none;
}

.tag-list-item-main {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tag-swatch {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}

.bulk-tags-dialog {
  max-width: min(440px, 92vw);
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
}

/* Диалог клиента в админке — как экран «Выберите клуб» */
.admin-client-dialog {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  overflow: hidden;
  background: #f6f7fb;
}

.admin-client-dialog::backdrop {
  background: rgba(15, 23, 42, 0.35);
}

.admin-client-dialog-inner {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  max-height: 100%;
  height: 100%;
  margin: 0 auto;
  overflow: hidden;
}

.admin-client-dialog-inner.mcp-shell {
  max-width: min(520px, 100%);
}

.admin-client-dialog-head {
  position: relative;
  padding-top: 20px;
  padding-right: 52px;
}

.acd-close-btn {
  position: absolute;
  top: 18px;
  right: 16px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 12px;
  background: #fff;
  color: #64748b;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
  transition: background 0.15s, color 0.15s;
}

.acd-close-btn:hover {
  background: #eff6ff;
  color: #2563eb;
}

.admin-client-detail-body {
  flex: 1;
  min-height: 0;
  padding-top: 4px;
}

.admin-client-detail.mcp-list {
  gap: 10px;
}

.acd-client-icon {
  background: #eff6ff !important;
  color: #2563eb !important;
}

.acd-hero-card .mcp-club-stats {
  grid-template-columns: 1fr 1fr;
}

.acd-stat-block--wide {
  grid-column: 1 / -1;
}

.acd-section-head {
  margin-bottom: 12px;
}

.acd-section-title {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.acd-section-hint {
  margin: 4px 0 0;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.4;
}

.admin-client-roles-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-client-role-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-client-role-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 9px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #f8fafc;
  color: #0f172a;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.admin-client-role-check:has(input:checked) {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
}

.admin-client-role-check input {
  width: auto;
  margin: 0;
}

.admin-client-role-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.acd-save-roles-btn {
  margin-top: 4px;
}

.admin-clubs-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-club-card {
  padding: 16px 18px;
}

.admin-club-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.admin-club-card-name {
  margin: 0 0 4px;
  font-size: 18px;
  line-height: 1.25;
}

.admin-club-card-meta {
  margin: 0;
  font-size: 13px;
}

.admin-club-card-stats {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  text-align: right;
  flex-shrink: 0;
}

.admin-club-card-owner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.admin-club-staff-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 860px) {
  .admin-club-staff-grid {
    grid-template-columns: 1fr;
  }
}

.admin-club-staff-block {
  min-width: 0;
}

.admin-club-staff-title {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: #111827;
}

.admin-club-staff-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 11px;
  font-weight: 800;
  vertical-align: middle;
}

.admin-club-staff-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-club-staff-item {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "role name"
    "role phone";
  gap: 2px 10px;
  align-items: start;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f8fafc;
}

.admin-club-staff-name {
  grid-area: name;
  font-weight: 700;
  color: #0f172a;
  font-size: 13px;
}

.admin-club-staff-phone {
  grid-area: phone;
  font-size: 12px;
  color: #475569;
}

.admin-club-staff-contact {
  display: block;
  margin-top: 2px;
  font-size: 11px;
}

.admin-club-staff-empty {
  margin: 0;
  font-size: 13px;
}

.admin-club-role-pill {
  grid-area: role;
  align-self: start;
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.admin-club-role-pill--owner {
  background: #fef3c7;
  color: #92400e;
}

.admin-club-role-pill--manager {
  background: #dbeafe;
  color: #1d4ed8;
}

.admin-club-role-pill--employee {
  background: #dcfce7;
  color: #166534;
}

.acd-roles-status {
  font-size: 13px;
  text-align: center;
}

.acd-addr-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.acd-addr-item {
  background: #f8fafc;
  border-radius: 12px;
  padding: 12px 14px;
}

.acd-addr-label {
  font-size: 12px;
  font-weight: 700;
  color: #2563eb;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.acd-addr-line {
  font-size: 14px;
  color: #0f172a;
  line-height: 1.45;
}

.acd-addr-meta {
  font-size: 12px;
  color: #64748b;
  margin-top: 6px;
  line-height: 1.4;
}

.acd-order-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.acd-order-item {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  border-radius: 12px;
  background: #f8fafc;
  padding: 12px 14px;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
}

.acd-order-item:hover {
  background: #eff6ff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
}

.acd-order-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.acd-order-code {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.acd-order-sum {
  font-size: 15px;
  font-weight: 700;
  color: #2563eb;
}

.acd-order-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.acd-order-status {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
}

.acd-order-date {
  font-size: 12px;
  color: #94a3b8;
}

.acd-delete-btn {
  width: 100%;
  padding: 14px;
  border: 1.5px solid #fecaca;
  border-radius: 14px;
  background: #fff;
  color: #b91c1c;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}

.acd-delete-btn:hover {
  background: #fef2f2;
}

.admin-clients-table .tiny-btn {
  white-space: nowrap;
}

.order-status-dialog {
  max-width: min(440px, 92vw);
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
}

.product-create-dialog:not([open]) {
  display: none !important;
}

.product-create-dialog[open] {
  box-sizing: border-box;
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  margin: 0;
  padding: calc(16px + env(safe-area-inset-top, 0px)) 16px calc(16px + env(safe-area-inset-bottom, 0px));
  border: 1px solid var(--border);
  border-radius: 0;
  overflow: auto;
}

.product-create-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

.product-create-dialog-title {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}

.admin-create-order-dialog {
  box-sizing: border-box;
  width: min(640px, 94vw);
  max-height: min(88vh, 840px);
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: auto;
}

.admin-create-order-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

.admin-create-order-dialog-title {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}

.admin-create-order-client {
  margin-bottom: 12px;
}

.admin-create-order-lines-label {
  margin: 12px 0 8px;
  font-size: 13px;
}

.admin-create-order-lines {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 10px;
}

.admin-create-order-lines .manual-order-line {
  margin: 0;
  padding: 12px;
}

.manual-order-line-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 10px 12px;
  align-items: end;
}

@media (max-width: 620px) {
  .manual-order-line-grid {
    grid-template-columns: 1fr;
  }

  .manual-order-line-remove-wrap {
    justify-self: start;
  }
}

.manual-order-line-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: #475569;
}

.manual-order-line-field span:first-child {
  font-weight: 600;
}

.manual-order-line-field--product select {
  min-width: 0;
}

.manual-order-line-field--qty .manual-order-qty {
  max-width: 96px;
}

.manual-order-line-remove-wrap {
  display: flex;
  align-items: flex-end;
  padding-bottom: 2px;
}

.admin-create-order-add-line {
  margin-bottom: 14px;
}

.admin-create-order-actions {
  margin-top: 4px;
}

.order-status-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

.order-status-dialog-title {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}

.bulk-tags-mode {
  border: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.bulk-tags-mode-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
}

.bulk-tags-mode-label input {
  width: auto;
  margin: 0;
}

.product-tags-field label {
  padding-top: 4px;
}

/* Mini-app checkout — как «Выберите клуб» (mcp) */
.mini-checkout-dialog {
  position: fixed;
  inset: 0;
  z-index: 10050;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: #f6f7fb;
  overflow: hidden;
}

.mini-checkout-dialog::backdrop {
  background: rgba(15, 23, 42, 0.35);
}

.mco-shell {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.mco-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: var(--mini-fullscreen-safe-top, calc(var(--mini-app-safe-top, env(safe-area-inset-top, 0px)) + 20px)) 16px 12px;
  background: #f6f7fb;
  flex-shrink: 0;
}

.mco-back-btn {
  width: 40px;
  height: 40px;
  margin-top: 2px;
  border: none;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.mco-header-text {
  flex: 1;
  min-width: 0;
}

.mco-title {
  margin: 0 0 4px;
}

.mco-subtitle {
  margin: 0;
}

.mco-scroll {
  flex: 1;
  min-height: 0;
  padding-bottom: 8px;
}

.mco-form {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mco-section-title {
  margin: 14px 0 8px;
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.mco-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.mco-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  gap: 2px 10px;
  padding: 12px 14px;
  margin: 0;
  cursor: text;
}

.mco-field--static {
  cursor: default;
}

.mco-field--comment {
  grid-template-columns: 1fr;
  position: relative;
  padding-bottom: 28px;
}

.mco-field--select {
  grid-template-columns: 1fr;
}

.mco-field-label {
  grid-column: 1;
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  line-height: 1.2;
}

.mco-field-input,
.mco-field-select,
.mco-field-textarea {
  grid-column: 1;
  width: 100%;
  border: none;
  padding: 0;
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
  background: transparent;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
}

.mco-field-input::placeholder,
.mco-field-textarea::placeholder {
  color: #cbd5e1;
  font-weight: 500;
}

.mco-field-value {
  grid-column: 1;
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.35;
}

.mco-field-icon,
.mco-field-chevron {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mco-field-textarea {
  resize: vertical;
  min-height: 56px;
  line-height: 1.4;
}

.mco-field-textarea--comment {
  min-height: 72px;
  font-weight: 500;
}

.mco-comment-count {
  position: absolute;
  right: 14px;
  bottom: 10px;
  font-size: 12px;
  color: #94a3b8;
  pointer-events: none;
}

.mco-field-divider {
  height: 1px;
  background: #f1f5f9;
  margin: 0;
}

.mco-date-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mco-date-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 14px;
  border-radius: 14px;
  border: 1.5px solid #e5e7eb;
  background: #fff;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.mco-date-card.is-active {
  border-color: #2563eb;
  background: #eff6ff;
}

.mco-date-card-icon {
  color: #94a3b8;
  margin-bottom: 2px;
}

.mco-date-card.is-active .mco-date-card-icon,
.mco-date-card-icon--active {
  color: #2563eb;
}

.mco-date-card-title {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.mco-date-card.is-active .mco-date-card-title {
  color: #2563eb;
}

.mco-date-card-sub {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  line-height: 1.3;
}

.mco-date-card.is-active .mco-date-card-sub {
  color: #3b82f6;
}

.mco-date-picker-wrap {
  margin-top: 8px;
}

.mco-date-picker-wrap.hidden {
  display: none;
}

.mco-date-native {
  width: 100%;
}

.mco-status {
  margin: 8px 2px 0;
  font-size: 13px;
}

.mco-footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: #fff;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.1);
}

.mco-footer-pay {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.mco-footer-price {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.mco-footer-caption {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
}

.mco-footer-btn {
  flex: 0 1 auto;
  min-width: 168px;
  max-width: 58%;
  padding: 14px 18px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
}

.mco-footer-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

#checkout-delivery-address[readonly] {
  color: #334155;
}

/* Admin orders */
.admin-order-filters-card {
  margin-bottom: 12px;
}

.admin-order-filters {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  padding: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.admin-order-filter-btn {
  flex: 0 0 auto;
  width: auto;
  min-width: max-content;
  max-width: none;
  padding: 8px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--border);
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.admin-order-filter-btn:hover {
  background: #f1f5f9;
}

.admin-order-filter-btn.active {
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: #0369a1;
}

.admin-order-filter-count {
  font-size: 11px;
  font-weight: 700;
  background: #cbd5e1;
  color: #334155;
  padding: 2px 7px;
  border-radius: 999px;
  min-width: 1.25rem;
  text-align: center;
  line-height: 1.2;
}

.admin-order-filter-btn.active .admin-order-filter-count {
  background: #0284c7;
  color: #fff;
}

.order-list {
  display: block;
}

.orders-table-wrap {
  padding: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.orders-table {
  width: 100%;
  min-width: 800px;
  border-collapse: collapse;
  font-size: 14px;
}

.orders-table-cell-numeric {
  text-align: right;
  white-space: nowrap;
}

.orders-table thead th.orders-table-cell-numeric,
.orders-table tbody td.orders-table-cell-numeric {
  text-align: right;
}

.orders-table thead th {
  text-align: left;
  padding: 12px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--border);
  background: #fafbfc;
}

.orders-table tbody td {
  padding: 14px;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

.orders-table-row:last-child td {
  border-bottom: none;
}

.order-table-code-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  margin: 0;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  text-align: left;
  color: inherit;
}

.order-table-code-btn:hover .order-table-code-main {
  color: var(--primary);
  text-decoration: underline;
}

.order-table-code-main {
  font-weight: 700;
  font-size: 15px;
  color: #0f172a;
}

.order-table-code-sub {
  font-size: 12px;
}

.order-table-client-name {
  font-weight: 600;
  color: #0f172a;
}

.order-table-client-phone {
  font-size: 13px;
  margin-top: 4px;
}

.order-table-sum-main {
  font-weight: 700;
  color: #0f172a;
}

.order-table-qty {
  font-weight: 600;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.order-table-sum-sub {
  font-size: 12px;
  margin-top: 4px;
}

.order-table-date-main {
  font-weight: 600;
}

.order-table-date-sub {
  font-size: 13px;
  margin-top: 4px;
}

.order-status-select--table {
  min-width: 130px;
  font-size: 13px;
  border-radius: 10px;
  border: 1px solid var(--border);
  transition:
    background 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease;
}

.order-status-td {
  vertical-align: middle;
}

.order-table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.order-table-icon-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #f8fafc;
  color: #2563eb;
  cursor: pointer;
}

.order-table-icon-btn:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.order-table-icon-btn--danger {
  color: #dc2626;
}

.order-table-icon-btn--danger:hover {
  background: #fef2f2;
  border-color: #fecaca;
}

.order-table-action-icon {
  width: 20px;
  height: 20px;
}

.order-table-more-dots {
  font-size: 20px;
  line-height: 1;
  color: var(--muted);
  padding: 0 6px;
  user-select: none;
}

.order-status-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.order-status-badge--new {
  background: #fef9c3;
  color: #854d0e;
}

.order-status-badge--processing {
  background: #dbeafe;
  color: #1e40af;
}

.order-status-badge--done {
  background: #dcfce7;
  color: #166534;
}

.order-status-badge--cancelled {
  background: #f1f5f9;
  color: #475569;
}

.order-status-badge--custom {
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.order-card-head {
  display: grid;
  gap: 10px;
}

.order-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
}

.order-card-id {
  font-weight: 700;
  font-size: 15px;
}

.order-card-customer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: baseline;
}

.order-card-phone {
  font-size: 14px;
  color: var(--muted);
}

.order-card-total-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.order-status-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
}

.order-status-label span.muted {
  font-size: 12px;
}

.order-status-select {
  width: auto;
  min-width: 160px;
  padding: 8px 10px;
  font-size: 13px;
}

.order-lines {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.order-line-item {
  font-size: 13px;
  line-height: 1.35;
}

.order-line-thumb-wrap {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
}

.order-line-thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #f8fafc;
  display: block;
}

.order-line-thumb--empty {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  border: 1px dashed var(--border);
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.order-line-product {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.order-line-sub {
  font-size: 12px;
  line-height: 1.35;
}

.mini-cart-item-sub {
  font-size: 12px;
  line-height: 1.35;
}

.order-line-text {
  min-width: 0;
}

.order-line-volume {
  white-space: nowrap;
}

.order-line-qty-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 3px;
  font-weight: 600;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: #334155;
  width: 100%;
  min-width: 0;
  justify-self: stretch;
  box-sizing: border-box;
}

.order-line-qty-u,
.order-line-qty-pack,
.order-line-qty-piece {
  white-space: nowrap;
}

.order-line-qty-pcs {
  font-size: 11px;
  font-weight: 500;
}

.order-line-price {
  text-align: right;
  font-weight: 600;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Order detail page (new window) */
.order-view-body {
  margin: 0;
  background: var(--bg);
}

.order-view-shell {
  padding: 24px 0 48px;
  box-sizing: border-box;
}

body.order-view--no-footer .footer-nav {
  display: none !important;
}

body.order-view--no-footer .order-view-shell {
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
}

/* Карточка заказа (последний заказ → order-view.html) — тот же верхний отступ, что в miniapp */
.mini-app-page.tg-webapp.order-view-body .order-view-shell {
  padding-top: calc(12px + var(--mini-app-safe-top));
}

.order-view-card {
  max-width: 640px;
  margin: 0 auto;
}

.order-view-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.order-view-code {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
}

.order-view-meta-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.order-view-datetime {
  font-size: 13px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.order-view-section {
  margin-top: 22px;
}

.order-view-section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}

.order-view-section-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 10px;
}

.order-view-lines {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.order-view-composition {
  margin-top: 4px;
}

.order-view-items-group.mini-cart-group {
  margin-top: 12px;
}

.order-view-items-group.mini-cart-group:first-child {
  margin-top: 0;
}

.order-view-items-group .mini-cart-group-items .order-lines {
  gap: 8px;
}

/* Одна сетка: фото | товар | кол-во | цена (фикс. ширины 3–4 — одинаково в обоих блоках) */
.order-view-lines-head,
.order-view-lines .order-line-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 8.25rem 8rem;
  column-gap: 12px;
  align-items: start;
}

.order-view-lines-head {
  padding: 4px 10px 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.order-view-lines-head-thumb {
  display: block;
  width: 56px;
}

.order-view-lines-head-product {
  min-width: 0;
  text-align: left;
}

.order-view-lines-head-qty,
.order-view-lines-head-sum {
  text-align: right;
  white-space: nowrap;
  justify-self: stretch;
}

.mini-cart-group.pack .order-view-lines .order-line-item {
  padding: 8px 10px;
  border-radius: 10px;
  background: #f0fdf4;
}

.mini-cart-group.piece .order-view-lines .order-line-item {
  padding: 8px 10px;
  border-radius: 10px;
  background: #eff6ff;
}

.order-view-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.order-view-total {
  font-size: 20px;
}

.order-view-client-leading {
  margin: 0 0 14px;
  font-size: 13px;
}

.order-view-client-back-btn {
  width: auto;
  min-width: max-content;
  margin-bottom: 10px;
  background: #fff;
  color: #0f172a;
  border: 1px solid #d6deea;
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 600;
}

.order-view-client-panel {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.order-view-client-stats {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  background: #f8fafc;
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.order-view-client-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.order-view-client-stat-row strong {
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.order-status-history-list {
  list-style: none;
  margin: 0 0 14px;
  padding: 0 0 0 8px;
  display: grid;
  gap: 10px;
}

.order-status-history-item {
  --status-color: #3b82f6;
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.order-status-history-dot {
  position: relative;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--status-color);
  margin-top: 4px;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--status-color) 20%, white);
}

.order-status-history-dot::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 14px;
  width: 2px;
  height: calc(100% + 18px);
  transform: translateX(-50%);
  background: color-mix(in srgb, var(--status-color) 38%, #cbd5e1);
  border-radius: 2px;
}

.order-status-history-item:last-child .order-status-history-dot::after {
  display: none;
}

.order-status-history-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.order-status-history-main strong {
  font-size: 15px;
}

.order-view-client-cancel-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.order-view-client-actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}

.order-view-client-cancel-hint {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
}

.order-view-client-status-note {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
}

.order-view-client-cancel-msg {
  margin: 0;
  min-height: 1.2em;
}

/* Сборка заказа (order-view) */
.order-view-assemble-hint {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.4;
}

.order-assemble-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* «Продолжить сборку» слева (основное действие), «Начать заново» справа */
.order-assemble-actions--continue-first #order-pick-continue {
  order: -1;
}

.order-assemble-btn {
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: #fff;
  color: #0f172a;
}

.order-assemble-btn--primary {
  background: #0f172a;
  color: #fff;
  border-color: #0f172a;
}

.order-assemble-btn--secondary {
  background: #e0f2fe;
  color: #0c4a6e;
  border-color: #7dd3fc;
}

/* Comfortable Mini App order view */
.order-view-body {
  background: #f6f7fb;
}

.order-view-shell {
  width: 100%;
  max-width: 480px;
  padding: calc(var(--mini-fullscreen-safe-top, 22px) + 4px) 16px calc(env(safe-area-inset-bottom, 0px) + 92px);
}

.mini-app-page.tg-webapp.order-view-body .order-view-shell {
  padding-top: var(--mini-fullscreen-safe-top, calc(var(--mini-app-safe-top, env(safe-area-inset-top, 0px)) + 20px));
}

.order-view-card.card {
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.order-view-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  margin: 0 0 12px;
  padding: 16px;
  border: 1px solid #dbeafe;
  border-radius: 22px;
  background: linear-gradient(135deg, #fff 0%, #eff6ff 100%);
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.08);
}

.order-view-code-label {
  color: #64748b !important;
  font-weight: 700;
}

.order-view-code {
  margin: 0;
  color: #0f172a;
  font-size: 26px;
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.order-view-meta-block {
  align-items: flex-end;
  gap: 8px;
}

.order-view-datetime {
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.order-view-summary-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.7fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.order-view-summary-tile {
  min-width: 0;
  padding: 11px 9px;
  border-radius: 16px;
  background: #fff;
  text-align: center;
  border-top: 3px solid #2563eb;
  box-shadow: 0 1px 6px rgba(15, 23, 42, 0.07);
}

.order-view-summary-tile span,
.order-view-summary-tile small {
  display: block;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.order-view-summary-tile strong {
  display: block;
  margin-top: 4px;
  color: #0f172a;
  font-size: 20px;
  line-height: 1;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.order-view-summary-tile--sum strong {
  color: #2563eb;
  font-size: 18px;
}

.order-view-summary-tile--sku {
  border-top-color: #22c55e;
}

.order-view-summary-tile--sku strong {
  color: #16a34a;
}

.order-view-summary-tile--qty {
  border-top-color: #f59e0b;
}

.order-view-summary-tile--qty strong {
  color: #d97706;
}

.order-view-section {
  margin-top: 10px;
}

.order-view-client-card,
.order-view-section:not(.order-view-client-panel):not(.order-view-assemble) {
  padding: 14px;
  border: 1px solid #e7eef8;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.08);
}

.order-view-client-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.order-view-client-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #eff6ff;
  color: #2563eb;
}

.order-view-client-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.order-view-client-main {
  min-width: 0;
}

.order-view-section-title {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 900;
}

.order-view-client-name {
  margin: 0;
  color: #0f172a;
  font-size: 15px;
  font-weight: 900;
}

.order-view-client-phone {
  margin: 4px 0 0;
  font-size: 13px;
}

.order-view-delivery {
  margin-top: 10px;
  padding: 10px;
  border-radius: 13px;
  background: #f8fafc;
}

.order-view-section-head {
  margin-bottom: 10px;
}

.order-view-items-group.mini-cart-group {
  margin-top: 10px;
  border: 1px solid #e7eef8;
  border-radius: 16px;
  box-shadow: none;
}

.order-view-items-group .mini-cart-group-head {
  padding: 12px 12px 8px;
}

.order-view-items-group .mini-cart-group-head-text strong {
  font-size: 15px;
  font-weight: 900;
}

.order-view-lines-head {
  display: none;
}

.order-view-lines .order-line-item {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  grid-template-areas:
    "thumb product aside"
    "thumb qty aside";
  gap: 4px 10px;
  align-items: start;
  padding: 10px 12px;
  border-radius: 0;
  border-top: 1px solid rgba(226, 232, 240, 0.8);
}

.order-view-lines .order-line-thumb-wrap {
  grid-area: thumb;
  width: 50px;
  height: 50px;
}

.order-view-lines .order-line-thumb,
.order-view-lines .order-line-thumb--empty {
  width: 50px;
  height: 50px;
  border-radius: 13px;
}

.order-view-lines .order-line-product {
  grid-area: product;
}

.order-view-lines .order-line-text {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}

.order-view-lines .order-line-sub {
  font-size: 11px;
}

.order-view-lines .order-line-qty-block {
  grid-area: qty;
  align-items: flex-start;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.order-view-lines .order-line-price {
  align-self: auto;
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.mini-cart-group.pack .order-view-lines .order-line-item,
.mini-cart-group.piece .order-view-lines .order-line-item {
  background: transparent;
}

.order-view-assemble {
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff 0%, #f0fdf4 100%);
  border: 1px solid #bbf7d0;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.08);
}

.order-view-assemble-hint {
  font-size: 13px;
}

.order-assemble-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.order-assemble-btn {
  width: 100%;
  border-radius: 16px;
  padding: 14px;
  font-size: 15px;
  font-weight: 900;
}

.order-assemble-btn--primary {
  background: #2563eb;
  border-color: #2563eb;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
}

.order-assemble-btn--secondary {
  background: #eff6ff;
  color: #2563eb;
  border-color: #bfdbfe;
}

.order-pick-report {
  border-color: #dbeafe;
  border-radius: 16px;
  background: #fff;
}

.order-view-footer {
  position: sticky;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
  z-index: 2;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}

.order-view-total {
  color: #2563eb;
  font-size: 22px;
  font-weight: 900;
}

@media (max-width: 380px) {
  .order-view-summary-grid {
    grid-template-columns: 1fr;
  }

  .order-view-top {
    grid-template-columns: 1fr;
  }

  .order-view-meta-block,
  .order-view-datetime {
    align-items: flex-start;
  }
}

.order-pick-report-host {
  margin-top: 18px;
}

.order-pick-report {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 14px 12px;
  background: #f8fafc;
}

.order-pick-report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.order-pick-report-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.order-pick-report-done-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: #dcfce7;
  color: #14532d;
}

.order-pick-report-placeholder {
  margin: 8px 0 0;
  font-size: 14px;
}

.order-pick-result-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.order-pick-result-list--compact {
  gap: 8px;
}

.order-pick-result-list--compact .order-pick-result-thumb-wrap {
  width: 40px;
  height: 40px;
}

.order-pick-result-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.order-pick-result-list--compact .order-pick-result-row {
  grid-template-columns: 40px minmax(0, 1fr) auto;
  padding: 8px;
}

.order-pick-result-thumb-wrap {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #eef2f7;
  flex-shrink: 0;
}

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

.order-pick-result-thumb--empty {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.order-pick-result-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.order-pick-result-name {
  font-size: 14px;
  line-height: 1.35;
  color: #0f172a;
}

.order-pick-result-sub {
  font-size: 12px;
  line-height: 1.35;
}

.order-pick-result-fact {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.35;
  color: #334155;
}

.order-pick-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 8px;
  white-space: nowrap;
  align-self: flex-start;
}

.order-pick-badge--full {
  background: #dcfce7;
  color: #14532d;
}

.order-pick-badge--none {
  background: #fee2e2;
  color: #991b1b;
}

.order-pick-badge--partial {
  background: #fef3c7;
  color: #92400e;
}

.order-pick-badge--pending {
  background: #e2e8f0;
  color: #475569;
}

.order-pick-overlay-summary {
  margin-top: 8px;
  max-height: min(52vh, 420px);
  overflow: auto;
}

.order-pick-done-hint {
  margin: 0 0 10px;
  text-align: center;
  font-size: 13px;
}

.order-pick-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  background: #f0f4fb;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  box-sizing: border-box;
}

.order-pick-overlay.hidden {
  display: none;
}

.order-pick-overlay > .pick-collected {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  align-self: stretch;
}

body.order-pick-open {
  overflow: hidden;
}

body.order-view-awaiting-pick .order-view-card,
body.order-pick-fullscreen .order-view-card {
  display: none;
}

body.order-view-awaiting-pick .ov-assemble,
body.order-view--assembly-finished .ov-assemble,
body.order-pick-fullscreen .ov-assemble {
  display: none !important;
}

.order-pick-report--compact {
  padding: 14px;
  border-radius: 14px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.order-pick-report-compact-badge {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 800;
  color: #16a34a;
}

.order-pick-report-compact-stats {
  margin: 0 0 12px;
  font-size: 13px;
}

.order-pick-screen {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  overflow: hidden;
}

.order-pick-head {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: calc(var(--order-pick-safe-top, 0px) + env(safe-area-inset-top, 0px) + 10px) 14px 12px;
  background: #f0f4fb;
  box-sizing: border-box;
}

.order-pick-head-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.order-pick-head-text strong {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0b1220;
}

.order-pick-head-text .muted {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-pick-head--assemble {
  grid-template-columns: 44px minmax(0, 1fr) auto;
}

.order-pick-head-title {
  margin: 0;
  text-align: center;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0b1220;
}

.order-pick-head-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 10px;
  background: #e8f2ff;
  color: #0b72ff;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  max-width: 42vw;
  overflow: hidden;
  text-overflow: ellipsis;
}

.order-pick-progress-card {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.order-pick-progress-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #eff6ff;
  color: #0b72ff;
}

.order-pick-progress-main {
  min-width: 0;
}

.order-pick-progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.order-pick-progress-pct {
  color: #64748b;
  font-weight: 600;
  white-space: nowrap;
}

.order-pick-progress-track {
  height: 8px;
  border-radius: 999px;
  background: #e8eef5;
  overflow: hidden;
}

.order-pick-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3b82f6, #0b72ff);
  transition: width 0.2s ease;
}

.order-pick-product-card {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

.order-pick-photo-wrap {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  aspect-ratio: 1;
  max-height: min(42vh, 100%);
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.order-pick-photo-wrap .order-pick-photo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 0;
  max-height: none;
}

.order-pick-details {
  flex-shrink: 0;
  padding: 12px 14px 14px;
}

.order-pick-details--center {
  text-align: center;
}

.order-pick-details--center .order-pick-title {
  text-align: center;
  font-size: 14px;
  line-height: 1.35;
}

.order-pick-details--center .order-pick-title strong {
  font-size: 14px;
  font-weight: 700;
}

.order-pick-qty-only {
  margin: 8px 0 0;
  text-align: center;
  font-size: 16px;
  line-height: 1.3;
  color: #0f172a;
}

.order-pick-qty-only .order-pick-need-qty {
  font-size: 16px;
  color: #0b72ff;
  font-weight: 800;
}

.order-pick-details--center .order-pick-meta-row {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.order-pick-details--center .order-pick-sku {
  flex: 0 1 auto;
  width: 100%;
}

.order-pick-volume-notice {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff7ed;
  border: 1px solid #fdba74;
  text-align: center;
}

.order-pick-volume-notice-kicker {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #c2410c;
  margin-bottom: 4px;
}

.order-pick-volume-notice-value {
  display: block;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  color: #9a3412;
  letter-spacing: 0.02em;
}

.order-pick-volume-notice-value--muted {
  font-size: 15px;
  font-weight: 600;
}

.order-pick-volume-notice-hint {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.35;
  color: #9a3412;
}

.order-pick-modal-sub + .order-pick-volume-notice {
  margin-top: 8px;
}

.order-pick-product-card--volume-attn .order-pick-photo {
  box-shadow: 0 0 0 3px #fdba74;
}

.order-pick-details--center .order-pick-need-inline {
  text-align: center;
  width: 100%;
}

.order-pick-meta-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e8eef5;
  font-size: 12px;
  line-height: 1.35;
}

.order-pick-sku {
  flex: 1 1 auto;
  min-width: 0;
}

.order-pick-need-inline {
  flex-shrink: 0;
  text-align: right;
  color: #64748b;
  font-weight: 600;
}

.order-pick-need-qty {
  color: #0b72ff;
  font-weight: 800;
}

.order-pick-actions-row {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.order-pick-actions-row .order-pick-act {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  height: 60px;
  min-height: 60px;
  max-height: 60px;
  padding: 0 8px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  cursor: pointer;
  box-sizing: border-box;
}

.order-pick-actions-row .order-pick-act > span:last-child {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
  font-size: 12px;
  line-height: 1.15;
  text-transform: uppercase;
}

.order-pick-actions-row .order-pick-act-icon {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.order-pick-actions-row .order-pick-act-icon svg {
  width: 40px;
  height: 40px;
  display: block;
}

.order-pick-actions-row .order-pick-act--ok {
  background: #ecfdf5;
  color: #16a34a;
  border-color: #bbf7d0;
}

.order-pick-actions-row .order-pick-act--ok .order-pick-act-icon {
  color: #16a34a;
}

.order-pick-actions-row .order-pick-act--partial {
  background: #fffbeb;
  color: #d97706;
  border-color: #fde68a;
}

.order-pick-actions-row .order-pick-act--partial .order-pick-act-icon {
  color: #d97706;
}

.order-pick-actions-row .order-pick-act--no {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}

.order-pick-actions-row .order-pick-act--no .order-pick-act-icon {
  color: #dc2626;
}

.order-pick-undo {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0 auto;
  padding: 4px 8px;
  border: 0;
  background: transparent;
  color: #0b72ff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.order-pick-undo.is-disabled,
.order-pick-undo:disabled {
  opacity: 0.35;
  pointer-events: none;
}

.order-pick-tip {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: flex-start;
  padding: 12px 12px;
  border-radius: 12px;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  color: #1e3a8a;
  font-size: 12px;
  line-height: 1.4;
}

.order-pick-tip p {
  margin: 0;
}

.order-pick-tip-icon {
  display: inline-flex;
  color: #0b72ff;
}

.order-pick-wizard-footer {
  border-top: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.06);
}

.order-pick-wizard-footer .order-pick-footer-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.order-pick-wizard-footer .order-pick-footer-btn--primary {
  background: #0b72ff;
  border-color: #0b72ff;
  color: #fff;
}

.order-pick-wizard-footer .order-pick-footer-btn--primary svg {
  color: #fff;
}

.order-pick-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.order-pick-screen--single .order-pick-body {
  overflow: hidden;
}

.order-pick-wizard-scroll {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 6px 12px 8px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.order-pick-screen--single .order-pick-wizard-scroll {
  gap: 6px;
}

.order-pick-wizard-footer {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px 12px calc(env(safe-area-inset-bottom, 0px) + 12px);
  background: #f6f7fb;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.order-pick-wizard-footer--dating {
  grid-template-columns: 1fr;
}

.order-pick-screen > .order-pick-wizard-footer {
  position: static;
  margin-top: 0;
  z-index: auto;
}

.order-pick-stats-block {
  margin: 0;
}

.order-pick-stats-block--dating .visinv-stat-main strong {
  font-size: 34px;
}

.order-pick-product-card {
  margin: 0;
}

.order-pick-product-card--plain {
  background: #fff;
  border-radius: 20px;
  padding: 16px;
  border: 1px solid #e0e8f5;
}

.order-pick-product-card .order-pick-card {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.order-pick-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 6px;
  text-align: center;
}

.order-pick-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
}

.order-pick-stat strong {
  font-size: 20px;
  color: #0f172a;
}

.order-pick-stats-note {
  font-size: 11px;
  margin: 0;
  line-height: 1.3;
}

.order-pick-stats--dating .order-pick-stat strong {
  font-size: 38px;
  line-height: 1;
}

.order-pick-stat-total {
  font-size: 24px;
}

.order-pick-stats-note--center {
  text-align: center;
  font-size: 14px;
  margin-top: 10px;
}

.order-pick-progress-track {
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
  margin-top: 8px;
  margin-bottom: 0;
}

.order-pick-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #22c55e, #16a34a);
  transition: width 0.2s ease;
}

.order-pick-card {
  margin-top: 4px;
}

.order-pick-counter {
  font-size: 13px;
  margin-bottom: 8px;
}

.order-pick-card-inner {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.order-pick-card-inner--standard-center {
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
}

.order-pick-card-inner--standard-center .order-pick-photo {
  width: min(260px, 54vw);
  height: min(340px, 40vh);
  object-fit: contain;
  border: 0;
  background: transparent;
}

.order-pick-card-inner--standard-center .order-pick-info {
  display: grid;
  justify-items: center;
}

.order-pick-need-label {
  margin: 2px 0 0;
  font-size: 13px;
}

.order-pick-photo {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
  flex-shrink: 0;
  background: #f1f5f9;
}

.order-pick-photo--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 12px;
}

.order-pick-info {
  min-width: 0;
  flex: 1;
}

.order-pick-title {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.35;
  color: #0f172a;
}

.order-pick-title .muted {
  white-space: nowrap;
}

.order-pick-sub {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.35;
}

.order-pick-need {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.order-pick-need--pack {
  color: #14532d;
}

.order-pick-need--piece {
  color: #1d4ed8;
}

.order-pick-actions-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.order-pick-actions-grid--circles {
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.order-pick-act {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  padding: 14px 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  width: 100%;
}

.order-pick-actions-grid--circles .order-pick-act {
  background: transparent;
  border-color: transparent;
  color: #0f172a;
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 6px 8px;
  box-shadow: none;
}

.order-pick-act-circle {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  font-weight: 600;
}

.order-pick-act-label {
  display: grid;
  justify-items: center;
  gap: 2px;
  line-height: 1.15;
}

.mini-role-switch-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.mini-role-switch-card p {
  margin: 3px 0 0;
  font-size: 12px;
}

.mini-role-switch-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.mini-role-switch-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.mini-role-switch-btn {
  width: auto;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #dbe3ef;
  background: #f8fafc;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.mini-role-switch-btn.is-active {
  border-color: #0b72ff;
  background: #0b72ff;
  color: #fff;
}

.mini-role-remember-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  color: #334155;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

/* ── Role-picker screen (shown after login if 2+ roles) ──────────────── */
.mini-role-picker {
  position: fixed;
  inset: 0;
  z-index: 10002;
  background: var(--bg, #f6f7fb);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: var(--mini-fullscreen-safe-top, calc(var(--mini-app-safe-top, 24px) + 24px)) 16px 40px;
}
.mini-role-picker.hidden { display: none; }

.mini-role-picker-inner {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.mini-role-picker-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--text, #1f2937);
  text-align: center;
  margin: 0 0 8px;
}

.mini-role-picker-lead {
  font-size: 14px;
  color: var(--muted, #6b7280);
  text-align: center;
  margin: 0 0 28px;
}

.mini-role-picker-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

/* Выше глобального `button { background: var(--primary) }` — иначе карточки синие */
.mini-role-picker .mini-role-picker-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin: 0;
  padding: 16px 18px;
  border: 1.5px solid var(--border, #e5e7eb);
  border-radius: 18px;
  background: #fff;
  color: var(--text, #1f2937);
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
  transition: box-shadow 0.15s, border-color 0.15s;
}

.mini-role-picker .mini-role-picker-card:active {
  background: #fff;
  color: var(--text, #1f2937);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
  border-color: #c7d2fe;
}

.mini-role-picker-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}
.mini-role-picker-icon--client  { background: #eff6ff; }
.mini-role-picker-icon--supplier { background: #f5f3ff; }
.mini-role-picker-icon--picker  { background: #f0fdf4; }

.mini-role-picker-body {
  flex: 1;
  min-width: 0;
}
.mini-role-picker-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text, #1f2937);
  margin: 0 0 2px;
}
.mini-role-picker-desc {
  font-size: 13px;
  color: var(--muted, #6b7280);
  margin: 0;
}

.mini-role-picker-arrow {
  color: #c0c8d8;
  font-size: 18px;
  flex-shrink: 0;
}

.mini-role-picker-remember {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-radius: 14px;
  padding: 14px 18px;
  cursor: pointer;
  margin-bottom: 12px;
}
.mini-role-picker-remember-label {
  font-size: 15px;
  font-weight: 500;
  color: var(--text, #1f2937);
}
.mini-role-picker-toggle-wrap {
  position: relative;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
}
.mini-role-picker-chk {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.mini-role-picker-toggle {
  position: absolute;
  inset: 0;
  border-radius: 28px;
  background: #d1d5db;
  transition: background 0.2s;
  cursor: pointer;
}
.mini-role-picker-toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
  transition: transform 0.2s;
}
.mini-role-picker-chk:checked + .mini-role-picker-toggle { background: #2563eb; }
.mini-role-picker-chk:checked + .mini-role-picker-toggle::after { transform: translateX(20px); }

.mini-role-picker-hint {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--muted, #6b7280);
  text-align: center;
  justify-content: center;
  margin: 0;
}

.order-pick-act-label strong {
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
}

.order-pick-act-label small {
  font-size: 13px;
  font-weight: 500;
  color: #0f172a;
}

.order-pick-actions-grid--circles .order-pick-act--no .order-pick-act-label strong,
.order-pick-actions-grid--circles .order-pick-act--no .order-pick-act-label strong {
  color: #dc2626;
}

.order-pick-actions-grid--circles .order-pick-act--partial .order-pick-act-label strong,
.order-pick-actions-grid--circles .order-pick-act--partial .order-pick-act-label strong {
  color: #d97706;
}

.order-pick-actions-grid--circles .order-pick-act--ok .order-pick-act-label strong,
.order-pick-actions-grid--circles .order-pick-act--ok .order-pick-act-label strong {
  color: #16a34a;
}

.order-pick-actions-grid--circles .order-pick-act--ok .order-pick-act-circle {
  background: #dcfce7;
  color: #16a34a;
}

.order-pick-actions-grid--circles .order-pick-act--partial .order-pick-act-circle {
  background: #fef3c7;
  color: #d97706;
}

.order-pick-actions-grid--circles .order-pick-act--no .order-pick-act-circle {
  background: #fee2e2;
  color: #dc2626;
}

.order-pick-act--ok {
  background: #ecfdf5;
  color: #14532d;
  border-color: #6ee7b7;
}

.order-pick-act--partial {
  background: #fffbeb;
  color: #92400e;
  border-color: #fcd34d;
}

.order-pick-act--no {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fca5a5;
}

.order-pick-next-title {
  font-size: 12px;
  font-weight: 600;
  margin: 0 0 6px;
}

.order-pick-next-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.order-pick-next-list li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  padding: 8px 10px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.order-pick-next-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.order-pick-next-sub {
  font-size: 12px;
  line-height: 1.35;
}

.order-pick-next-thumb-wrap {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #eef2f7;
}

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

.order-pick-next-thumb--empty {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.order-pick-next-name {
  min-width: 0;
}

.order-pick-next-qty {
  white-space: nowrap;
}

.order-pick-done-msg {
  margin: 12px 0;
  font-weight: 600;
  color: #14532d;
  text-align: center;
}

/* Экран завершения сборки */
.order-pick-complete {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  background: #f4f6fb;
}

.order-pick-complete--overlay {
  min-height: 100%;
  background: #f4f6fb;
}

.order-pick-complete-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: start;
  gap: 8px;
  padding: calc(var(--order-pick-safe-top, 0px) + env(safe-area-inset-top, 0px) + 10px) 12px 12px;
  background: #f4f6fb;
}

.order-pick-complete-head-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid #e8edf3;
  border-radius: 12px;
  background: #fff;
  color: #334155;
  padding: 0;
  cursor: pointer;
}

.order-pick-complete-head-center {
  min-width: 0;
  text-align: center;
}

.order-pick-complete-head-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 4px;
}

.order-pick-complete-head-title-row strong {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
}

.order-pick-complete-head-badge {
  padding: 3px 8px;
  border-radius: 999px;
  background: #e8faf0;
  color: #16a34a;
  font-size: 11px;
  font-weight: 700;
}

.order-pick-complete-head-sub {
  font-size: 12px;
}

.order-pick-complete-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 16px 16px;
}

.order-pick-complete-hero {
  text-align: center;
  padding: 8px 0 20px;
}

.order-pick-complete-hero-icon {
  position: relative;
  width: 88px;
  height: 88px;
  margin: 0 auto 16px;
}

.order-pick-complete-check-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: #22c55e;
  color: #fff;
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.35);
}

.order-pick-complete-confetti::before,
.order-pick-complete-confetti::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.order-pick-complete-confetti::before {
  top: 6px;
  left: 8px;
  background: #22c55e;
}

.order-pick-complete-confetti::after {
  top: 12px;
  right: 6px;
  background: #3b82f6;
}

.order-pick-complete-title {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.order-pick-complete-lead {
  margin: 0 0 4px;
  font-size: 15px;
}

.order-pick-complete-time {
  margin: 0;
  font-size: 14px;
}

.order-pick-complete-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
  border: 1px solid #c8efd8;
  border-radius: 16px;
  background: #ecfdf3;
}

.order-pick-complete-summary-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.order-pick-complete-summary-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #d1fae5;
  color: #16a34a;
  flex-shrink: 0;
}

.order-pick-complete-summary-label {
  display: block;
  font-size: 12px;
  margin-bottom: 2px;
}

.order-pick-complete-summary-left strong {
  font-size: 16px;
  font-weight: 800;
  color: #15803d;
}

.order-pick-complete-summary-pct {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: #22c55e;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.order-pick-complete-stats {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #eef1f6;
  overflow: hidden;
}

.order-pick-complete-stats li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #f1f5f9;
}

.order-pick-complete-stats li:last-child {
  border-bottom: 0;
}

.order-pick-complete-stat-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.order-pick-complete-stat-ico--blue {
  background: #eff6ff;
  color: #2563eb;
}

.order-pick-complete-stat-ico--green {
  background: #ecfdf5;
  color: #16a34a;
}

.order-pick-complete-stats strong {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  text-align: right;
}

.order-pick-complete-items-title {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
}

.order-pick-complete-group {
  margin-bottom: 12px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #eef1f6;
  overflow: hidden;
}

.order-pick-complete-group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
}

.order-pick-complete-group--pack .order-pick-complete-group-head strong {
  color: #16a34a;
}

.order-pick-complete-group--piece .order-pick-complete-group-head strong {
  color: #2563eb;
}

.order-pick-complete-group--pack .order-pick-complete-group-ico {
  color: #16a34a;
}

.order-pick-complete-group--piece .order-pick-complete-group-ico {
  color: #2563eb;
}

.order-pick-complete-group-head strong {
  flex: 1;
  font-size: 15px;
}

.order-pick-complete-group-badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.order-pick-complete-group--pack .order-pick-complete-group-badge {
  background: #ecfdf5;
  color: #16a34a;
}

.order-pick-complete-group--piece .order-pick-complete-group-badge {
  background: #eff6ff;
  color: #2563eb;
}

.order-pick-complete-item {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) 24px;
  gap: 10px;
  align-items: start;
  padding: 4px 0;
  border-bottom: 1px solid #f1f5f9;
}

.order-pick-complete-item:last-child {
  border-bottom: 0;
}

.order-pick-complete-item-img {
  width: 70px;
  height: 70px;
  border-radius: 10px;
  object-fit: cover;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.order-pick-complete-item-img--empty {
  display: block;
}

.order-pick-complete-item-name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  color: #0f172a;
  margin-bottom: 2px;
}

.order-pick-complete-item-qty,
.order-pick-complete-item-price {
  display: block;
  font-size: 12px;
  color: #64748b;
}

.order-pick-complete-item-price {
  font-weight: 700;
  color: #0f172a;
  margin-top: 2px;
}

.order-pick-complete-item-check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ecfdf5;
  color: #16a34a;
}

.order-pick-complete-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: #fff;
  border-top: 1px solid #e8edf3;
  box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.06);
}

.order-pick-complete-footer-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  border-radius: 14px;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
}

.order-pick-complete-footer-btn--ghost {
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #0f172a;
}

.order-pick-complete-footer-btn--primary {
  border: 0;
  background: #007aff;
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 122, 255, 0.28);
}

.order-pick-report-host .order-pick-complete {
  min-height: auto;
  margin: 0 -4px;
  border-radius: 18px;
  overflow: hidden;
}

.order-pick-report-host .order-pick-complete-head {
  padding-top: 12px;
}

.order-pick-report-host .order-pick-complete-footer {
  position: sticky;
  bottom: 0;
}

@media print {
  body * {
    visibility: hidden;
  }
  .order-pick-complete,
  .order-pick-complete * {
    visibility: visible;
  }
  .order-pick-complete {
    position: absolute;
    inset: 0;
  }
  .order-pick-complete-footer {
    display: none;
  }
}

.order-pick-panel-footer,
.order-pick-wizard-footer.order-pick-panel-footer {
  position: sticky;
  bottom: 0;
  z-index: 6;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
  background: #fff;
}

.order-pick-footer-btn {
  border-radius: 12px;
  padding: 14px 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  width: 100%;
}

.order-pick-footer-btn--ghost {
  background: #fff;
  color: #334155;
}

.order-pick-footer-btn--primary {
  background: #0f172a;
  color: #fff;
  border-color: #0f172a;
}

.order-pick-footer-btn--danger {
  background: #dc2626;
  color: #fff;
  border-color: #dc2626;
}

.order-pick-footer-btn--danger:hover {
  background: #b91c1c;
  border-color: #b91c1c;
}

.order-pick-footer-btn--primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.order-pick-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10100;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.order-pick-modal {
  width: 100%;
  max-width: 400px;
  padding: 18px;
}

.order-pick-modal-title {
  margin: 0 0 8px;
  font-size: 17px;
}

.order-pick-modal-sub {
  margin: 0 0 14px;
  font-size: 14px;
  text-align: center;
}

.order-pick-modal-need {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.order-pick-modal-lead {
  margin: 0 0 12px;
  font-size: 13px;
}

.order-pick-modal-fields {
  display: grid;
  gap: 10px;
}

.order-pick-modal-error {
  margin: 10px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: #dc2626;
}

.order-pick-modal-error.hidden {
  display: none;
}

.order-pick-field {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 4px 8px;
  margin: 0;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: 13px;
}

.order-pick-field-label {
  font-weight: 700;
  color: #0f172a;
}

.order-pick-field-hint {
  font-size: 12px;
  text-align: right;
}

.order-pick-qty-input {
  grid-column: 1 / -1;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  background: #fff;
}

.order-pick-field input {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 16px;
}

.order-pick-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.pick-mode-chooser-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.pick-mode-chooser {
  width: min(420px, 94vw);
  padding: 16px;
  border-radius: 14px;
}

.pick-mode-chooser-title {
  margin: 0 0 12px;
  font-size: 18px;
}

.pick-mode-chooser-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.order-pick-pause-btn {
  border: 1px solid #dbe4f0;
  background: #fff;
  color: #0f172a;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 10px;
  width: auto;
  min-width: 0;
  flex: 0 0 auto;
  white-space: nowrap;
}

.order-pick-card-inner--dating {
  border: 1px solid #e6edf8;
  border-radius: 20px;
  padding: 12px;
  background: #fff;
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 8px;
}

.order-pick-card-tags {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.order-pick-dating-zones {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 560px) 1fr;
  align-items: center;
  gap: 8px;
}

.order-pick-dating-zone {
  min-height: 280px;
  border: 2px solid;
  border-radius: 26px;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  transform: rotate(-8deg);
}

.order-pick-dating-zone--ok {
  border-color: #86efac;
  color: #166534;
  transform: rotate(8deg);
}

.order-pick-dating-zone--no {
  border-color: #fda4af;
  color: #991b1b;
}

.order-pick-dating-zone-icon {
  font-size: 42px;
  line-height: 1;
}

.order-pick-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 4px 0 8px;
}

.order-pick-dots span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #cbd5e1;
}

.order-pick-dots .is-active {
  background: #0b74ff;
}

.order-pick-card-inner--dating .order-pick-photo {
  width: min(320px, 62vw);
  height: min(420px, 52vh);
  object-fit: contain;
  border: 0;
  background: transparent;
}

.order-pick-dating-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 14px 0 10px;
}

.order-pick-dating-actions .order-pick-act {
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #0f172a;
  display: grid;
  gap: 4px;
  justify-items: center;
  padding: 12px 10px;
}

.order-pick-dating-actions .order-pick-act small {
  color: #64748b;
  font-size: 12px;
}

.order-pick-dating-secondary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

@media (max-width: 720px) {
  .orders-table-wrap {
    margin: 0 -8px;
    border-radius: 0;
  }
}

/* —— Собранный заказ (сборщик) —— */
.pick-collected {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
  box-sizing: border-box;
  background: #f8fafc;
  color: #0f172a;
}

.pick-collected--overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  height: 100dvh;
  height: 100svh;
  max-height: 100dvh;
  max-height: 100svh;
}

.pick-collected-head {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  padding: calc(
      var(
        --order-pick-safe-top,
        var(--mini-fullscreen-safe-top, calc(var(--mini-app-safe-top, env(safe-area-inset-top, 0px)) + 20px))
      ) + env(safe-area-inset-top, 0px) + 10px
    )
    14px 12px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  box-sizing: border-box;
}

.pick-collected-head-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: #f1f5f9;
  color: #0f172a;
  cursor: pointer;
}

.pick-collected-head-center {
  min-width: 0;
}

.pick-collected-head-title {
  display: block;
  font-size: 17px;
  font-weight: 800;
}

.pick-collected-head-code {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #2563eb;
  margin-top: 2px;
}

.pick-collected-head-sub {
  display: block;
  font-size: 12px;
  margin-top: 2px;
}

.pick-collected-head-badge {
  padding: 6px 10px;
  border-radius: 999px;
  background: #dcfce7;
  color: #16a34a;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.pick-collected-stats-bar {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 10px 14px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  font-size: 12px;
  color: #64748b;
}

.pick-collected-stats-bar strong {
  color: #0f172a;
}

.pick-collected-stats-bar--green strong {
  color: #16a34a;
}

.pick-collected-stats-bar--orange strong {
  color: #ea580c;
}

.pick-collected-stats-bar--red strong {
  color: #dc2626;
}

.pick-collected-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding: 12px 14px 16px;
}

.pick-collected-section {
  margin-bottom: 18px;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

.pick-collected-section-title {
  margin: 0 0 8px;
  padding: 0;
  font-size: 13px;
  font-weight: 800;
}

.pick-collected-section--full .pick-collected-section-title {
  color: #166534;
}

.pick-collected-section--partial .pick-collected-section-title {
  color: #c2410c;
}

.pick-collected-section--none .pick-collected-section-title {
  color: #b91c1c;
}

.pick-collected-section--replaced .pick-collected-section-title {
  color: #1d4ed8;
}

.pick-collected-line {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 8px 0;
  background: transparent;
  border-bottom: 1px solid #eef2f7;
}

.pick-collected-section-list .pick-collected-line:last-child {
  border-bottom: 0;
}

.pick-collected-line.is-removed {
  opacity: 0.55;
}

.pick-collected-thumb {
  width: 70px;
  height: 70px;
  border-radius: 10px;
  object-fit: cover;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.pick-collected-thumb--empty {
  display: block;
}

.pick-collected-line-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  color: #0f172a;
}

.pick-collected-line-sub {
  display: block;
  font-size: 12px;
  line-height: 1.25;
  color: #64748b;
  margin-top: 2px;
}

.pick-collected-line-meta {
  display: block;
  font-size: 12px;
  margin-top: 4px;
}

.pick-collected-line-warn {
  display: block;
  font-size: 12px;
  color: #ea580c;
  font-weight: 600;
  margin-top: 2px;
}

.pick-collected-line-price {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-top: 4px;
}

.pick-collected-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
  align-self: center;
}

.pick-collected-pill--green {
  background: #dcfce7;
  color: #16a34a;
}

.pick-collected-pill--orange {
  background: #ffedd5;
  color: #ea580c;
}

.pick-collected-pill--red {
  background: #fee2e2;
  color: #dc2626;
}

.pick-collected-pill--blue {
  background: #dbeafe;
  color: #2563eb;
}

.pick-collected-pill--muted {
  background: #f1f5f9;
  color: #64748b;
}

.pick-collected-none-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.pick-collected-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  background: #fff;
}

.pick-collected-btn--danger {
  border: 1.5px solid #fca5a5;
  color: #dc2626;
}

.pick-collected-btn--blue {
  border: 1.5px solid #93c5fd;
  color: #2563eb;
}

.pick-collected-none-hint {
  margin: 8px 0 0;
  font-size: 11px;
}

.pick-collected-replace-group {
  margin: 10px 0 12px;
  border: 1.5px solid #bfdbfe;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(180deg, #f8fbff 0%, #eff6ff 100%);
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.1);
}

.pick-collected-replace-card-head {
  padding: 8px 12px;
  background: #dbeafe;
  border-bottom: 1px solid #bfdbfe;
}

.pick-collected-replace-card-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #1d4ed8;
}

.pick-collected-replace-card-body {
  padding: 10px;
}

.pick-collected-replace-card-side {
  display: block;
}

.pick-collected-replace-card-label {
  display: block;
  margin: 0 0 6px 2px;
  font-size: 11px;
  font-weight: 700;
}

.pick-collected-replace-card-label--new {
  color: #1d4ed8;
}

.pick-collected-replace-group .pick-collected-line {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e2e8f0;
}

.pick-collected-replace-group .pick-collected-line-body {
  min-width: 0;
}

.pick-collected-replace-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 8px 0;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px dashed #93c5fd;
  background: #fff;
  color: #2563eb;
  font-size: 12px;
  font-weight: 700;
}

.pick-collected-line--replaced-old {
  opacity: 0.82;
}

.pick-collected-foot {
  flex-shrink: 0;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  background: #fff;
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08);
  box-sizing: border-box;
}

.pick-collected-totals {
  font-size: 13px;
  margin-bottom: 8px;
}

.pick-collected-total-removed strong {
  color: #dc2626;
}

.pick-collected-total-replace strong {
  color: #2563eb;
}

.pick-collected-total-big {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 800;
  text-align: right;
}

.pick-collected-finish {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: 0;
  background: #16a34a;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 8px;
}

.pick-collected-finish-hint {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.4;
}

.pick-collected-primary,
.pick-collected-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 8px;
}

.pick-collected-primary {
  border: 0;
  background: #2563eb;
  color: #fff;
}

.pick-collected-secondary {
  border: 1.5px solid #93c5fd;
  background: #fff;
  color: #2563eb;
}

.pick-replace-modal {
  max-height: 85vh;
  overflow: auto;
}

.pick-replace-search {
  width: 100%;
  margin: 8px 0;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.pick-replace-results {
  margin-bottom: 10px;
  min-height: 0;
}

.pick-replace-results:not(.pick-replace-results--selected):not(:empty) {
  max-height: min(50vh, 320px);
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.pick-replace-results--selected {
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #eff6ff;
  padding: 10px;
}

.pick-replace-search-hint {
  margin: 10px 12px;
  font-size: 13px;
}

.pick-replace-selected {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.pick-replace-selected-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pick-replace-selected-kicker {
  font-size: 12px;
}

.pick-replace-selected-title {
  color: #0f172a;
  font-size: 15px;
  line-height: 1.35;
}

.pick-replace-change-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: #2563eb;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.pick-replace-source {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.4;
}

.pick-replace-source strong {
  color: #0f172a;
  font-weight: 600;
}

.pick-replace-qty-line {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.4;
  color: #0f172a;
  font-weight: 600;
}

.pick-replace-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: 0;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
}

.pick-replace-item:last-child {
  border-bottom: 0;
}

.pick-replace-item-thumb {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pick-replace-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.pick-replace-item-thumb--empty {
  background: linear-gradient(135deg, #e2e8f0 0%, #f8fafc 100%);
}

.pick-replace-item-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pick-replace-item-title {
  color: #0f172a;
  font-weight: 600;
  line-height: 1.35;
}

.pick-replace-item-price {
  font-size: 13px;
}

.pick-replace-item.is-selected {
  background: #eff6ff;
}

.pick-replace-item.is-selected .pick-replace-item-title {
  color: #2563eb;
}

/* Состав заказа: удалённые и замены (клуб) */
.order-line-item--removed {
  opacity: 0.5;
}

.order-line-item--removed .order-line-text,
.order-line-item--removed .order-line-price {
  text-decoration: line-through;
  color: #94a3b8;
}

.order-line-pick-badge {
  display: inline-block;
  margin-top: 0;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.order-line-aside {
  grid-area: aside;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 4px;
  min-width: 0;
}

.order-line-pick-badge--none {
  background: #fee2e2;
  color: #dc2626;
}

.order-line-pick-badge--partial {
  background: #ffedd5;
  color: #ea580c;
}

.order-line-pick-badge--replaced {
  background: #dbeafe;
  color: #2563eb;
}

.order-line-replace-wrap {
  list-style: none;
  margin: 12px 0;
  padding: 0;
  display: block;
}

.order-line-replace-card {
  border: 1.5px solid #bfdbfe;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(180deg, #f8fbff 0%, #eff6ff 100%);
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.1);
}

.order-line-replace-card-head {
  padding: 8px 12px;
  background: #dbeafe;
  border-bottom: 1px solid #bfdbfe;
}

.order-line-replace-card-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #1d4ed8;
}

.order-line-replace-card-body {
  padding: 10px;
}

.order-line-replace-card-side {
  display: block;
}

.order-line-replace-card-label {
  display: block;
  margin: 0 0 6px 2px;
  font-size: 11px;
  font-weight: 700;
}

.order-line-replace-card-label--new {
  color: #1d4ed8;
}

.order-line-replace-wrap .order-line-item {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 8px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e2e8f0 !important;
}

.order-line-replace-wrap > .order-line-replace-old,
.order-line-replace-wrap > .order-line-replace-new {
  list-style: none;
}

.order-line-replace-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 8px 0;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px dashed #93c5fd;
  background: #fff;
  color: #2563eb;
  font-size: 12px;
  font-weight: 700;
}

.order-line-replace-wrap .order-line-replace-old {
  opacity: 0.82;
}

.order-line-item--replaced-old {
  opacity: 0.82;
}

/* ── Order view: flat sheet UI (Linear / iOS Settings) ── */
.order-view-body {
  background: #fff;
}

.order-view-shell {
  padding: 0 0 calc(56px + env(safe-area-inset-bottom, 0px));
  max-width: 720px;
}

body.order-view--no-footer .order-view-shell {
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}

.mini-app-page.tg-webapp.order-view-body .order-view-shell {
  padding-top: calc(4px + var(--mini-app-safe-top));
}

.order-view-page {
  padding: 0 16px 8px;
}

.order-view-page .mini-orders-back-btn {
  width: 40px;
  min-width: 40px;
  flex-shrink: 0;
}

.order-view-page .ov-head.mini-orders-head {
  margin: 0 -16px 8px;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 16px 10px;
  background: #fff;
  border-bottom: 1px solid #eef2f7;
  position: sticky;
  top: 0;
  z-index: 5;
}

.order-view-page .ov-head-main {
  min-width: 0;
}

.ov-head {
  padding: 0;
}

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

.ov-code {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1.15;
}

.ov-meta {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.35;
}

.ov-sep {
  height: 1px;
  margin: 0 -16px;
  background: #eef2f7;
}

.ov-section {
  padding: 14px 0;
}

.ov-section-label {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
}

.ov-kv {
  display: grid;
  gap: 0;
}

.ov-kv-row {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 9px 0;
  border-top: 1px solid #f1f5f9;
}

.ov-kv-row:first-child {
  border-top: none;
  padding-top: 0;
}

.ov-kv-k {
  font-size: 13px;
  line-height: 1.35;
}

.ov-kv-v {
  font-size: 14px;
  line-height: 1.35;
  color: #0f172a;
  white-space: pre-wrap;
  word-break: break-word;
}

.ov-group {
  margin-top: 12px;
}

.ov-group:first-child {
  margin-top: 0;
}

.ov-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 0 0 6px;
}

.ov-group-title {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
}

.ov-group-meta {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.order-view-page .ov-lines,
.order-view-page ul.order-lines.order-view-lines {
  margin: 0;
  padding: 0;
  list-style: none;
  display: block;
  gap: 0;
  border-top: none;
  padding-top: 0;
}

.order-view-page .order-view-lines .order-line-item {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) auto;
  grid-template-areas:
    "thumb product aside"
    "thumb qty aside";
  gap: 2px 10px;
  align-items: start;
  padding: 4px 0;
  border-top: 1px solid #f1f5f9;
  border-radius: 0;
  background: transparent !important;
}

.order-view-page .order-view-lines .order-line-item:first-child {
  border-top: none;
}

.order-view-page .order-view-lines .order-line-replace-wrap {
  margin: 14px 0;
}

.order-view-page .order-view-lines .order-line-replace-wrap .order-line-item {
  border-top: none !important;
  background: #fff !important;
}

.order-view-page .order-view-lines .order-line-replace-wrap > .order-line-item:first-child {
  border-top: none;
}

.order-view-page .order-view-lines .order-line-replace-wrap > .order-line-item + .order-line-item {
  border-top: none;
}

.order-view-page .order-view-lines .order-line-thumb-wrap,
.order-view-page .order-view-lines .order-line-thumb,
.order-view-page .order-view-lines .order-line-thumb--empty {
  width: 70px;
  height: 70px;
  border-radius: 10px;
}

.order-view-page .order-view-lines .order-line-text {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
}

.order-view-page .order-view-lines .order-line-sub {
  font-size: 12px;
}

.order-view-page .order-view-lines .order-line-qty-block {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}

.order-view-page .order-view-lines .order-line-price {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
}

.order-view-page .order-line-aside {
  min-width: 72px;
}

.order-view-page .order-line-pick-badge {
  font-size: 10px;
  padding: 2px 6px;
  line-height: 1.2;
}

.ov-assemble {
  border-top: 1px solid #eef2f7;
}

.order-view-page .order-assemble-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.order-view-page .order-assemble-btn {
  width: 100%;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #0f172a;
  box-shadow: none;
}

.order-view-page .order-assemble-btn--primary {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
}

.order-view-page .order-assemble-btn--ghost {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #334155;
}

.order-view-page .order-assemble-btn--danger {
  background: #fff;
  border-color: #fecaca;
  color: #dc2626;
}

.order-view-page .order-status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  box-shadow: none !important;
}

.ov-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.ov-actions .order-assemble-btn {
  width: auto;
  min-width: 0;
  flex: 1 1 140px;
  max-width: 100%;
}

.order-pick-progress-top {
  margin: 0 0 12px;
}

.order-pick-progress-top.hidden {
  display: none;
}

.order-pick-progress-vie-card {
  margin: 0;
}

.order-pick-progress-foot {
  margin: 10px 0 0;
  font-size: 12px;
  text-align: center;
}

.order-pick-visinv-progress {
  margin-bottom: 0;
}

.order-pick-visinv-progress--float {
  background: #fff;
  border: none;
  border-radius: 18px;
  padding: 12px 14px 10px;
  box-shadow:
    0 8px 24px rgba(15, 23, 42, 0.1),
    0 2px 6px rgba(15, 23, 42, 0.06);
}

.order-pick-visinv-stats-top {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-bottom: 10px;
}

.order-pick-visinv-stat-main {
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
  line-height: 1.2;
  text-align: center;
}

.order-pick-visinv-stat-main strong {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
}

.order-pick-overlay .order-pick-visinv-progress {
  margin-bottom: 0;
}

.order-pick-overlay .order-pick-visinv-progress .visinv-progress-wrap {
  margin-bottom: 0;
}

.order-pick-report-host.hidden:empty {
  display: none;
}

.order-assemble-btn--secondary {
  border: 1px solid #dbe3ef;
  background: #fff;
  color: #0f172a;
}

.order-missing-cart-dialog:not([open]) {
  display: none;
}

.order-missing-cart-dialog {
  margin: 0;
  padding: 0;
  border: none;
  max-width: 100%;
  width: 100%;
  height: 100%;
  max-height: 100%;
  background: transparent;
  overflow: visible;
}

.order-missing-cart-dialog[open] {
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.order-missing-cart-dialog::backdrop {
  background: rgba(15, 23, 42, 0.42);
}

.order-missing-cart-sheet {
  width: min(100%, 440px);
  margin: 0 auto;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px));
  border-radius: 20px 20px 0 0;
  background: #fff;
  box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.16);
}

.order-missing-cart-title {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  color: #0f172a;
}

.order-missing-cart-hint {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.35;
}

.order-missing-cart-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: min(52vh, 360px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.order-missing-cart-empty {
  margin: 0;
  padding: 20px 14px;
  text-align: center;
  font-size: 13px;
}

.order-missing-cart-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px 8px 12px;
  background: #fff;
  border-top: 1px solid #eef2f7;
}

.order-missing-cart-item:first-child {
  border-top: 0;
}

.order-missing-cart-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.order-missing-cart-row-main {
  min-width: 0;
}

.order-missing-cart-remove {
  flex-shrink: 0;
  border: 0;
  border-radius: 10px;
  padding: 8px 10px;
  background: #fee2e2;
  color: #dc2626;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.order-missing-cart-thumb {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  overflow: hidden;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.order-missing-cart-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.order-missing-cart-thumb--empty {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e2e8f0 0%, #f8fafc 100%);
}

.order-missing-cart-row-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: #0f172a;
  word-break: break-word;
}

.order-missing-cart-row-qty {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.3;
  color: #64748b;
}

.order-missing-cart-confirm {
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 14px 16px;
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.order-missing-cart-confirm:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.order-missing-cart-anim {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
}

.order-missing-cart-anim.hidden {
  display: none !important;
}

.order-missing-cart-anim-card {
  width: min(100%, 320px);
  padding: 20px 18px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.2);
  text-align: center;
}

.order-missing-cart-anim-text {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
}

.order-missing-cart-anim-bar {
  height: 6px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.order-missing-cart-anim-bar-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3b82f6, #2563eb);
  transition: width 0.2s ease;
}

.pick-waybill-loading {
  position: fixed;
  inset: 0;
  z-index: 12500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(5px);
}

.pick-waybill-loading.hidden {
  display: none !important;
}

.pick-waybill-loading-card {
  width: min(100%, 340px);
  padding: 24px 20px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.22);
  text-align: center;
}

.pick-waybill-loading-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  color: #2563eb;
  animation: pick-waybill-ico-pulse 1.1s ease-in-out infinite;
}

.pick-waybill-loading-ico svg {
  display: block;
}

@keyframes pick-waybill-ico-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.06);
    opacity: 0.88;
  }
}

.pick-waybill-loading-text {
  margin: 0 0 14px;
  min-height: 1.35em;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  transition: opacity 0.15s ease;
}

.pick-waybill-loading-bar {
  height: 7px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
  margin-bottom: 12px;
}

.pick-waybill-loading-bar-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3b82f6, #1d4ed8);
  transition: width 0.35s ease;
}

.pick-waybill-loading-open {
  width: 100%;
  margin-top: 4px;
  padding: 12px 16px;
  border: 0;
  border-radius: 12px;
  background: #2563eb;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}

.pick-waybill-loading-open.hidden {
  display: none !important;
}

.pick-waybill-loading-err {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.35;
}

.pick-waybill-loading-err.hidden {
  display: none !important;
}

body.pick-waybill-open {
  overflow: hidden;
}

.pick-waybill-viewer {
  position: fixed;
  inset: 0;
  z-index: 12600;
  display: flex;
  flex-direction: column;
  padding: 0;
  background: #fff;
}

.pick-waybill-viewer.hidden {
  display: none !important;
}

.pick-waybill-viewer-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0;
  background: #fff;
  box-shadow: none;
}

.pick-waybill-viewer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  padding-top: max(12px, env(safe-area-inset-top, 0px));
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.pick-waybill-viewer-title {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
}

.pick-waybill-viewer-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: #f1f5f9;
  font-size: 22px;
  line-height: 1;
  color: #475569;
}

.pick-waybill-viewer-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
}

.pick-waybill-viewer-frame {
  flex: 1;
  width: 100%;
  min-height: 0;
  border: 0;
  background: #f8fafc;
}

.pick-waybill-viewer-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px;
  padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.pick-waybill-viewer-btn {
  flex: 1;
  min-width: 140px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  background: #fff;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  text-align: center;
  text-decoration: none;
}

.pick-waybill-viewer-btn--primary {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.pick-waybill-viewer-btn:disabled {
  opacity: 0.55;
}

.ov-timeline.order-status-history-list {
  gap: 8px;
  margin: 0;
  padding: 0;
}

.ov-timeline .order-status-history-main strong {
  font-size: 14px;
  font-weight: 600;
}

.ov-timeline .order-status-history-main .muted {
  font-size: 12px;
}

.ov-msg {
  margin: 8px 0 0;
  min-height: 1.2em;
  font-size: 13px;
}

.order-view-page .order-pick-report-host {
  margin-top: 10px;
}

.order-view-page .order-pick-report {
  border: 1px solid #eef2f7;
  border-radius: 12px;
  padding: 12px;
  background: #fafbfc;
  box-shadow: none;
}

/* ── Стартовые пакеты (mini app) ── */
body.mini-has-starter-nav .footer-nav {
  gap: 2px;
}

/* ── Обращения (mini app, управляющий) ── */
body.mini-support-open {
  overflow: hidden;
}

body.mini-support-open #mini-support-section {
  display: flex !important;
  position: fixed;
  inset: 0;
  z-index: 320;
  background: #f8f9fb;
  box-sizing: border-box;
  padding-top: var(--mini-fullscreen-safe-top, calc(env(safe-area-inset-top, 0px) + 20px));
  padding-left: var(--mini-side-pad, 12px);
  padding-right: var(--mini-side-pad, 12px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

body.mini-support-open #mini-support-section.hidden {
  display: flex !important;
}

.mini-support-screen {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 100%;
  box-sizing: border-box;
}

.mini-support-view {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.mini-support-view.hidden {
  display: none;
}

.mini-support-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0 0 24px;
  -webkit-overflow-scrolling: touch;
}

.mini-support-topbar {
  padding: 0 0 4px;
}

.mini-support-back-link {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 6px 0;
  border: none;
  background: none;
  color: #7c3aed;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.mini-support-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 18px;
}

.mini-support-hero-title {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #0f172a;
}

.mini-support-hero-lead {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.45;
  color: #64748b;
  max-width: 220px;
}

.mini-support-hero-art {
  flex-shrink: 0;
  margin-top: -4px;
}

.mini-support-create-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin: 0 0 22px;
  padding: 16px 18px;
  border: none;
  border-radius: 18px;
  background: linear-gradient(135deg, #7c5cff 0%, #6d4aff 55%, #6346e8 100%);
  color: #fff;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(109, 74, 255, 0.35);
}

.mini-support-create-banner:active {
  transform: scale(0.99);
}

.mini-support-create-banner-ico {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mini-support-create-banner-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mini-support-create-banner-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
}

.mini-support-create-banner-sub {
  font-size: 13px;
  line-height: 1.35;
  opacity: 0.92;
}

.mini-support-create-banner-chevron {
  flex-shrink: 0;
  opacity: 0.95;
}

.mini-support-section-title {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
}

.mini-support-filters {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 14px;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
}

.mini-support-filters::-webkit-scrollbar {
  display: none;
}

.mini-support-filter {
  flex-shrink: 0;
  padding: 8px 16px;
  border: none;
  border-radius: 999px;
  background: #e8eaef;
  color: #64748b;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.mini-support-filter.is-active {
  background: #6d4aff;
  color: #fff;
  box-shadow: 0 4px 14px rgba(109, 74, 255, 0.28);
}

.mini-support-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.mini-support-loading,
.mini-support-empty {
  padding: 20px 8px;
  text-align: center;
  font-size: 14px;
  color: #64748b;
}

.mini-support-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 10px 12px;
  width: 100%;
  padding: 14px 14px 14px 12px;
  border: none;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
  text-align: left;
  cursor: pointer;
}

.mini-support-card:active {
  background: #fafafa;
}

.mini-support-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  margin-top: 2px;
}

.mini-support-badge--new {
  background: #ede9fe;
  color: #6d28d9;
}

.mini-support-badge--progress {
  background: #ffedd5;
  color: #c2410c;
}

.mini-support-badge--awaiting {
  background: #dbeafe;
  color: #1d4ed8;
}

.mini-support-badge--closed {
  background: #dcfce7;
  color: #15803d;
}

.mini-support-card-main {
  min-width: 0;
}

.mini-support-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.mini-support-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}

.mini-support-card-date {
  flex-shrink: 0;
  font-size: 13px;
  color: #94a3b8;
  font-weight: 500;
}

.mini-support-card-preview {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: #64748b;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mini-support-card-chevron {
  color: #cbd5e1;
  font-size: 22px;
  line-height: 1;
  margin-top: 6px;
  font-weight: 300;
}

.mini-support-help-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  background: #f3efff;
  border: 1px solid #e9e0ff;
  cursor: pointer;
  box-sizing: border-box;
}

.mini-support-help-ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #ede9fe;
  color: #7c3aed;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mini-support-help-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mini-support-help-text strong {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.mini-support-help-text span {
  font-size: 13px;
  color: #64748b;
  line-height: 1.35;
}

.mini-support-help-go {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #6d4aff;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* create / thread */
.mini-support-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0 12px;
  flex-shrink: 0;
  background: transparent;
  border-bottom: 1px solid #e8ecf4;
  margin: 0 0 4px;
}

.mini-support-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}

.mini-support-title--thread {
  font-size: 16px;
  line-height: 1.25;
}

.mini-support-thread-head-text {
  min-width: 0;
  flex: 1;
}

.mini-support-thread-meta {
  margin: 4px 0 0;
  font-size: 12px;
  color: #64748b;
}

.mini-support-form {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0 0 16px;
  -webkit-overflow-scrolling: touch;
}

/* ── Уведомления (полноэкран, управляющий) ── */
body.mini-mgr-notif-open {
  overflow: hidden;
}

body.mini-mgr-notif-open #mini-mgr-notif-section {
  display: flex !important;
  position: fixed;
  inset: 0;
  z-index: 320;
  background: #f8f9fb;
  box-sizing: border-box;
  flex-direction: column;
  padding-top: var(--mini-fullscreen-safe-top, calc(env(safe-area-inset-top, 0px) + 20px));
  padding-left: var(--mini-side-pad, 12px);
  padding-right: var(--mini-side-pad, 12px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.mini-mgr-notif-screen {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
  flex: 1;
}

.mini-mgr-notif-screen.hidden {
  display: none !important;
}

.mini-mgr-notif-head {
  display: grid;
  grid-template-columns: minmax(72px, auto) 1fr minmax(40px, auto);
  align-items: center;
  gap: 8px;
  padding: 0 0 12px;
  flex-shrink: 0;
}

.mini-mgr-notif-title {
  margin: 0;
  text-align: center;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #1a1c21;
}

.mini-mgr-notif-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 24px;
}

body.mini-mgr-notif-open .mini-mgr-notif-scroll .mini-notif-list--profile {
  padding: 0;
}

.mini-support-form label {
  display: block;
  margin: 12px 0 6px;
  font-weight: 600;
  font-size: 14px;
}

.mini-support-form input,
.mini-support-form textarea,
.mini-support-reply-form textarea {
  width: 100%;
  box-sizing: border-box;
  font-size: 16px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 12px;
}

.mini-support-submit {
  width: 100%;
  margin-top: 16px;
  border-radius: 14px;
  background: #6d4aff;
  color: #fff;
  border: none;
  padding: 14px;
  font-weight: 700;
  font-size: 16px;
}

.mini-support-view--thread {
  background: #f4f5f9;
}

.mini-support-thread-messages {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  -webkit-overflow-scrolling: touch;
}

.mini-support-closed-note {
  padding: 0 16px 8px;
  font-size: 13px;
  color: #64748b;
}

.mini-support-reply-bar {
  flex-shrink: 0;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #e2e8f0;
  background: #fff;
}

.mini-support-reply-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mini-support-attach-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.mini-support-attach-btn {
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  font-family: inherit;
}

.mini-support-attach-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mini-support-attach-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 8px;
  background: #ede9fe;
  font-size: 11px;
  color: #5b21b6;
}

.mini-support-attach-chip button {
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  color: #7c3aed;
}

.mgr-support-msg-attachments {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.mgr-support-attach-img {
  display: block;
  max-width: min(260px, 100%);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.mgr-support-attach-img img {
  display: block;
  max-width: 100%;
  height: auto;
}

.mgr-support-attach-file {
  font-size: 13px;
  color: #2563eb;
  text-decoration: none;
}

.mini-support-reply-form.hidden {
  display: none;
}

.mgr-support-msg {
  border-radius: 14px;
  padding: 10px 12px;
  max-width: 88%;
}

.mgr-support-msg--mine {
  align-self: flex-end;
  background: #ede9fe;
  border: 1px solid #ddd6fe;
}

.mgr-support-msg--support {
  align-self: flex-start;
  background: #fff;
  border: 1px solid #e2e8f0;
}

.mgr-support-msg-head {
  font-size: 11px;
  margin-bottom: 4px;
  color: #94a3b8;
}

.mgr-support-msg-body {
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  color: #0f172a;
}

body.mini-client-cabinet #mini-support-section,
body.mini-client-cabinet #mgr-support-open-btn {
  display: none !important;
}

#mini-nav-starter-packs.hidden {
  display: none !important;
}

#mini-nav-starter-packs .footer-nav-btn__svg {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 28px;
  display: block;
  pointer-events: none;
}

#mini-nav-starter-packs .footer-nav-btn__svg--active {
  display: none;
}

#mini-nav-starter-packs.active .footer-nav-btn__svg--inactive {
  display: none;
}

#mini-nav-starter-packs.active .footer-nav-btn__svg--active {
  display: block;
}

.mini-sp-screen {
  padding: 0 12px 88px;
}

.mini-sp-header {
  padding: 4px 4px 14px;
}

.mini-sp-title {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.mini-sp-sub {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.4;
}

.mini-sp-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mini-sp-empty {
  text-align: center;
  padding: 32px 12px;
}

.mini-sp-card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 10px 12px;
  padding: 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.mini-sp-card-thumb {
  grid-row: 1 / 3;
  width: 88px;
  height: 88px;
  border-radius: 12px;
  background: #f8fafc;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mini-sp-card-thumb-img,
.mini-sp-card-thumb-grid img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.mini-sp-card-thumb-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  width: 100%;
  height: 100%;
  gap: 2px;
  padding: 4px;
  box-sizing: border-box;
}

.mini-sp-card-thumb-empty {
  font-size: 28px;
}

.mini-sp-card-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.mini-sp-card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
}

.mini-sp-card-badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 11px;
  font-weight: 700;
}

.mini-sp-card-desc {
  margin: 4px 0 8px;
  font-size: 12px;
  line-height: 1.35;
}

.mini-sp-card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.mini-sp-stat {
  font-size: 11px;
  color: #64748b;
}

.mini-sp-stat--discount {
  color: #16a34a;
  font-weight: 700;
}

.mini-sp-card-side {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.mini-sp-card-price {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
}

.mini-sp-card-benefit {
  font-size: 11px;
  color: #16a34a;
  font-weight: 600;
}

.mini-sp-card-btn {
  margin-top: 6px;
  width: 100%;
  max-width: 180px;
  border: none;
  border-radius: 12px;
  background: #7c3aed;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 12px;
  cursor: pointer;
}

.mini-sp-card-link {
  border: none;
  background: none;
  color: #2563eb;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 0;
  cursor: pointer;
}

@media (max-width: 420px) {
  .mini-sp-card {
    grid-template-columns: 72px minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    gap: 8px 10px;
    padding: 12px;
  }

  .mini-sp-card-thumb {
    grid-row: 1;
    width: 72px;
    height: 72px;
  }

  .mini-sp-card-body {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
  }

  .mini-sp-card-side {
    grid-column: 1 / -1;
    grid-row: 3;
    align-items: stretch;
    width: 100%;
  }

  .mini-sp-card-btn {
    max-width: none;
  }

  .mini-sp-card-price {
    align-self: flex-start;
  }
}

.mini-sp-dialog-status {
  margin: 0 0 8px;
  font-size: 13px;
  text-align: center;
}

.mini-sp-dialog-status--error {
  color: #dc2626;
}

.visinv-full-hist-status {
  margin: 0 12px 8px;
  font-size: 13px;
}

.visinv-full-hist-status:not(.hidden) {
  display: block;
}

.visinv-full-hist-status--error {
  color: #dc2626;
}

.mini-user-toast-root {
  position: fixed;
  left: max(12px, env(safe-area-inset-left, 0px));
  right: max(12px, env(safe-area-inset-right, 0px));
  bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  z-index: 10050;
  max-width: 480px;
  margin: 0 auto;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.35;
  text-align: center;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.2);
  transform: translateY(120%);
  opacity: 0;
  transition: transform 0.22s ease, opacity 0.22s ease;
  pointer-events: none;
  box-sizing: border-box;
}

body.employee-mode .mini-user-toast-root,
body.mini-support-open .mini-user-toast-root {
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}

.mini-user-toast-root.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.mini-user-toast-root--info {
  background: #1e293b;
  color: #f8fafc;
}

.mini-user-toast-root--success {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.mini-user-toast-root--error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.mini-starter-pack-dialog {
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: #f8fafc;
}

.mini-starter-pack-dialog::backdrop {
  background: rgba(15, 23, 42, 0.35);
}

.mini-starter-pack-dialog-inner {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  max-height: 100dvh;
}

.mini-starter-pack-dialog-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}

.mini-starter-pack-dialog-body {
  flex: 1;
  overflow: auto;
  padding: 12px 14px 88px;
}

.mini-sp-dialog-desc {
  margin: 0 0 12px;
  font-size: 13px;
}

.mini-sp-item-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mini-sp-item-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  gap: 4px 10px;
  padding: 10px 12px;
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
}

.mini-sp-item-thumb {
  grid-row: 1 / 3;
  width: 52px;
  height: 56px;
  object-fit: contain;
  border-radius: 8px;
  background: #f8fafc;
}

.mini-sp-item-thumb--empty {
  display: block;
}

.mini-sp-item-title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}

.mini-sp-item-meta {
  margin: 0;
  font-size: 11px;
}

.mini-sp-item-stepper {
  grid-column: 3;
  grid-row: 1 / 3;
  display: flex;
  align-items: center;
  gap: 4px;
}

.mini-sp-qty-btn {
  width: 28px;
  height: 28px;
  padding: 0;
}

.mini-sp-qty-val {
  min-width: 52px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}

.mini-sp-item-price {
  grid-column: 2;
  font-size: 12px;
  color: #64748b;
}

.mini-starter-pack-dialog-footer {
  position: sticky;
  bottom: 0;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  background: #fff;
  border-top: 1px solid #e2e8f0;
}

.mini-sp-dialog-cart-btn {
  width: 100%;
  border: none;
  border-radius: 14px;
  background: #2563eb;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 14px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.mini-sp-dialog-cart-btn:disabled {
  opacity: 0.7;
}

@media (max-width: 420px) {
  .mini-sp-card {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .mini-sp-card-thumb {
    width: 72px;
    height: 72px;
  }

  .mini-sp-card-side {
    align-items: stretch;
  }

  .mini-sp-card-btn {
    max-width: none;
  }
}
