/* Cabinet UI — extends site styles */

html:has(.cabinet-page) {
  /* Prevent browser scroll-anchoring from "nudging" the page when panels reflow */
  overflow-anchor: none;
  overscroll-behavior-y: none;
}

.cabinet-page {
  --cab-ink: #0f172a;
  --cab-ink-2: #334155;
  --cab-muted: #64748b;
  --cab-line: #e2e8f0;
  --cab-line-strong: #d0d9ea;
  --cab-surface: #ffffff;
  --cab-surface-soft: #f8fafc;
  --cab-plate: #f1f5f9;
  --cab-hover: rgba(36, 93, 255, 0.06);
  --cab-accent: #245dff;
  --cab-accent-soft: rgba(36, 93, 255, 0.1);
  --cab-radius: 14px;
  --cab-radius-sm: 10px;
  --cab-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 14px rgba(24, 54, 120, 0.04);
  --cab-shadow-hover: 0 2px 4px rgba(15, 23, 42, 0.05), 0 8px 20px rgba(24, 54, 120, 0.07);

  min-height: 100vh;
  overflow-anchor: none;
  overscroll-behavior-y: none;
  color: var(--cab-ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(36, 93, 255, 0.1), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(31, 143, 255, 0.08), transparent 50%),
    linear-gradient(180deg, #f7f9ff 0%, #eef2fb 45%, #f8fafc 100%);
}

.staff-urgent,
.staff-receptions,
.receptions-calendar {
  overflow-anchor: none;
  min-height: 12rem;
}

.cabinet-main {
  padding-bottom: 64px;
}

.cabinet-auth {
  max-width: 440px;
  margin: 0 auto;
}

.cabinet-lead {
  color: var(--cab-muted);
  margin: 8px 0 24px;
  line-height: 1.5;
}

.cabinet-form {
  display: grid;
  gap: 14px;
}

.cabinet-form label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  color: var(--cab-ink-2);
  font-weight: 600;
}

.cabinet-form input,
.cabinet-form select {
  width: 100%;
  border: 1px solid var(--cab-line-strong);
  border-radius: var(--cab-radius-sm);
  padding: 12px 14px;
  font-size: 15px;
  background: var(--cab-surface);
  color: var(--cab-ink);
  box-sizing: border-box;
}

.cabinet-form input:focus,
.cabinet-form select:focus {
  outline: 2px solid rgba(36, 93, 255, 0.28);
  border-color: var(--cab-accent);
}

.cabinet-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid var(--cab-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.8);
}

.cabinet-span-2 {
  grid-column: span 2;
}

.cabinet-error {
  color: #b42318;
  margin: 0;
  font-size: 14px;
}

.cabinet-ok,
.cabinet-status {
  color: #067647;
  margin: 0;
  font-size: 14px;
}

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

.cabinet-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.cabinet-top h1 {
  margin: 0;
  font-size: clamp(1.55rem, 2.2vw, 1.85rem);
  letter-spacing: -0.02em;
  color: var(--cab-ink);
  line-height: 1.2;
}

.cabinet-top .cabinet-lead {
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
}

.cabinet-owner-banner a {
  color: inherit;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cabinet-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  margin: 18px 0 20px;
  padding: 5px;
  border: 1px solid var(--cab-line);
  border-radius: 14px;
  background: var(--cab-plate);
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.cabinet-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--cab-ink-2);
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.55rem 0.95rem;
  border-radius: var(--cab-radius-sm);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  line-height: 1.2;
  white-space: nowrap;
  flex: 0 0 auto;
}

.cabinet-tab[hidden] {
  display: none !important;
}

a.cabinet-tab:hover,
.cabinet-tab:hover {
  color: #1d4ed8;
  background: rgba(255, 255, 255, 0.7);
}

.cabinet-tab.active {
  background: var(--cab-surface);
  color: #1d4ed8;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

/* Cmd/Ctrl+K command palette */
.cab-cmdk {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: start center;
  padding: min(12vh, 5rem) 1rem 1rem;
}

.cab-cmdk[hidden] {
  display: none !important;
}

.cab-cmdk-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 23, 42, 0.42);
  cursor: pointer;
}

.cab-cmdk-dialog {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: min(70vh, 520px);
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  border: 1px solid var(--cab-line, #e2e8f0);
  background: #fff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.22);
  overflow: hidden;
}

.cab-cmdk-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 0.95rem;
  border-bottom: 1px solid var(--cab-line, #e2e8f0);
}

.cab-cmdk-icon {
  color: #94a3b8;
  font-size: 1.1rem;
  line-height: 1;
}

.cab-cmdk-input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 1rem;
  color: var(--cab-ink, #0f172a);
}

.cab-cmdk-esc {
  flex: 0 0 auto;
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  border: 1px solid var(--cab-line, #e2e8f0);
  background: var(--cab-plate, #f1f5f9);
  color: var(--cab-muted, #64748b);
  font-size: 0.7rem;
  font-family: inherit;
  font-weight: 700;
  text-transform: uppercase;
}

.cab-cmdk-hint {
  padding: 0.4rem 0.95rem 0.15rem;
  font-size: 0.75rem;
  color: var(--cab-muted, #64748b);
}

.cab-cmdk-list {
  overflow: auto;
  padding: 0.35rem 0.45rem 0.55rem;
  flex: 1 1 auto;
}

.cab-cmdk-group {
  padding: 0.55rem 0.55rem 0.25rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cab-muted, #64748b);
}

.cab-cmdk-item {
  display: grid;
  gap: 0.1rem;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.cab-cmdk-item:hover,
.cab-cmdk-item.is-active {
  background: rgba(36, 93, 255, 0.08);
}

.cab-cmdk-item-title {
  font-weight: 700;
  color: var(--cab-ink, #0f172a);
  font-size: 0.92rem;
  line-height: 1.3;
}

.cab-cmdk-item-sub {
  font-size: 0.78rem;
  color: var(--cab-muted, #64748b);
  line-height: 1.35;
}

.cab-cmdk-empty {
  margin: 0;
  padding: 1.25rem 0.75rem;
  text-align: center;
  color: var(--cab-muted, #64748b);
  font-size: 0.9rem;
}

body.cab-cmdk-open {
  overflow: hidden;
}

.cab-cmdk-trigger kbd {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.05rem 0.35rem;
  border-radius: 5px;
  border: 1px solid rgba(36, 93, 255, 0.25);
  background: rgba(36, 93, 255, 0.06);
  font-size: 0.7rem;
  font-family: inherit;
  font-weight: 700;
  color: #1d4ed8;
}

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

.cabinet-panel-head h2 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: -0.015em;
  color: var(--cab-ink);
}

.cabinet-panel-head .cabinet-muted {
  font-size: 0.9rem;
  line-height: 1.4;
}

.cabinet-panel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cabinet-panel[hidden] {
  display: none !important;
}

.products-import-panel {
  margin: 4px 0 8px;
}

.products-import-panel[hidden] {
  display: none !important;
}

.products-import-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 14px 0 8px;
}

.products-import-card {
  background: var(--cab-surface);
  border: 1px solid var(--cab-line);
  border-radius: var(--cab-radius);
  padding: 16px;
  box-shadow: var(--cab-shadow);
}

.products-import-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.products-file-label {
  cursor: pointer;
}

.products-guide {
  margin-top: 14px;
  padding: 12px 14px;
  background: #f3f6fb;
  border: 1px solid #d7dee9;
  border-radius: 12px;
}

.products-guide h4 {
  margin: 0 0 8px;
  font-size: 14px;
}

.products-guide ol {
  margin: 0 0 8px;
  padding-left: 18px;
}

.products-guide li {
  margin: 0 0 6px;
  font-size: 13px;
  line-height: 1.4;
  color: #374151;
}

.products-guide[hidden] {
  display: none !important;
}

.products-attrs {
  font-size: 12px;
  line-height: 1.35;
  max-width: 280px;
}

.products-table-compact {
  table-layout: fixed;
  width: 100%;
}

.products-table-compact th,
.products-table-compact td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  padding: 10px 12px;
}

.products-table-compact th:nth-child(6),
.products-table-compact td:nth-child(6) {
  width: 34%;
}

.products-thumb-cell {
  width: 56px;
  height: 56px;
  padding-top: 6px !important;
  padding-bottom: 6px !important;
  position: relative;
  overflow: visible;
  vertical-align: middle;
}

.products-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #c5d0e0;
  display: block;
  background: #fff;
}

img.products-thumb {
  cursor: zoom-in;
  position: absolute;
  left: 6px;
  top: 50%;
  margin-top: -22px;
  width: 44px;
  height: 44px;
  z-index: 1;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
  transform: scale(1);
  transform-origin: left center;
  box-sizing: border-box;
}

img.products-thumb:hover {
  z-index: 80;
  transform: scale(3.6);
  border-color: #93c5fd;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.28);
}

@media (hover: none) {
  img.products-thumb {
    cursor: default;
    position: static;
    margin-top: 0;
  }

  img.products-thumb:hover {
    transform: none;
    box-shadow: none;
  }
}

.products-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #9ca3af;
  text-transform: uppercase;
}

.products-title-link,
.products-title-text {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

.products-title-link {
  color: #1d4ed8;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.products-detail-row[hidden] {
  display: none !important;
}

.products-detail-row > td {
  white-space: normal !important;
  overflow: visible !important;
  background: #eef2f7;
}

.products-detail-inner {
  padding: 4px 0 8px;
}

.products-detail-inner h4 {
  margin: 0 0 8px;
  font-size: 13px;
}

.products-detail-inner h4 + h4,
.products-attrs-list {
  margin-top: 14px;
}

.products-photo-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.products-photo-strip a {
  display: block;
  width: 96px;
  height: 96px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #c5d0e0;
  background: #fff;
}

.products-photo-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.products-attrs-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px 16px;
  margin: 0;
}

.products-attrs-list div {
  background: #fff;
  border: 1px solid #d7dee9;
  border-radius: 8px;
  padding: 8px 10px;
}

.products-attrs-list dt {
  font-size: 11px;
  color: #6b7280;
  margin: 0 0 2px;
}

.products-attrs-list dd {
  margin: 0;
  font-size: 13px;
  color: #111827;
  white-space: normal;
  word-break: break-word;
}

@media (max-width: 960px) {
  .products-import-grid {
    grid-template-columns: 1fr;
  }
}

.btn-ghost {
  background: transparent;
  color: #1d4ed8;
  box-shadow: none;
  border: 1px solid rgba(36, 93, 255, 0.35);
}

.btn-ghost:hover {
  background: rgba(36, 93, 255, 0.08);
  transform: none;
  box-shadow: none;
}

.btn-ghost::after {
  display: none;
}

.cabinet-table-wrap {
  overflow-x: auto;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--cab-line, #e2e8f0);
  border-radius: var(--cab-radius, 14px);
  padding: 4px;
  box-shadow: var(--cab-shadow, none);
}

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

.cabinet-table th,
.cabinet-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid #e5eaf3;
  vertical-align: top;
}

.cabinet-table th {
  color: #6b7280;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.cabinet-table tr:last-child td {
  border-bottom: 0;
}

.cabinet-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.cabinet-badge.ok {
  background: #ecfdf3;
  color: #067647;
}

.cabinet-badge.pending {
  background: #eff8ff;
  color: #175cd3;
}

.cabinet-badge.sync_error {
  background: #fef3f2;
  color: #b42318;
}

.admin-totals {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 8px 0 18px;
}

.admin-manage {
  display: grid;
  gap: 1rem;
  max-width: 40rem;
}

.admin-invite-form {
  margin: 0;
}

.admin-invite-result {
  display: grid;
  gap: 0.75rem;
  padding: 1rem 1.05rem;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 12px;
  background: rgba(36, 93, 255, 0.04);
}

.admin-invite-result label {
  display: grid;
  gap: 0.35rem;
}

.admin-invite-result input {
  width: 100%;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88rem;
}

.staff-reception-page {
  display: grid;
  gap: 1rem;
}

.staff-priemka {
  display: grid;
  gap: 0.75rem;
}

.staff-priemka[hidden] {
  display: none !important;
}

.cab-priemka-top-actions {
  margin: 0 0 0.75rem;
  justify-content: flex-start;
}

.cab-receptions-list-head {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.ship-rec-chooser {
  margin: 0 0 1.25rem;
}

.ship-rec-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 0.95rem;
}

.ship-rec-choice {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  text-align: left;
  padding: 1rem 1.1rem 1.05rem;
  border: 1px solid var(--cab-line);
  border-radius: var(--cab-radius);
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(36, 93, 255, 0.06), transparent 55%),
    linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
  box-shadow: var(--cab-shadow);
  cursor: pointer;
  font: inherit;
  color: inherit;
  overflow: hidden;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease, background 0.16s ease;
}

.ship-rec-choice::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #245dff, #60a5fa);
  opacity: 0.75;
}

.ship-rec-choice:nth-child(2)::before {
  background: linear-gradient(180deg, #0284c7, #38bdf8);
}

.ship-rec-choice:nth-child(3)::before {
  background: linear-gradient(180deg, #059669, #34d399);
}

.ship-rec-choice:nth-child(4)::before {
  background: linear-gradient(180deg, #475569, #94a3b8);
}

.ship-rec-choice::after {
  content: "→";
  position: absolute;
  right: 1rem;
  top: 1rem;
  font-size: 1rem;
  font-weight: 700;
  color: #94a3b8;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.16s ease, transform 0.16s ease, color 0.16s ease;
}

.ship-rec-choice:hover::after,
.ship-rec-choice.is-active::after {
  opacity: 1;
  transform: translateX(0);
  color: var(--cab-accent);
}

.ship-rec-choice-step {
  display: inline-grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  margin-bottom: 0.15rem;
  border-radius: 999px;
  background: var(--cab-accent-soft);
  color: #1d4ed8;
  font-size: 0.78rem;
  font-weight: 800;
  box-shadow: none;
}

.ship-rec-choice:nth-child(2) .ship-rec-choice-step {
  background: rgba(2, 132, 199, 0.12);
  color: #0369a1;
  box-shadow: none;
}

.ship-rec-choice:nth-child(3) .ship-rec-choice-step {
  background: rgba(5, 150, 105, 0.12);
  color: #047857;
  box-shadow: none;
}

.ship-rec-choice:nth-child(4) .ship-rec-choice-step {
  background: rgba(71, 85, 105, 0.12);
  color: #334155;
  box-shadow: none;
}

.ship-rec-choice:hover {
  border-color: var(--cab-line-strong);
  box-shadow: var(--cab-shadow-hover);
  transform: translateY(-1px);
}

.ship-rec-choice:nth-child(2):hover {
  border-color: #7dd3fc;
  box-shadow: var(--cab-shadow-hover);
}

.ship-rec-choice:nth-child(3):hover {
  border-color: #6ee7b7;
  box-shadow: var(--cab-shadow-hover);
}

.ship-rec-choice:nth-child(4):hover {
  border-color: #cbd5e1;
  box-shadow: var(--cab-shadow-hover);
}

.ship-rec-choice.is-active {
  border-color: #bfdbfe;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(36, 93, 255, 0.1), transparent 55%),
    linear-gradient(180deg, #eff6ff 0%, #f8fbff 100%);
  box-shadow: var(--cab-shadow-hover);
}

.ship-rec-choice-title {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--cab-ink);
  letter-spacing: -0.015em;
  padding-right: 1.4rem;
}

.ship-rec-choice-desc {
  font-size: 0.88rem;
  color: var(--cab-muted);
  line-height: 1.4;
  max-width: 30ch;
}

.ship-rec-chooser .cabinet-panel-head {
  padding: 0.8rem 1rem;
  border-radius: var(--cab-radius);
  border: 1px solid var(--cab-line);
  background:
    radial-gradient(90% 120% at 0% 0%, rgba(36, 93, 255, 0.06), transparent 55%),
    linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
  box-shadow: var(--cab-shadow);
}

.ship-rec-guide {
  margin-top: 1rem;
  border: 1px solid var(--cab-line);
  border-radius: var(--cab-radius);
  background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
  box-shadow: var(--cab-shadow);
  overflow: hidden;
}

.ship-rec-guide-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.05rem;
  cursor: pointer;
  list-style: none;
  font-weight: 650;
  color: #0f172a;
  user-select: none;
}

.ship-rec-guide-summary::-webkit-details-marker {
  display: none;
}

.ship-rec-guide-chevron {
  flex: 0 0 auto;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid #64748b;
  border-bottom: 2px solid #64748b;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}

.ship-rec-guide[open] .ship-rec-guide-chevron {
  transform: rotate(225deg);
  margin-top: 0.2rem;
}

.ship-rec-guide-body {
  display: grid;
  gap: 0.85rem;
  padding: 0 1.05rem 1.05rem;
  border-top: 1px solid #e8eef8;
}

.ship-rec-guide-block {
  padding-top: 0.85rem;
}

.ship-rec-guide-block h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.45rem;
  font-size: 0.98rem;
  font-weight: 700;
  color: #0f172a;
}

.ship-rec-guide-block ol {
  margin: 0;
  padding-left: 1.2rem;
  color: #475569;
  font-size: 0.9rem;
  line-height: 1.45;
  display: grid;
  gap: 0.3rem;
}

.ship-rec-panel {
  margin-top: 0.25rem;
}

.ship-rec-panel[hidden] {
  display: none !important;
}

.cab-delivery-page {
  max-width: 1080px;
}

.cab-delivery-warning {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid #f0d4a0;
  background: linear-gradient(180deg, #fff8eb, #fff3d9);
  color: #7a4b00;
  font-size: 0.95rem;
  line-height: 1.45;
  box-shadow: 0 8px 18px rgba(170, 110, 20, 0.06);
}

.cab-delivery-warning strong {
  color: #8a4500;
}

.cab-delivery-layout {
  display: grid;
  grid-template-columns: minmax(250px, 280px) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.cab-delivery-aside {
  display: grid;
  gap: 0.75rem;
  position: sticky;
  top: 1rem;
}

.cab-delivery-hours-card,
.cab-delivery-copy,
.cab-delivery-form-card {
  border: 1px solid #d8e2f4;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(24, 54, 120, 0.05);
}

.cab-delivery-hours-card {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.95rem 1rem;
}

.cab-delivery-hours-icon {
  flex: 0 0 auto;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #245dff;
  background: #eef3ff;
}

.cab-delivery-aside-label {
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.18rem;
}

.cab-delivery-hours-main {
  font-size: 0.98rem;
  font-weight: 650;
  color: #0f172a;
  line-height: 1.3;
}

.cab-delivery-hours-sub {
  margin-top: 0.18rem;
  font-size: 0.86rem;
  color: #64748b;
}

.cab-delivery-copy-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 0.95rem 0.55rem;
}

.cab-delivery-copy-title {
  font-weight: 650;
  color: #0f172a;
  font-size: 0.95rem;
}

.cab-delivery-copy-note {
  margin: 0 0.8rem 0.4rem;
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  background: #fff7ea;
  border: 1px solid #efd4a4;
  color: #7a4b00;
  font-size: 0.84rem;
  line-height: 1.4;
}

.cab-delivery-copy-note strong {
  color: #8a4500;
}

.cab-delivery-copy-btn {
  flex: 0 0 auto;
  padding: 0.32rem 0.65rem;
  font-size: 0.82rem;
}

.cab-delivery-copy-body {
  padding: 0.1rem 0.3rem 0.75rem;
}

.cab-delivery-contact-row {
  display: grid;
  grid-template-columns: 4.8rem minmax(0, 1fr);
  gap: 0.45rem;
  padding: 0.45rem 0.6rem;
  border-radius: 10px;
  margin: 0 0.3rem;
}

.cab-delivery-contact-row:hover {
  background: #f5f8ff;
}

.cab-delivery-contact-k {
  font-size: 0.78rem;
  color: #64748b;
  padding-top: 0.1rem;
}

.cab-delivery-contact-v {
  color: #0f172a;
  font-weight: 560;
  text-decoration: none;
  line-height: 1.35;
  font-size: 0.9rem;
}

a.cab-delivery-contact-v:hover {
  color: #245dff;
}

.cab-delivery-form {
  max-width: none;
  margin: 0;
}

.cab-delivery-form-card {
  padding: 1.15rem 1.2rem 1.2rem;
  display: grid;
  gap: 1.05rem;
}

.cab-delivery-section-title {
  font-size: 1rem;
  font-weight: 650;
  color: #0f172a;
}

.cab-delivery-flow {
  margin: 0;
  padding: 0;
  border: none;
  display: grid;
  gap: 0.55rem;
}

.cab-delivery-flow > .cab-delivery-section-title {
  margin: 0;
  padding: 0;
}

.cab-delivery-flow-opts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.cab-delivery-flow-opt {
  margin: 0;
  cursor: pointer;
}

.cab-delivery-flow-opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cab-delivery-flow-card {
  display: grid;
  gap: 0.18rem;
  min-height: 4.1rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid #d7e1f5;
  border-radius: 14px;
  background: #fff;
  color: #1e293b;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.cab-delivery-flow-opt:hover .cab-delivery-flow-card {
  border-color: #9db4f0;
}

.cab-delivery-flow-opt input:checked + .cab-delivery-flow-card,
.cab-delivery-flow-opt:has(input:checked) .cab-delivery-flow-card {
  border-color: #245dff;
  background: #eef3ff;
  box-shadow: 0 4px 14px rgba(36, 93, 255, 0.12);
}

.cab-delivery-flow-name {
  font-size: 0.98rem;
  font-weight: 650;
  color: #0f172a;
}

.cab-delivery-flow-opt input:checked + .cab-delivery-flow-card .cab-delivery-flow-name,
.cab-delivery-flow-opt:has(input:checked) .cab-delivery-flow-card .cab-delivery-flow-name {
  color: #1639a8;
}

.cab-delivery-flow-desc {
  font-size: 0.82rem;
  line-height: 1.35;
  color: #64748b;
}

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

.cab-delivery-field {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  align-content: start;
}

.cab-delivery-field > span {
  font-size: 0.88rem;
  color: #334155;
}

.cab-delivery-field-wide {
  grid-column: 1 / -1;
}

.cab-delivery-form .cab-delivery-field input,
.cab-delivery-form .cab-delivery-field select,
.cab-delivery-form .cab-delivery-field textarea {
  width: 100%;
  border: 1px solid #d5dff2;
  border-radius: 12px;
  padding: 0.68rem 0.8rem;
  background: #fff;
  font: inherit;
  color: #0f172a;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cab-delivery-form .cab-delivery-field input:focus,
.cab-delivery-form .cab-delivery-field select:focus,
.cab-delivery-form .cab-delivery-field textarea:focus {
  outline: none;
  border-color: #245dff;
  box-shadow: 0 0 0 3px rgba(36, 93, 255, 0.12);
}

.cab-delivery-time {
  margin: 0;
  padding: 0;
  border: none;
  display: grid;
  gap: 0.55rem;
}

.cab-delivery-time legend {
  margin: 0;
  padding: 0;
  font-size: 0.88rem;
  color: #334155;
}

.cab-delivery-time-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(4.4rem, 1fr));
  gap: 0.4rem;
}

.cab-delivery-time-slot {
  margin: 0;
  cursor: pointer;
}

.cab-delivery-time-slot input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cab-delivery-time-slot span {
  display: grid;
  place-items: center;
  min-height: 2.35rem;
  padding: 0.35rem 0.25rem;
  border: 1px solid #d7e1f5;
  border-radius: 10px;
  background: #fff;
  color: #1e293b;
  font-size: 0.88rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.cab-delivery-time-slot:hover span {
  border-color: #9db4f0;
}

.cab-delivery-time-slot input:checked + span,
.cab-delivery-time-slot:has(input:checked) span {
  border-color: #245dff;
  background: #eef3ff;
  color: #1639a8;
  box-shadow: 0 4px 12px rgba(36, 93, 255, 0.12);
}

.cab-delivery-time-lunch {
  display: grid;
  place-items: center;
  min-height: 2.35rem;
  border-radius: 10px;
  border: 1px dashed #e2e8f0;
  background: #f8fafc;
  color: #94a3b8;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cab-delivery-field-hint {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  line-height: 1.35;
}

.cab-delivery-cargo {
  margin: 0;
  padding: 0;
  border: none;
}

.cab-delivery-cargo legend {
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
  color: #334155;
  padding: 0;
}

.cab-delivery-cargo-opts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.cab-delivery-cargo-opts-sm {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 260px;
}

.cab-delivery-cargo-opt {
  margin: 0;
  cursor: pointer;
}

.cab-delivery-cargo-opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cab-delivery-cargo-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 0.55rem;
  min-height: 0;
  padding: 0.7rem 0.8rem;
  border: 1px solid #d7e1f5;
  border-radius: 12px;
  background: #fff;
  color: #1e293b;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.cab-delivery-cargo-card.is-sm {
  min-height: 0;
  justify-content: center;
  padding: 0.55rem 0.7rem;
}

.cab-delivery-cargo-opt:hover .cab-delivery-cargo-card {
  border-color: #9db4f0;
}

.cab-delivery-cargo-opt input:checked + .cab-delivery-cargo-card,
.cab-delivery-cargo-opt:has(input:checked) .cab-delivery-cargo-card {
  border-color: #245dff;
  background: #eef3ff;
  box-shadow: 0 6px 14px rgba(36, 93, 255, 0.1);
  color: #1639a8;
}

.cab-delivery-cargo-ico {
  color: #245dff;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.cab-delivery-cargo-name {
  font-size: 0.9rem;
  font-weight: 600;
}

.cab-delivery-container-size {
  margin-top: 0.65rem;
  padding: 0.7rem 0.75rem;
  border-radius: 12px;
  background: #f6f9ff;
  border: 1px dashed #cdd9f3;
}

.cab-delivery-container-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.8rem;
  color: #64748b;
}

.cab-delivery-submit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem 1rem;
  padding-top: 0.15rem;
}

.cab-delivery-submit-btn {
  min-width: 240px;
  padding: 0.82rem 1.15rem;
  font-weight: 650;
  box-shadow: 0 10px 20px rgba(36, 93, 255, 0.2);
}

.cab-delivery-submit-hint {
  margin: 0;
  font-size: 0.86rem;
}

.cab-delivery-success {
  padding: 1.35rem 1.25rem 1.4rem;
  border: 1px solid #b7e0c4;
  border-radius: 16px;
  background: linear-gradient(180deg, #f3fbf6, #eaf8ef);
  box-shadow: 0 10px 24px rgba(22, 120, 60, 0.08);
  text-align: left;
}

.cab-delivery-success[hidden] {
  display: none !important;
}

.cab-delivery-success-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #d8f3e2;
  color: #15803d;
  margin-bottom: 0.75rem;
}

.cab-delivery-success-title {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
  color: #14532d;
}

.cab-delivery-success-text {
  margin: 0 0 1rem;
  color: #166534;
  line-height: 1.45;
  font-size: 0.95rem;
}

.cab-delivery-success-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.cab-reception-page {
  max-width: 1180px;
}

.cab-archive-page {
  max-width: none;
}

.cab-archive-journal {
  width: 100%;
  min-width: 0;
}

.cab-archive-journal .tz-1c {
  min-height: min(58vh, 560px);
}

.cab-archive-detail {
  margin-top: 0.85rem;
}

.cab-archive-detail-shell {
  min-height: 0;
}

.cab-archive-detail-body {
  padding: 0.55rem 0.75rem 0.85rem;
  max-height: min(48vh, 480px);
  overflow: auto;
}

.cab-archive-detail-meta {
  margin: 0 0 0.65rem;
  color: #64748b;
  font-size: 0.86rem;
}

.cab-archive-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.75rem;
}

.cab-archive-viewer {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 0.75rem;
}

.cab-archive-viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
}

.cab-archive-viewer-dialog {
  position: relative;
  width: min(52rem, 100%);
  max-height: min(90vh, 960px);
  display: flex;
  flex-direction: column;
  padding: 0;
  border-radius: 3px;
  background: #fff;
  border: 1px solid #c9d4ea;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
  overflow: hidden;
}

.cab-archive-viewer-titlebar {
  flex: 0 0 auto;
  position: relative;
  padding-right: 2.5rem;
}

.cab-archive-viewer-x {
  position: absolute;
  top: 50%;
  right: 0.45rem;
  transform: translateY(-50%);
  width: 1.7rem;
  height: 1.7rem;
  border: 1px solid #c9d4ea;
  border-radius: 2px;
  background: #fff;
  color: #334155;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.cab-archive-viewer-x:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.cab-archive-viewer-toolbar {
  flex: 0 0 auto;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.cab-archive-viewer-scroll {
  min-height: 0;
  overflow: auto;
  padding: 0.85rem 1rem 1rem;
  display: grid;
  gap: 0.75rem;
}

.cab-archive-viewer-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
}

@media (max-width: 720px) {
  .cab-archive-viewer-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.cab-archive-viewer-fact {
  display: grid;
  gap: 0.2rem;
  min-height: 3.35rem;
  padding: 0.5rem 0.6rem;
  border-radius: 2px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.cab-archive-viewer-fact span {
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 600;
}

.cab-archive-viewer-fact b {
  font-size: 0.92rem;
  color: #0f172a;
  font-weight: 650;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.cab-archive-viewer-dest {
  display: grid;
  gap: 0.2rem;
  padding: 0.55rem 0.65rem;
  border-radius: 2px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.cab-archive-viewer-dest span {
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 600;
}

.cab-archive-viewer-dest b {
  font-size: 0.9rem;
  color: #0f172a;
  font-weight: 600;
  line-height: 1.35;
}

.cab-archive-viewer-sec {
  margin: 0.15rem 0 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.cab-archive-viewer-body {
  min-height: 0;
}

.cab-archive-viewer-body .cab-lines {
  gap: 0.45rem;
}

.cab-archive-viewer-body .cab-line {
  padding: 0.55rem 0.65rem;
  border-radius: 2px;
  border-color: #e2e8f0;
  background: #fff;
}

.cab-archive-viewer-body .cab-line-title {
  font-size: 0.92rem;
  line-height: 1.35;
}

.cab-archive-viewer .tz-1c-btn--primary {
  background: #245dff;
  border-color: #245dff;
  color: #fff;
}

.cab-archive-viewer .tz-1c-btn--primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
}

body.cab-archive-viewer-open {
  overflow: hidden;
}

.cab-archive-detail-body .cab-item-reject-note {
  margin: 0 0 0.65rem;
}

.cab-reception-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: start;
}

.cab-reception-aside {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  position: static;
}

.cab-reception-step-card,
.cab-reception-tip-card {
  border: 1px solid #d8e2f4;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
  box-shadow: 0 8px 22px rgba(24, 54, 120, 0.05);
  padding: 0.95rem 1rem;
}

.cab-reception-step-card {
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(36, 93, 255, 0.07), transparent 55%),
    linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
}

.cab-reception-tip-card {
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(245, 158, 11, 0.1), transparent 55%),
    linear-gradient(180deg, #fffbeb 0%, #ffffff 100%);
  border-color: #fde68a;
}

.cab-reception-steps {
  margin: 0.45rem 0 0;
  padding-left: 1.1rem;
  color: #334155;
  font-size: 0.9rem;
  line-height: 1.45;
  display: grid;
  gap: 0.45rem;
}

.cab-reception-tip-text {
  margin: 0.35rem 0 0;
  color: #475569;
  font-size: 0.9rem;
  line-height: 1.45;
}

.cab-priemka-client {
  border: 1px solid #d8e2f4;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(24, 54, 120, 0.05);
  padding: 1rem 1.1rem 1.15rem;
}

.cab-priemka-client .cab-priemka-form {
  gap: 0.55rem;
}

.cab-archive-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
  padding: 5px;
  border-radius: 14px;
  background: var(--cab-plate);
  border: 1px solid var(--cab-line);
  width: fit-content;
  max-width: 100%;
}

.cab-archive-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--cab-ink-2);
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.55rem 0.95rem;
  border-radius: var(--cab-radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  line-height: 1.2;
}

.cab-archive-tab:hover {
  color: #1d4ed8;
  background: rgba(255, 255, 255, 0.7);
}

.cab-archive-tab.active {
  background: var(--cab-surface);
  color: #1d4ed8;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.cab-archive-tab-count:not(:empty)::before {
  content: "";
}

.cab-archive-tab-count:not(:empty) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: var(--cab-ink-2);
  font-size: 0.72rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.cab-archive-tab.active .cab-archive-tab-count:not(:empty) {
  background: var(--cab-accent-soft);
  color: #1d4ed8;
}

.cab-filter-chips {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin: 0 0 0.9rem;
}

.cab-chips-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.55rem;
}

.cab-chips-label {
  flex: 0 0 auto;
  min-width: 3.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--cab-ink-2);
}

.cab-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.cab-chip {
  appearance: none;
  border: 1px solid var(--cab-line-strong);
  background: var(--cab-surface);
  color: var(--cab-ink-2);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 650;
  line-height: 1.2;
  padding: 0.38rem 0.72rem;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease,
    box-shadow 0.15s ease;
}

.cab-chip:hover {
  border-color: #93c5fd;
  color: #1d4ed8;
  background: #f8fbff;
}

.cab-chip.is-active {
  border-color: transparent;
  background: #1d4ed8;
  color: #fff;
  box-shadow: 0 1px 2px rgba(29, 78, 216, 0.25);
}

.cab-chip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.15rem;
  padding: 0.05rem 0.32rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  background: rgba(15, 23, 42, 0.08);
  color: inherit;
}

.cab-chip.is-active .cab-chip-count {
  background: rgba(255, 255, 255, 0.22);
}

.cabinet-badge.cab-kind-scheme {
  background: #ecfeff;
  color: #0e7490;
}

.cab-archive-list .cab-list {
  display: grid;
  gap: 0.5rem;
}

.cab-archive-list .cab-item {
  border: 1px solid var(--cab-line);
  border-radius: var(--cab-radius);
  background: var(--cab-surface);
  box-shadow: var(--cab-shadow);
  padding: 0.7rem 0.8rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cab-archive-list .cab-item:hover {
  border-color: var(--cab-line-strong);
  box-shadow: var(--cab-shadow-hover);
}

.cab-archive-list .cabinet-muted,
.cab-list > .cabinet-muted {
  margin: 0.35rem 0;
  padding: 1rem 1.05rem;
  border: 1px dashed var(--cab-line-strong);
  border-radius: var(--cab-radius);
  background: rgba(255, 255, 255, 0.55);
  color: var(--cab-muted);
  font-size: 0.92rem;
}

.cab-tz-items {
  display: grid;
  gap: 0.85rem;
}

.cab-tz-item {
  position: relative;
  border: 1px solid #d5e0f5;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
  box-shadow: 0 10px 24px rgba(24, 54, 120, 0.06);
  padding: 0.9rem 1rem 1.05rem;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cab-tz-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #245dff, #93c5fd);
}

.cab-tz-item:hover {
  border-color: #b6c9ef;
  box-shadow: 0 14px 28px rgba(24, 54, 120, 0.08);
}

.cab-tz-item.is-collapsed {
  background: linear-gradient(180deg, #fbfcff 0%, #f3f7ff 100%);
  padding-bottom: 0.85rem;
}

.cab-tz-item-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0;
}

.cab-tz-item-toggle {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.2rem 0.2rem 0.2rem 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}

.cab-tz-item-summary {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.94rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cab-tz-item-thumb {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(145deg, #eef2ff, #e2e8f0);
  border: 1px solid #dbe4f5;
  cursor: zoom-in;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.cab-tz-item-thumb.is-empty {
  display: none;
}

.cab-tz-item-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.cab-tz-item-thumb:hover {
  border-color: #245dff;
  box-shadow: 0 0 0 3px rgba(36, 93, 255, 0.16);
}

.cab-tz-photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.cab-tz-photo-lightbox[hidden] {
  display: none !important;
}

.cab-tz-photo-lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
}

.cab-tz-photo-lightbox-dialog {
  position: relative;
  z-index: 1;
  max-width: min(920px, 100%);
  max-height: min(88vh, 100%);
  border-radius: 16px;
  overflow: hidden;
  background: #0f172a;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.cab-tz-photo-lightbox-img {
  display: block;
  max-width: min(920px, 92vw);
  max-height: min(84vh, 920px);
  width: auto;
  height: auto;
  object-fit: contain;
  background: #0f172a;
}

.cab-tz-photo-lightbox-close {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 2;
  width: 2.1rem;
  height: 2.1rem;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

body.cab-tz-lightbox-open {
  overflow: hidden;
}

.cab-tz-item-chevron {
  flex: 0 0 auto;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid #64748b;
  border-bottom: 2px solid #64748b;
  transform: rotate(-135deg);
  transition: transform 0.15s ease;
  margin-top: 0.15rem;
}

.cab-tz-item.is-collapsed .cab-tz-item-chevron {
  transform: rotate(45deg);
  margin-top: -0.1rem;
}

.cab-tz-item-body {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px dashed #d8e2f4;
}

.cab-tz-item.is-collapsed .cab-tz-item-body {
  display: none;
}

.cab-tz-item-num {
  display: inline-grid;
  place-items: center;
  min-width: 1.7rem;
  height: 1.7rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #245dff, #60a5fa);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(36, 93, 255, 0.25);
}

.cab-tz-item-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 0.75rem;
  margin-top: 0.65rem;
}

.cab-tz-item-pick {
  margin-top: 0.15rem;
}

.cab-tz-meta {
  margin-bottom: 0.45rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid #dbe4f5;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8faff 0%, #ffffff 100%);
}

.cab-tz-card {
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(24, 54, 120, 0.07);
}

.cab-tz-page .cab-delivery-warning {
  border-radius: 14px;
  border-color: #fcd34d;
  background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
}

.cab-tz-form .cab-priemka-file-bar {
  padding: 0.75rem;
  border-radius: 12px;
  background: #f3f7ff;
  border: 1px solid #dbe4f5;
}

.cab-tz-form .cab-priemka-cta {
  margin-top: 0.85rem;
  padding: 0.85rem;
  border-radius: 14px;
  background: linear-gradient(180deg, #eff6ff 0%, #f8fbff 100%);
  border: 1px solid #dbe4f5;
}

.cabinet-badge.reception-status-ready {
  background: #dcfce7;
  color: #166534;
}

.cabinet-badge.reception-status-shipped {
  background: #e0e7ff;
  color: #3730a3;
}

.cabinet-badge.reception-status-processed {
  background: #ecfdf5;
  color: #047857;
}

.tz-1c-st--processed {
  background: #ecfdf5;
  color: #047857;
}

.cabinet-badge.reception-status-obsolete {
  background: #f1f5f9;
  color: #64748b;
}

.staff-tz-footer-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: flex-end;
}

.cabinet-badge.cab-kind-revision {
  background: #ede9fe;
  color: #5b21b6;
}

.cab-item-obsolete {
  opacity: 0.72;
}

.cab-item-obsolete .cab-item-title {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  text-decoration-color: #94a3b8;
}

.cab-tz-revise-banner {
  margin: 0 0 0.85rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1px solid #ddd6fe;
  background: #f5f3ff;
  color: #5b21b6;
  font-size: 0.9rem;
  line-height: 1.4;
}

.cab-pack-actions {
  display: inline-flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border-radius: 12px;
  background: linear-gradient(180deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1px solid #bbf7d0;
  box-sizing: border-box;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.cab-pack-actions .btn,
.cab-pack-actions .btn-ghost {
  flex: 0 0 auto;
  min-width: 0;
}

.cab-item-actions > .btn,
.cab-item-actions > .btn-ghost,
.cab-item-actions > .cab-pack-actions {
  flex: 0 0 auto;
}

a.btn.cab-btn-packing,
button.btn.cab-btn-packing,
.cab-item-actions .cab-btn-packing,
.cab-pack-actions .cab-btn-packing {
  font-weight: 700;
}

/* Staff: packing not filled yet */
a.btn.cab-btn-packing.cab-btn-packing--empty,
button.btn.cab-btn-packing.cab-btn-packing--empty,
.cab-item-actions .cab-btn-packing.cab-btn-packing--empty,
.cab-pack-actions .cab-btn-packing.cab-btn-packing--empty {
  background: #fee2e2 !important;
  border-color: #fca5a5 !important;
  color: #991b1b !important;
}

a.btn.cab-btn-packing.cab-btn-packing--empty:hover,
button.btn.cab-btn-packing.cab-btn-packing--empty:hover,
.cab-item-actions .cab-btn-packing.cab-btn-packing--empty:hover,
.cab-pack-actions .cab-btn-packing.cab-btn-packing--empty:hover {
  background: #fecaca !important;
  border-color: #f87171 !important;
  color: #7f1d1d !important;
}

/* Filled packing (staff + client) */
a.btn.cab-btn-packing.cab-btn-packing--done,
button.btn.cab-btn-packing.cab-btn-packing--done,
.cab-item-actions .cab-btn-packing.cab-btn-packing--done,
.cab-pack-actions .cab-btn-packing.cab-btn-packing--done,
a.btn.cab-btn-packing:not(.cab-btn-packing--empty),
button.btn.cab-btn-packing:not(.cab-btn-packing--empty),
.cab-item-actions .cab-btn-packing:not(.cab-btn-packing--empty),
.cab-pack-actions .cab-btn-packing:not(.cab-btn-packing--empty) {
  background: #dcfce7 !important;
  border-color: #86efac !important;
  color: #166534 !important;
}

a.btn.cab-btn-packing.cab-btn-packing--done:hover,
button.btn.cab-btn-packing.cab-btn-packing--done:hover,
.cab-item-actions .cab-btn-packing.cab-btn-packing--done:hover,
.cab-pack-actions .cab-btn-packing.cab-btn-packing--done:hover,
a.btn.cab-btn-packing:not(.cab-btn-packing--empty):hover,
button.btn.cab-btn-packing:not(.cab-btn-packing--empty):hover,
.cab-item-actions .cab-btn-packing:not(.cab-btn-packing--empty):hover,
.cab-pack-actions .cab-btn-packing:not(.cab-btn-packing--empty):hover {
  background: #bbf7d0 !important;
  border-color: #4ade80 !important;
  color: #14532d !important;
}

a.btn.cab-btn-packing-dl,
.cab-item-actions .cab-btn-packing-dl,
.cab-pack-actions .cab-btn-packing-dl {
  background: #ffffff !important;
  border-color: #86efac !important;
  color: #166534 !important;
  font-weight: 700;
}

a.btn.cab-btn-packing-dl:hover,
.cab-item-actions .cab-btn-packing-dl:hover,
.cab-pack-actions .cab-btn-packing-dl:hover {
  background: #dcfce7 !important;
  border-color: #4ade80 !important;
  color: #14532d !important;
}

.urgent-upcoming-tag {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.75rem;
  font-weight: 700;
}

.urgent-row-upcoming {
  border-color: #bae6fd;
}

.staff-tz-modal .reception-modal-dialog {
  width: min(52rem, 96vw);
  max-height: min(92vh, 960px);
  overflow: auto;
}

.staff-tz-modal .cabinet-panel-head {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #fff;
  padding-top: 0.15rem;
  padding-bottom: 0.65rem;
  margin-bottom: 0.75rem !important;
  border-bottom: 1px solid var(--cab-line, #e2e8f0);
  isolation: isolate;
}

.staff-tz-modal-close {
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  font-size: 1.55rem;
  line-height: 1;
  font-weight: 500;
  color: #334155;
}

.staff-tz-hint--warn {
  color: #9a3412 !important;
  background: #fff7ed;
  border: 1px solid #fdba74;
  border-radius: 10px;
  padding: 0.45rem 0.65rem;
}

.staff-tz-modal.staff-tz-modal--packing .reception-modal-dialog {
  width: min(58rem, 96vw);
  padding: 1.15rem 1.2rem 1.05rem;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(36, 93, 255, 0.08) 0%, transparent 45%),
    radial-gradient(90% 70% at 100% 0%, rgba(217, 119, 6, 0.06) 0%, transparent 40%),
    #fff;
}

.staff-tz-modal.staff-tz-modal--packing .cabinet-panel-head {
  margin-bottom: 0.55rem !important;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(36, 93, 255, 0.1);
  background: #fff;
  box-shadow: 0 10px 18px -12px rgba(15, 23, 42, 0.2);
}

.staff-tz-modal.staff-tz-modal--packing #staff-tz-modal-title {
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.staff-tz-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  margin-bottom: 0.85rem;
}

.staff-tz-schedule {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 1rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid #dbe4f5;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8faff 0%, #ffffff 100%);
}

.staff-tz-schedule label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #334155;
}

.staff-tz-hint {
  margin: 0;
  font-size: 0.86rem;
}

.staff-tz-lines h3 {
  margin: 0 0 0.55rem;
  font-size: 1rem;
}

.staff-tz-line {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  margin-bottom: 0.55rem;
  background: #fff;
  position: relative;
}

.staff-tz-line-top {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 0.55rem;
}

a.staff-tz-line-title-link {
  color: #1d4ed8;
  font-weight: 700;
  text-decoration: none;
  line-height: 1.3;
}

a.staff-tz-line-title-link:hover {
  text-decoration: underline;
}

.staff-tz-line-head {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
  flex: 1 1 auto;
}

.staff-tz-line-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.15rem 0.25rem;
}

.staff-tz-line-meta .cab-label-bc-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.tz-pack-match-meta.cab-label-bc-wrap {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.tz-pack-match-meta .cab-label-bc-btn {
  margin-left: 0;
}

.staff-tz-line-thumb {
  appearance: none;
  width: 3rem;
  height: 3rem;
  margin: 0;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  overflow: visible;
  cursor: zoom-in;
  flex: 0 0 3rem;
  display: block;
  position: relative;
  z-index: 1;
  /* Keep layout box fixed — zoom must not reflow the card */
  contain: layout;
}

.staff-tz-line-thumb img {
  position: absolute;
  left: 0;
  top: 0;
  width: 3rem;
  height: 3rem;
  object-fit: cover;
  display: block;
  border-radius: 9px;
  border: 1px solid transparent;
  box-sizing: border-box;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
  transform: scale(1);
  transform-origin: left center;
  background: #fff;
  pointer-events: none;
}

.staff-tz-line-thumb:not(.is-empty):hover,
.staff-tz-line-thumb:not(.is-empty):focus-visible {
  z-index: 120;
  outline: none;
  border-color: #e2e8f0;
  background: #f8fafc;
}

.staff-tz-line-thumb:not(.is-empty):hover img,
.staff-tz-line-thumb:not(.is-empty):focus-visible img {
  transform: scale(3.2);
  border-color: #93c5fd;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.28);
  z-index: 121;
}

.staff-tz-line-thumb.is-empty {
  cursor: default;
  pointer-events: none;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  opacity: 0.85;
  overflow: hidden;
}

.staff-tz-line:has(.staff-tz-line-thumb:not(.is-empty):hover),
.staff-tz-line:has(.staff-tz-line-thumb:not(.is-empty):focus-visible) {
  z-index: 50;
  /* Do not toggle overflow here — that caused layout jump */
  position: relative;
}

@media (hover: none) {
  .staff-tz-line-thumb:not(.is-empty):hover img,
  .staff-tz-line-thumb:not(.is-empty):focus-visible img {
    transform: scale(1);
    border-color: transparent;
    box-shadow: none;
  }
}

.staff-tz-line-grid {
  display: grid;
  grid-template-columns: 7rem 7rem minmax(0, 1fr);
  gap: 0.55rem;
}

.staff-tz-line-grid--pack {
  grid-template-columns: 6.5rem 6.5rem 6.5rem minmax(0, 1fr);
}

.staff-tz-line-grid label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.84rem;
  color: #475569;
}

.staff-tz-pack-qty {
  display: grid;
  gap: 0.25rem;
  font-size: 0.84rem;
  color: #475569;
  align-content: start;
}

.staff-tz-pack-qty strong {
  display: flex;
  align-items: center;
  min-height: 2.4rem;
  padding: 0.35rem 0.65rem;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 700;
}

.staff-tz-pack-qty.is-ok strong {
  border-color: #86efac;
  background: #ecfdf5;
  color: #166534;
}

.staff-tz-pack-qty.is-warn strong {
  border-color: #fdba74;
  background: #fff7ed;
  color: #9a3412;
}

.staff-tz-pack-qty.is-miss strong {
  border-color: #fca5a5;
  background: #fef2f2;
  color: #b91c1c;
}

.staff-tz-pack-qty.is-empty strong,
.staff-tz-pack-qty.is-na strong {
  color: #94a3b8;
  font-weight: 600;
}

.staff-tz-pack-check {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
  line-height: 1.4;
}

.staff-tz-pack-check--warn {
  color: #9a3412;
}

.staff-tz-pack-check--ok {
  color: #166534;
}

.staff-tz-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e2e8f0;
}

.staff-tz-footer .cab-item-delete {
  color: #b91c1c;
}

.cab-confirm-comment {
  display: grid;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #334155;
}

.cab-confirm-comment textarea {
  width: 100%;
  min-height: 4.5rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid #d7dee9;
  border-radius: 10px;
  font: inherit;
  font-weight: 500;
  resize: vertical;
}

.cab-confirm-comment textarea:focus {
  outline: 2px solid #245dff;
  outline-offset: 1px;
  border-color: #245dff;
}

.tz-pack-editor {
  display: grid;
  gap: 0.9rem;
}

.tz-pack-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
  padding: 0.65rem 0.8rem;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: rgba(248, 250, 252, 0.9);
}

.tz-pack-back {
  flex: 0 0 auto;
}

.tz-pack-stats-note {
  margin: 0;
  flex: 1 1 10rem;
  font-size: 0.88rem;
  color: #64748b;
}

.tz-pack-stats-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-left: auto;
}

.tz-pack-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 2rem;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(36, 93, 255, 0.18);
  background: rgba(36, 93, 255, 0.08);
  color: #1e3a8a;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}

.tz-pack-chip--soft {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #334155;
}

.tz-pack-chip--muted {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #64748b;
  font-weight: 500;
}

.tz-pack-chip--warn {
  background: #fff7ed;
  border-color: #fdba74;
  color: #9a3412;
}

.tz-pack-chip--dest {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1e40af;
  font-weight: 750;
}

.tz-pack-dest-inline {
  color: #1e40af;
  font-weight: 700;
}

.tz-pack-draft-note {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
  line-height: 1.4;
}

.tz-pack-draft-discard {
  min-height: 2rem;
  padding: 0.2rem 0.65rem;
  font-size: 0.8rem;
}

.tz-pack-chip--ship {
  background: #ecfdf5;
  border-color: #86efac;
  color: #166534;
  font-weight: 750;
}

.tz-pack-chip-part {
  display: inline-flex;
  align-items: baseline;
}

.tz-pack-chip-sep {
  opacity: 0.55;
  margin: 0 0.15rem;
}

.tz-pack-ship-totals {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.55rem 0.75rem;
  margin: 0.15rem 0 0.35rem;
  padding: 0.7rem 0.85rem;
  border-radius: 14px;
  border: 1px solid #bbf7d0;
  background: linear-gradient(180deg, #f0fdf4 0%, #ecfdf5 100%);
}

.tz-pack-ship-totals-label {
  margin: 0;
  flex: 1 1 100%;
  font-size: 0.82rem;
  font-weight: 700;
  color: #166534;
}

.tz-pack-ship-field {
  display: grid;
  gap: 0.25rem;
  min-width: 6.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #334155;
}

.tz-pack-ship-field input {
  width: 6.5rem;
  min-height: 2.35rem;
  padding: 0.35rem 0.6rem;
  border: 1px solid #86efac;
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 1rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
  box-sizing: border-box;
}

.tz-pack-ship-field input:focus {
  outline: 2px solid rgba(22, 101, 52, 0.28);
  border-color: #16a34a;
}

label.tz-pack-upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin: 0;
}

label.tz-pack-upload-btn input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.tz-pack-readonly-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-left: auto;
}

.tz-pack-units {
  display: grid;
  gap: 0.95rem;
}

.tz-pack-unit {
  position: relative;
  z-index: 0;
  isolation: isolate;
  border: 1px solid #dbe4f5;
  border-radius: 18px;
  padding: 0.95rem 1rem 1rem;
  background: #fff;
  display: grid;
  gap: 0.75rem;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

.tz-pack-unit::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #2563eb;
}

.tz-pack-unit--pallet::before {
  background: #d97706;
}

.tz-pack-unit--piece::before {
  background: #0f766e;
}

.tz-pack-unit--pallet {
  border-color: rgba(217, 119, 6, 0.28);
  background: linear-gradient(180deg, #fffbeb 0%, #ffffff 42%);
}

.tz-pack-unit--piece {
  border-color: rgba(15, 118, 110, 0.28);
  background: linear-gradient(180deg, #f0fdfa 0%, #ffffff 42%);
}

.tz-pack-unit--box {
  background: linear-gradient(180deg, #f8faff 0%, #ffffff 40%);
}

.tz-pack-unit-head {
  display: grid;
  grid-template-columns: auto minmax(10rem, auto) minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: end;
}

.tz-pack-piece-body {
  display: grid;
  gap: 0.75rem;
}

.tz-pack-piece-summary {
  margin: 0.15rem 0 0.35rem;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(15, 118, 110, 0.2);
  background: linear-gradient(180deg, #ecfdf5 0%, #f8fffd 100%);
}

.tz-pack-piece-summary--empty {
  opacity: 0.85;
}

.tz-pack-piece-summary-h {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  align-items: baseline;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0f766e;
  margin-bottom: 0.45rem;
}

.tz-pack-piece-summary-meta {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: #64748b;
}

.tz-pack-piece-summary-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.tz-pack-piece-summary-list li {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  padding: 0.3rem 0.2rem;
  border-top: 1px solid rgba(15, 118, 110, 0.1);
}

.tz-pack-piece-summary-list li:first-child {
  border-top: 0;
}

.tz-pack-piece-summary-thumb {
  width: 2rem;
  height: 2rem;
  object-fit: cover;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #e2e8f0;
}

.tz-pack-piece-summary-thumb.is-empty {
  display: inline-block;
  background: #f1f5f9;
}

.tz-pack-piece-summary-title {
  font-size: 0.88rem;
  color: #0f172a;
  min-width: 0;
}

.tz-pack-piece-summary-qty {
  font-size: 0.9rem;
  color: #115e59;
  white-space: nowrap;
}

.tz-pack-nested-box {
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 12px;
  background: #f8fffd;
  padding: 0.65rem 0.75rem 0.75rem;
  display: grid;
  gap: 0.55rem;
}

.tz-pack-nested-box-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: end;
}

.tz-pack-nested-box-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-left: auto;
}

.tz-pack-nested-box-kind,
.tz-pack-slot-product-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0f766e;
}

.tz-pack-slot-product {
  display: grid;
  gap: 0.35rem;
}

.tz-pack-label--inline {
  flex: 1 1 10rem;
  min-width: 8rem;
}

.tz-pack-unit--piece .tz-pack-unit-index {
  background: linear-gradient(180deg, #14b8a6 0%, #0f766e 100%);
  box-shadow: 0 6px 14px rgba(15, 118, 110, 0.28);
}

.tz-pack-unit--piece .tz-pack-type-toggle {
  background: #ecfdf5;
  border-color: rgba(15, 118, 110, 0.25);
}

.tz-pack-unit--piece .tz-pack-type-btn.is-active {
  color: #115e59;
}

.tz-pack-type-toggle {
  flex-wrap: wrap;
  max-width: 22rem;
}

.tz-pack-readonly-nested {
  display: grid;
  gap: 0.35rem;
}

.tz-pack-readonly-nested > ul {
  margin: 0.25rem 0 0;
  padding-left: 1rem;
}

.tz-pack-readonly-unit--piece {
  border-color: rgba(15, 118, 110, 0.25);
}

.tz-pack-unit-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.7rem;
}

.tz-pack-unit-badge-text {
  display: grid;
  gap: 0.1rem;
}

.tz-pack-unit-index {
  display: inline-grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #3b82f6 0%, #245dff 100%);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  flex: 0 0 auto;
  box-shadow: 0 6px 14px rgba(36, 93, 255, 0.25);
}

.tz-pack-unit--pallet .tz-pack-unit-index {
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 6px 14px rgba(217, 119, 6, 0.28);
}

.tz-pack-unit-kind {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #334155;
}

.tz-pack-unit-count {
  font-size: 0.76rem;
  font-weight: 600;
  color: #94a3b8;
}

.tz-pack-type-toggle {
  display: inline-flex;
  padding: 0.18rem;
  border-radius: 12px;
  background: #eef2ff;
  border: 1px solid #dbe4f5;
  gap: 0.15rem;
}

.tz-pack-unit--pallet .tz-pack-type-toggle {
  background: #fff7ed;
  border-color: rgba(217, 119, 6, 0.25);
}

.tz-pack-type-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: #64748b;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0.45rem 0.75rem;
  border-radius: 10px;
  cursor: pointer;
  min-height: 2.2rem;
}

.tz-pack-type-btn.is-active {
  background: #fff;
  color: #1e3a8a;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.tz-pack-unit--pallet .tz-pack-type-btn.is-active {
  color: #9a3412;
}

.tz-pack-unit-head label {
  display: grid;
  gap: 0.28rem;
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
}

.tz-pack-unit-head input,
.tz-pack-search,
.tz-pack-qty input {
  width: 100%;
  border: 1px solid #d5dff2;
  border-radius: 12px;
  padding: 0.58rem 0.72rem;
  font: inherit;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tz-pack-unit-head input:focus,
.tz-pack-search:focus,
.tz-pack-qty input:focus {
  outline: none;
  border-color: #93b4ff;
  box-shadow: 0 0 0 3px rgba(36, 93, 255, 0.12);
}

.tz-pack-search {
  padding-left: 2.2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%2394a3b8' stroke-width='1.8'%3E%3Ccircle cx='8' cy='8' r='5.5'/%3E%3Cpath d='M12.5 12.5 16 16'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0.7rem 50%;
  background-size: 1rem;
}

.tz-pack-unit-side {
  display: grid;
  gap: 0.35rem;
  justify-items: stretch;
  align-content: end;
}

.tz-pack-move {
  display: inline-flex;
  gap: 0.25rem;
}

.tz-pack-move-btn {
  min-width: 2.35rem !important;
  min-height: 2.35rem !important;
  padding: 0 !important;
  font-size: 1rem;
  line-height: 1;
}

.tz-pack-move-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.tz-pack-unit-remove {
  min-height: 2.45rem;
  color: #b91c1c !important;
  border-color: rgba(185, 28, 28, 0.2) !important;
}

.tz-pack-btn-box {
  border-color: rgba(36, 93, 255, 0.28) !important;
  color: #1e3a8a !important;
}

.tz-pack-btn-pallet {
  border-color: rgba(217, 119, 6, 0.35) !important;
  color: #9a3412 !important;
}

.tz-pack-lines {
  display: grid;
  gap: 0.55rem;
}

.tz-pack-empty-lines {
  margin: 0;
  padding: 0.85rem 0.95rem;
  border-radius: 12px;
  border: 1px dashed #cbd5e1;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.9rem;
}

.tz-pack-line {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: 0.65rem;
  align-items: start;
  padding: 0.7rem 0.75rem;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #fff;
}

.tz-pack-line.is-matched {
  border-color: rgba(22, 101, 52, 0.22);
  background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 70%);
}

.tz-pack-line-main {
  min-width: 0;
  display: grid;
  gap: 0.35rem;
}

.tz-pack-line-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 5.5rem 2.5rem;
  gap: 0.5rem;
  align-items: center;
}

.tz-pack-thumb {
  appearance: none;
  width: 3.5rem;
  height: 3.5rem;
  margin-top: 0.05rem;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  overflow: hidden;
  cursor: zoom-in;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
}

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

.tz-pack-thumb.is-empty,
.tz-pack-thumb:disabled {
  cursor: default;
  pointer-events: none;
  background:
    linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  opacity: 0.9;
}

.tz-pack-thumb--sm {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 9px;
  cursor: zoom-in;
}

.tz-pack-line-search-wrap {
  position: relative;
  min-width: 0;
}

.tz-pack-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% - 0.05rem);
  z-index: 8;
  max-height: 240px;
  overflow: auto;
  border: 1px solid #d5dff2;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14);
}

.tz-pack-suggest button,
.tz-pack-suggest .rec-suggest-item,
.tz-pack-suggest [data-pack-pick],
.tz-pack-suggest .tz-pack-suggest-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
  padding: 0.65rem 0.8rem;
  font: inherit;
  cursor: pointer;
  color: #0f172a;
}

.tz-pack-suggest button:hover,
.tz-pack-suggest .rec-suggest-item:hover,
.tz-pack-suggest [data-pack-pick]:hover,
.tz-pack-suggest .tz-pack-suggest-item:hover {
  background: #f5f8ff;
}

.tz-pack-match {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.35;
}

.tz-pack-match-body {
  min-width: 0;
  display: grid;
  gap: 0.12rem;
}

.tz-pack-match-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
}

.tz-pack-match.is-ok .tz-pack-match-title {
  color: #14532d;
}

.tz-pack-match-meta {
  font-size: 0.78rem;
  color: #64748b;
}

.tz-pack-suggest-row {
  display: flex !important;
  align-items: center;
  gap: 0.65rem;
}

.tz-pack-suggest-thumb {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 8px;
  object-fit: cover;
  flex: 0 0 auto;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.tz-pack-suggest-thumb.is-empty {
  display: inline-block;
}

.tz-pack-suggest-text {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.tz-pack-suggest-text strong {
  font-size: 0.9rem;
  color: #0f172a;
}

.tz-pack-suggest-text span {
  font-size: 0.78rem;
  color: #64748b;
}

.tz-pack-match-mark {
  flex: 0 0 auto;
  width: 1.05rem;
  height: 1.05rem;
  margin-top: 0.05rem;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  background: #e2e8f0;
  color: #64748b;
}

.tz-pack-match.is-ok {
  color: #166534;
}

.tz-pack-match.is-ok .tz-pack-match-mark {
  background: #bbf7d0;
  color: #166534;
}

.tz-pack-qty-input {
  width: 100%;
  height: 2.6rem;
  border: 1px solid #d5dff2;
  border-radius: 12px;
  padding: 0.45rem 0.5rem;
  font: inherit;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tz-pack-qty-input:focus {
  outline: none;
  border-color: #93b4ff;
  box-shadow: 0 0 0 3px rgba(36, 93, 255, 0.12);
}

.tz-pack-search {
  height: 2.6rem;
}

.tz-pack-line-remove {
  width: 2.5rem;
  min-width: 2.5rem;
  height: 2.6rem;
  min-height: 2.6rem;
  padding: 0 !important;
  font-size: 1.25rem;
  line-height: 1;
  color: #64748b !important;
  display: inline-grid;
  place-items: center;
}

.tz-pack-unit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.tz-pack-add-line {
  justify-self: start;
  border-style: dashed !important;
}

.tz-pack-copy-next {
  border-color: rgba(36, 93, 255, 0.28) !important;
  color: #1e3a8a !important;
}

.tz-pack-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.15rem;
  padding: 0.75rem 0.85rem;
  border-radius: 16px;
  border: 1px solid #dbe4f5;
  background: linear-gradient(180deg, #f8faff 0%, #ffffff 100%);
  position: sticky;
  bottom: 0;
  z-index: 3;
  box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.05);
}

.tz-pack-toolbar-add,
.tz-pack-toolbar-main {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.tz-pack-client {
  margin-top: 0.75rem;
  padding-top: 0.55rem;
  border-top: 1px solid #e5e7eb;
}

.tz-pack-client-dl {
  margin: 0.65rem 0 0;
}

.tz-pack-readonly {
  margin-top: 1rem;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(36, 93, 255, 0.12);
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(36, 93, 255, 0.07) 0%, transparent 50%),
    #f8fafc;
}

.tz-pack-readonly-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.tz-pack-readonly h4 {
  margin: 0;
  font-size: 1rem;
}

.tz-pack-readonly-grid {
  display: grid;
  gap: 0.65rem;
}

.tz-pack-readonly-unit {
  margin: 0;
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.03);
}

.tz-pack-readonly-unit--box {
  border-left: 4px solid #2563eb;
}

.tz-pack-readonly-unit--pallet {
  border-left: 4px solid #d97706;
}

.tz-pack-readonly-unit-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.45rem;
}

.tz-pack-readonly-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.tz-pack-readonly-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.65rem;
  align-items: center;
  padding: 0.4rem 0.5rem;
  border-radius: 10px;
  background: #f8fafc;
}

.tz-pack-readonly-title {
  min-width: 0;
  font-size: 0.9rem;
  color: #0f172a;
}

.tz-pack-readonly-qty {
  flex: 0 0 auto;
  font-size: 0.86rem;
  font-weight: 700;
  color: #1e3a8a;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 860px) {
  .tz-pack-unit-head {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .tz-pack-type-toggle,
  .tz-pack-label,
  .tz-pack-unit-side {
    grid-column: 1 / -1;
  }

  .tz-pack-unit-side {
    grid-template-columns: auto 1fr;
    align-items: center;
  }

  .tz-pack-stats-chips {
    margin-left: 0;
    width: 100%;
  }
}

@media (max-width: 720px) {
  .tz-pack-line-controls {
    grid-template-columns: minmax(0, 1fr) 4.75rem 2.5rem;
  }

  .tz-pack-toolbar {
    position: static;
  }
}

.staff-tz-reg-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 0.85rem;
  align-items: end;
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid #dbe4f5;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8faff 0%, #ffffff 100%);
}

.staff-tz-reg-filters label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: #475569;
}

.staff-tz-reg-filters select,
.staff-tz-reg-filters input {
  min-width: 10rem;
}

.staff-tz-reg-q {
  flex: 1 1 14rem;
}

.staff-tz-registry .cab-item-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
  margin-top: 0.55rem;
  padding-top: 0.15rem;
}

.staff-tz-registry .cab-list,
.staff-receptions .cab-list {
  gap: 0.5rem;
}

.cabinet-badge.cab-badge-packing-done {
  background: #dcfce7;
  color: #166534;
}

.cabinet-badge.cab-kind-tz {
  background: #dcfce7;
  color: #166534;
}

.cabinet-badge.cab-kind-reception {
  background: #e0e7ff;
  color: #3730a3;
}

.cabinet-badge.cab-kind-pickup {
  background: #ffedd5;
  color: #9a3412;
}

.cab-line-defect {
  color: #b45309;
  font-weight: 600;
}

.cab-tz-ready-banner {
  display: grid;
  gap: 0.65rem;
  margin: 0 0 1rem;
}

.cab-tz-ready-card {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border: 1px solid #86efac;
  border-radius: 14px;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(34, 197, 94, 0.12), transparent 55%),
    linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
  box-shadow: 0 8px 20px rgba(22, 101, 52, 0.06);
}

.cab-tz-ready-card-main {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
  flex: 1 1 16rem;
}

.cab-tz-ready-defects {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  color: #334155;
  line-height: 1.4;
}

@media (max-width: 720px) {
  .staff-tz-line-grid,
  .staff-tz-line-grid--pack {
    grid-template-columns: 1fr 1fr;
  }

  .staff-tz-line-grid .staff-tz-line-comment,
  .staff-tz-line-grid--pack .staff-tz-line-comment {
    grid-column: 1 / -1;
  }
}

.cab-tz-guide {
  margin: 0 0 1rem;
}

.cab-tz-shell {
  margin-top: 0;
}

.cab-tz-extra-send {
  margin-top: 1rem;
  box-shadow: none;
  border-radius: 14px;
}

.cab-tz-send-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0 0 0.35rem;
}

.cab-tz-send-hint {
  margin: 0 0 0.65rem;
}

.cab-tz-form .cab-priemka-field--full {
  grid-column: 1 / -1;
}

@media (max-width: 720px) {
  .cab-tz-item-grid {
    grid-template-columns: 1fr;
  }
}


@media (max-width: 860px) {
  .cab-reception-aside {
    grid-template-columns: 1fr;
  }

  .cab-delivery-layout {
    grid-template-columns: 1fr;
  }

  .cab-delivery-aside {
    position: static;
  }

  .cab-delivery-grid {
    grid-template-columns: 1fr;
  }

  .cab-delivery-time-slots {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .cab-delivery-flow-opts {
    grid-template-columns: 1fr;
  }

  .cab-delivery-cargo-opts {
    grid-template-columns: 1fr;
  }

  .cab-delivery-cargo-opts-sm {
    max-width: none;
  }

  .cab-delivery-submit-btn {
    width: 100%;
  }
}

@media (max-width: 900px) {
  .ship-rec-choice-grid {
    grid-template-columns: 1fr;
  }
}

.cab-priemka-form {
  display: grid;
  gap: 0.35rem;
}

.cab-priemka-section {
  margin: 1.1rem 0 0.55rem;
  font-size: 1.05rem;
  color: #111827;
}

.cab-priemka-hint {
  margin: 0 0 0.55rem;
  font-size: 0.88rem;
}

.cab-priemka-file-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.35rem;
}

.cab-priemka-upload-label {
  display: inline-flex;
  align-items: center;
  margin: 0;
  cursor: pointer;
}

.cab-priemka-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 0.9rem;
}

.cab-priemka-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.88rem;
  color: #4b5563;
}

.cab-priemka-field--full {
  margin-top: 0.75rem;
}

.cab-priemka-field input,
.cab-priemka-field select,
.cab-priemka-field textarea {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  font: inherit;
  color: #111827;
  background: #fff;
  box-sizing: border-box;
}

.cab-priemka-field textarea {
  resize: vertical;
  min-height: 5rem;
}

.cab-priemka-field input.is-invalid,
.cab-priemka-field select.is-invalid {
  border-color: #e07070;
  box-shadow: 0 0 0 3px rgba(199, 58, 58, 0.12);
}

.cab-priemka-req {
  color: #c73a3a;
  font-style: normal;
  font-weight: 700;
}

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

.cab-priemka-field--company {
  grid-column: 1 / -1;
}

.cab-priemka-company-row input,
.cab-priemka-company-row select {
  flex: 1 1 14rem;
  min-width: 0;
}

.cab-priemka-field--company select {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  font: inherit;
  color: #111827;
  background: #fff;
  box-sizing: border-box;
}

.cab-priemka-field--company .rec-create-input-wrap {
  display: block;
}

.cab-priemka-client-match {
  margin: 0.4rem 0 0;
  font-size: 0.88rem;
  line-height: 1.35;
}

.cab-priemka-client-match.is-empty {
  color: #94a3b8;
}

.cab-priemka-client-match.is-ok {
  color: #0f172a;
  font-weight: 600;
}

.cab-priemka-client-clear {
  margin-top: 0.4rem;
  align-self: flex-start;
}

.cab-priemka-field input.is-confirmed {
  background: #f0f7ff;
  border-color: #93c5fd;
  font-weight: 600;
}

.cab-priemka-title-cell {
  min-width: 16rem;
  position: relative;
  overflow: visible;
}

.cab-priemka-title-pick {
  position: relative;
  display: block;
  min-width: 14rem;
}

.cab-priemka-title-btn {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  min-height: 2.5rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
}

.cab-priemka-title-btn:disabled {
  background: #f8fafc;
  color: #94a3b8;
  cursor: not-allowed;
}

.cab-priemka-title-btn-thumb {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  overflow: hidden;
  background: #e5e7eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cab-priemka-title-btn-thumb.is-empty {
  background: #eef2f7;
}

.cab-priemka-title-btn-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cab-priemka-title-btn-label {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.88rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cab-priemka-title-suggest {
  min-width: 280px;
  max-width: min(480px, calc(100vw - 24px));
  padding: 0;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
}

.cab-priemka-title-suggest--portal {
  margin: 0;
  max-height: none !important;
  overflow: hidden !important;
  background: #fff;
  z-index: 12000;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.28);
}

.cab-priemka-title-suggest[hidden] {
  display: none !important;
}

.cab-priemka-title-filter-wrap {
  padding: 0.45rem;
  border-bottom: 1px solid #e5eaf3;
  background: #f8fafc;
}

.cab-priemka-title-filter {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
  font: inherit;
  box-sizing: border-box;
}

.cab-priemka-title-list {
  max-height: 400px;
  overflow: auto;
  padding: 4px;
}

.cab-priemka-title-empty {
  margin: 0;
  padding: 0.75rem;
  font-size: 0.88rem;
}

.cab-priemka-thumb {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  background: #e5e7eb;
  display: block;
}

.cab-priemka-thumb.is-empty {
  display: inline-block;
  background: #eef2f7;
}

.cab-priemka-title-item {
  display: flex !important;
  align-items: center;
  gap: 0.55rem;
  grid-template-columns: none;
  text-align: left;
}

.cab-priemka-title-item-text {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}

.cab-priemka-title-item-text strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cab-priemka-title-item-text span {
  font-size: 12px;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cab-priemka-table-wrap {
  overflow-x: visible;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #e5eaf3;
  border-radius: 12px;
  background: #fbfcff;
}

.cab-priemka-bc-cell .rec-create-input-wrap {
  display: block;
}

.cab-priemka-bc-suggest--portal {
  margin: 0;
  max-height: none;
  overflow: auto !important;
  background: #fff;
  z-index: 12000;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.28);
}

.cab-priemka-bc-cell input.is-locked {
  background: #f8fafc;
  color: #94a3b8;
}

.cab-priemka-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.cab-priemka-table th,
.cab-priemka-table td {
  padding: 0.45rem;
  border-bottom: 1px solid #e8eef8;
  vertical-align: middle;
}

.cab-priemka-table th {
  text-align: left;
  font-weight: 600;
  color: #4b5563;
  background: #f3f7ff;
  white-space: normal;
}

.cab-priemka-table td:first-child,
.cab-priemka-table th:first-child {
  text-align: center;
  width: 2.5rem;
  color: #9ca3af;
}

.cab-priemka-table th:nth-child(2),
.cab-priemka-table td:nth-child(2) {
  width: 12%;
}

.cab-priemka-table th:nth-child(3),
.cab-priemka-table td:nth-child(3) {
  width: 11%;
}

.cab-priemka-table th:nth-child(4),
.cab-priemka-table td:nth-child(4) {
  width: 28%;
}

.cab-priemka-table th:nth-child(7),
.cab-priemka-table td:nth-child(7) {
  width: 14%;
}

.cab-priemka-table th:last-child,
.cab-priemka-table td:last-child {
  width: 2.5rem;
}

.cab-priemka-table input {
  width: 100%;
  min-width: 0;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 0.45rem 0.5rem;
  font: inherit;
  background: #fff;
  color: #111827;
  box-sizing: border-box;
}

.cab-priemka-table input:focus {
  outline: none;
  border-color: rgba(36, 93, 255, 0.55);
  box-shadow: 0 0 0 2px rgba(36, 93, 255, 0.12);
}

@media (max-width: 720px) {
  .cab-priemka-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    margin-left: -4px;
    margin-right: -4px;
    padding-left: 4px;
    padding-right: 4px;
  }

  .cab-priemka-table {
    min-width: 640px;
    table-layout: auto;
  }
}

.cab-priemka-remove {
  border: none;
  background: transparent;
  color: #9aa8c0;
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
  padding: 0.25rem 0.5rem;
  border-radius: 8px;
}

.cab-priemka-remove:hover {
  color: #c73a3a;
  background: rgba(199, 58, 58, 0.08);
}

.cab-priemka-row-actions {
  margin: 0.65rem 0 0;
}

.cab-priemka-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.35rem;
}

.cab-priemka-send-status.is-ok {
  color: #1f7a3f;
}

.cab-priemka-send-status.is-error {
  color: #c73a3a;
}

.cab-priemka-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

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

@media (max-width: 720px) {
  .cab-priemka-meta {
    grid-template-columns: 1fr;
  }

  .cab-priemka-cta .btn,
  .cab-priemka-file-bar .btn,
  .cab-priemka-file-bar .cab-priemka-upload-label {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

.reception-create-page-form {
  max-width: 52rem;
}

.reception-kind-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.admin-summary {
  display: grid;
  gap: 1.15rem;
}

.summary-owner-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 20rem);
  gap: 1rem;
  align-items: start;
}

.summary-owner-main {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.summary-owner-side {
  display: grid;
  gap: 0.85rem;
  position: sticky;
  top: 0.75rem;
}

.summary-pulse-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.55rem 0.65rem;
  border-radius: 14px;
  border: 1px solid rgba(36, 93, 255, 0.12);
  background: rgba(248, 250, 252, 0.95);
}

.summary-pulse-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  min-height: 2.2rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 650;
  cursor: pointer;
}

.summary-pulse-chip:hover {
  border-color: #93b4ff;
}

.summary-pulse-chip strong {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.summary-pulse-chip small {
  color: #64748b;
  font-weight: 600;
  font-size: 0.78rem;
}

.summary-pulse-chip.is-alert {
  border-color: #fdba74;
  background: #fff7ed;
  color: #9a3412;
}

.summary-pulse-chip.is-alert small {
  color: #c2410c;
}

.summary-filters-bar {
  position: sticky;
  top: 0;
  z-index: 4;
  display: grid;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(36, 93, 255, 0.12);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
  backdrop-filter: blur(8px);
}

.summary-filters-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
}

.summary-filters-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.summary-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.summary-kpi-card {
  display: grid;
  gap: 4px;
  padding: 1rem 1.05rem;
  text-align: left;
  border-radius: 16px;
  border: 1px solid rgba(36, 93, 255, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(245, 248, 255, 0.92) 100%);
  box-shadow: 0 8px 18px rgba(18, 54, 124, 0.05);
  color: inherit;
  cursor: default;
  font: inherit;
}

button.summary-kpi-card {
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

button.summary-kpi-card:hover {
  border-color: #93b4ff;
  box-shadow: 0 10px 22px rgba(36, 93, 255, 0.1);
}

.summary-kpi-card.is-alert {
  border-color: #fdba74;
  background: linear-gradient(180deg, #fff7ed 0%, #fff 80%);
}

.summary-kpi-label {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.summary-kpi-card strong {
  font-size: 1.65rem;
  line-height: 1.1;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.summary-kpi-card small {
  color: #64748b;
  font-size: 12px;
}

.summary-kpi-delta {
  display: inline-flex;
  align-items: center;
  margin-top: 0.15rem;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: #f1f5f9;
  color: #475569;
}

.summary-kpi-delta.is-up {
  background: #ecfdf5;
  color: #166534;
}

.summary-kpi-delta.is-down {
  background: #fef2f2;
  color: #b91c1c;
}

.summary-viz-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 0.85rem;
  align-items: stretch;
}

.summary-clients-wrap {
  overflow: auto;
  border-radius: 14px;
  border: 1px solid rgba(36, 93, 255, 0.1);
  background: #fff;
}

.summary-clients-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.summary-clients-table th,
.summary-clients-table td {
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid #eef2f7;
  text-align: left;
  vertical-align: middle;
}

.summary-clients-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
}

.summary-clients-table tbody tr:hover td {
  background: #f8fafc;
}

.summary-clients-table td.num,
.summary-clients-table th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.summary-clients-table tfoot td {
  background: #f8fafc;
  font-weight: 700;
  border-bottom: 0;
}

.summary-client-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}

.summary-client-actions .btn {
  min-height: 2rem;
  padding: 0.25rem 0.65rem;
  font-size: 0.8rem;
}

.summary-reports-box {
  display: grid;
  gap: 0.65rem;
}

.summary-reports-box details {
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
  padding: 0.55rem 0.75rem;
}

.summary-reports-box summary {
  cursor: pointer;
  font-weight: 650;
  color: #334155;
}

.summary-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 1rem;
}

.summary-block {
  padding: 0.95rem 1rem 1.05rem;
  border-radius: 16px;
  border: 1px solid rgba(36, 93, 255, 0.1);
  background: rgba(255, 255, 255, 0.9);
}

.summary-block h3 {
  margin: 0;
  font-size: 1.05rem;
}

.summary-block .cabinet-panel-head {
  margin-bottom: 0.65rem;
}

.summary-section-label {
  margin: 0.75rem 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cabinet-muted, #6b7280);
}

.summary-pulse-kpi {
  margin-bottom: 0.5rem;
}

.summary-period-kpi {
  margin: 0.75rem 0 0.5rem;
}

.summary-export-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.5rem 0 0.25rem;
}

.summary-export-row--client .btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.summary-client-export-hint {
  margin: 0 0 0.35rem;
  font-size: 0.88rem;
}

.summary-client-export-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.65rem 0 0.35rem;
}

.summary-client-export {
  font-size: 0.86rem;
}

.summary-risks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.summary-risk-card {
  display: grid;
  gap: 4px;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(100, 116, 139, 0.18);
  background: rgba(248, 250, 252, 0.95);
}

.summary-risk-card.is-alert {
  border-color: #fdba74;
  background: linear-gradient(180deg, #fff7ed 0%, #fff 80%);
}

.summary-risk-card strong {
  font-size: 1.45rem;
  line-height: 1.1;
  color: #0f172a;
}

.summary-risk-card small {
  color: #64748b;
  font-size: 12px;
}

.summary-risk-note {
  margin: 0.35rem 0 0;
  font-size: 0.86rem;
  line-height: 1.45;
}

.summary-chart {
  display: grid;
  gap: 0.55rem;
  padding: 0.75rem 0.85rem 0.9rem;
  border-radius: 14px;
  border: 1px solid rgba(36, 93, 255, 0.1);
  background: rgba(255, 255, 255, 0.92);
}

.summary-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
  font-size: 0.8rem;
  color: #64748b;
}

.summary-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.summary-chart-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: #93b4ff;
}

.summary-chart-swatch.is-qty {
  background: #2563eb;
}

.summary-chart-swatch.is-docs {
  background: #94a3b8;
}

.summary-chart-plot {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  min-height: 96px;
  overflow-x: auto;
  padding-bottom: 0.15rem;
}

.summary-chart-col {
  flex: 1 1 0;
  min-width: 28px;
  display: grid;
  justify-items: center;
  gap: 4px;
}

.summary-chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 76px;
}

.summary-chart-bar {
  display: block;
  width: 8px;
  border-radius: 4px 4px 1px 1px;
  background: #93b4ff;
}

.summary-chart-bar.is-qty {
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
}

.summary-chart-bar.is-docs {
  background: #94a3b8;
}

.summary-chart-label {
  font-size: 10px;
  color: #94a3b8;
  white-space: nowrap;
}

.summary-quality {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 0.35rem;
}

.summary-quality-item {
  display: grid;
  gap: 4px;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(36, 93, 255, 0.1);
  background: rgba(255, 255, 255, 0.92);
}

.summary-quality-item strong {
  font-size: 1.35rem;
  line-height: 1.1;
  color: #0f172a;
}

.summary-quality-item small {
  color: #64748b;
  font-size: 12px;
}

.summary-week-block {
  display: grid;
  gap: 0.85rem;
}

.summary-week-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 0.65rem 0.75rem;
  align-items: end;
}

.summary-week-filters.is-more-open {
  grid-template-columns: repeat(6, minmax(0, 1fr)) auto;
}

.summary-week-filters label {
  display: grid;
  gap: 0.3rem;
  margin: 0;
  font-size: 0.82rem;
  color: #475569;
}

.summary-week-filters input,
.summary-week-filters select {
  width: 100%;
  border: 1px solid #d5dff2;
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  background: #fff;
  font: inherit;
}

.summary-week-filters .summary-week-q {
  grid-column: span 1;
}

.summary-week-filters .summary-filter-more {
  display: none;
}

.summary-week-filters.is-more-open .summary-filter-more {
  display: grid;
}

.summary-week-filters .btn {
  justify-self: start;
}

.summary-filter-more-toggle {
  align-self: end;
}

.summary-week-list {
  display: grid;
  gap: 0.55rem;
}

.summary-docs-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  margin: 0 0 0.45rem;
  font-size: 0.84rem;
  color: #334155;
}

.summary-docs-wrap {
  max-height: min(70vh, 44rem);
  overflow: auto;
  border: 1px solid #c5d0e2;
  border-radius: 8px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.summary-docs-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
}

.summary-docs-table th,
.summary-docs-table td {
  padding: 0.28rem 0.45rem;
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
  white-space: nowrap;
  background: #fff;
}

.summary-docs-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #eef2f7;
  color: #334155;
  font-weight: 700;
  text-align: left;
  box-shadow: inset 0 -1px 0 #c5d0e2;
}

.summary-docs-table td.num,
.summary-docs-table th:nth-child(n + 12) {
  text-align: right;
}

.summary-docs-table tbody tr.is-alt td {
  background: #f8fafc;
}

.summary-docs-table tbody tr.summary-docs-row {
  cursor: pointer;
}

.summary-doc-link {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-weight: 650;
  color: #1d4ed8;
  cursor: pointer;
  text-align: inherit;
  text-decoration: none;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.summary-doc-link:hover,
.summary-doc-link:focus-visible {
  text-decoration: underline;
  outline: none;
}

.summary-doc-link--muted {
  font-weight: 500;
  color: #475569;
}

.summary-docs-table tbody tr:hover td {
  background: #eef6ff;
}

.summary-col-sticky {
  position: sticky;
  left: 0;
  z-index: 2;
}

.summary-docs-table thead th.summary-col-sticky {
  z-index: 4;
}

.summary-col-date {
  left: 0;
  min-width: 4.6rem;
}

.summary-col-kind {
  left: 4.6rem;
  min-width: 5.4rem;
  box-shadow: 2px 0 0 #c5d0e2;
}

.summary-docs-table tbody tr.is-alt td.summary-col-sticky,
.summary-docs-table tbody tr:hover td.summary-col-sticky {
  background: inherit;
}

.summary-docs-table tbody tr.is-alt td.summary-col-sticky {
  background: #f8fafc;
}

.summary-docs-table tbody tr:hover td.summary-col-sticky {
  background: #eef6ff;
}

.summary-docs-table thead th.summary-col-sticky {
  background: #eef2f7;
}

.summary-col-company,
.summary-col-dest,
.summary-col-notes {
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.summary-col-notes {
  max-width: 16rem;
  white-space: nowrap;
}

.summary-docs-totals td {
  position: sticky;
  bottom: 0;
  z-index: 3;
  background: #e8eef8 !important;
  border-top: 2px solid #94a3b8;
  font-size: 0.78rem;
  font-weight: 600;
}

.summary-docs-totals td.summary-col-sticky {
  z-index: 5;
  background: #e8eef8 !important;
}

.summary-diff.is-plus {
  color: #047857;
  font-weight: 700;
}

.summary-diff.is-minus {
  color: #b91c1c;
  font-weight: 700;
}

.summary-diff.is-zero {
  color: #94a3b8;
}

.summary-kind-badge,
.summary-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
}

.summary-kind-badge--delivery {
  background: #dbeafe;
  color: #1d4ed8;
}

.summary-kind-badge--reception {
  background: #d1fae5;
  color: #047857;
}

.summary-kind-badge--tz {
  background: #ffedd5;
  color: #c2410c;
}

.summary-status-badge--new {
  background: #e2e8f0;
  color: #475569;
}

.summary-status-badge--accepted,
.summary-status-badge--ready {
  background: #d1fae5;
  color: #047857;
}

.summary-status-badge--accepted_diff {
  background: #fef3c7;
  color: #b45309;
}

.summary-status-badge--rejected {
  background: #fee2e2;
  color: #b91c1c;
}

.summary-week-client {
  border: 1px solid rgba(36, 93, 255, 0.12);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.summary-week-client-sum {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  padding: 0.75rem 0.9rem;
  cursor: pointer;
  list-style: none;
}

.summary-week-client-sum::-webkit-details-marker {
  display: none;
}

.summary-week-client-name {
  font-weight: 700;
  color: #0f172a;
}

.summary-week-client-meta {
  font-size: 0.86rem;
  color: #64748b;
}

.summary-week-client-body {
  padding: 0 0.9rem 0.9rem;
  border-top: 1px solid rgba(36, 93, 255, 0.08);
}

.summary-week-rec-meta {
  margin: 0.65rem 0 0.5rem;
  font-size: 0.82rem;
  line-height: 1.4;
}

.summary-week-products th:nth-child(4),
.summary-week-products th:nth-child(5),
.summary-week-products td.num {
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .summary-owner-layout {
    grid-template-columns: 1fr;
  }

  .summary-owner-side {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .summary-viz-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .summary-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .summary-columns {
    grid-template-columns: 1fr;
  }

  .summary-week-filters,
  .summary-week-filters.is-more-open {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .summary-week-filters .summary-week-q,
  .summary-week-filters .btn,
  .summary-filter-more-toggle {
    grid-column: 1 / -1;
  }

  .summary-docs-wrap {
    max-height: min(65vh, 36rem);
  }

  .summary-col-company,
  .summary-col-dest,
  .summary-col-notes {
    max-width: 9rem;
  }
}

@media (max-width: 560px) {
  .summary-risks,
  .summary-quality {
    grid-template-columns: 1fr;
  }

  .summary-owner-side {
    grid-template-columns: 1fr;
  }

  .summary-kpi-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .admin-totals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.admin-total-card {
  display: grid;
  gap: 6px;
  padding: 1rem 1.05rem;
  border-radius: 16px;
  border: 1px solid rgba(36, 93, 255, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(245, 248, 255, 0.92) 100%);
  box-shadow: 0 8px 18px rgba(18, 54, 124, 0.05);
}

.admin-total-label {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.admin-total-card strong {
  font-size: 1.65rem;
  line-height: 1.1;
  color: #0f172a;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.admin-total-card small {
  color: #64748b;
  font-size: 12px;
}

.admin-clients {
  display: grid;
  gap: 14px;
}

.clients-table-wrap {
  padding: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 18px;
  border: 1px solid rgba(36, 93, 255, 0.12);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 28px rgba(18, 54, 124, 0.06);
}

.clients-simple-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
}

.clients-simple-table thead th {
  background: #f1f5ff;
  border-bottom: 1px solid #dbe4f5;
  padding: 13px 16px;
  white-space: nowrap;
}

.clients-simple-table thead th.num,
.clients-simple-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.clients-simple-table tbody td {
  padding: 14px 16px;
  vertical-align: middle;
  border-bottom: 1px solid #e8eef8;
  background: #fff;
}

.clients-simple-table tbody tr:last-child td {
  border-bottom: 0;
}

.clients-simple-table tbody tr:hover > td {
  background: rgba(36, 93, 255, 0.035);
}

.clients-col-company {
  min-width: 12rem;
  width: 42%;
}

.clients-col-login {
  min-width: 7rem;
  max-width: 14rem;
}

.clients-simple-table thead th.num,
.clients-simple-table td.num {
  width: 6.5rem;
  white-space: nowrap;
}

.clients-company {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.clients-avatar {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 12px;
  background: linear-gradient(160deg, #e8efff 0%, #dbe7ff 100%);
  color: #245dff;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.clients-company-name {
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.clients-login {
  display: inline-block;
  max-width: 16rem;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0.28rem 0.55rem;
  border-radius: 8px;
  background: #f1f5f9;
  color: #334155;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.clients-login.is-empty {
  background: transparent;
  color: #94a3b8;
  font-family: inherit;
  font-weight: 500;
  padding-left: 0;
}

.clients-col-stock {
  color: #94a3b8;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
}

.clients-col-stock.has-stock {
  color: #0f172a;
  font-weight: 750;
}

.clients-stock-empty {
  color: #cbd5e1;
  font-weight: 600;
}

.clients-stock-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.25rem;
  padding: 0.35rem 0.7rem;
  border-radius: 9px;
  background: #f1f5f9;
  color: #64748b;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.clients-stock-chip.is-positive {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, 0.18);
}

.clients-stock-chip:hover {
  background: #dbeafe;
  color: #1e40af;
  border-color: rgba(37, 99, 235, 0.35);
}

.clients-stock-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.clients-stock-link:hover {
  color: #1d4ed8;
  border-bottom-color: rgba(29, 78, 216, 0.45);
}

.cab-stock-defects {
  margin: 0 0 1.35rem;
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid #fb923c;
  background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%);
  box-shadow: 0 1px 2px rgba(154, 52, 18, 0.08);
}

.cab-stock-defects-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.75rem;
  margin: 0 0 0.85rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: #9a3412;
}

.cab-stock-defects-banner strong {
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.cab-stock-defects-banner .cabinet-muted {
  color: #c2410c;
  font-weight: 600;
}

.cab-stock-defects .cabinet-table-wrap {
  margin: 0;
  background: #fff;
  border-color: #fdba74;
}

.cab-defect-edit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  justify-content: flex-end;
}

.cab-defect-qty-input {
  width: 5.5rem;
  min-height: 2.1rem;
  padding: 0.3rem 0.45rem;
  border: 1px solid #fdba74;
  border-radius: 8px;
  font: inherit;
  text-align: right;
  background: #fff;
}

.cab-defect-qty-input:focus {
  outline: 2px solid rgba(234, 88, 12, 0.35);
  outline-offset: 1px;
}

.cab-defect-save {
  white-space: nowrap;
}

.cab-stock-balances-head {
  margin-top: 0.25rem;
}

.cab-stock-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.75rem;
}

.cab-stock-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
}

.cab-stock-stat-value {
  font-size: 0.95rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  color: #0f172a;
  line-height: 1.2;
}

.cab-stock-stat-label {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 600;
}

.cab-stock-stat--in .cab-stock-stat-value {
  color: #047857;
}

.cab-stock-stat--out .cab-stock-stat-value {
  color: #1d4ed8;
}

.cab-stock-stat--defect .cab-stock-stat-value {
  color: #c2410c;
}

.cab-stock-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  margin: 0 0 0.9rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid #e8eef7;
  background: #f8fafc;
}

.cab-stock-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: #64748b;
}

.cab-mov-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: nowrap;
}

.cab-mov-badge--in {
  background: #d1fae5;
  color: #065f46;
}

.cab-mov-badge--fbo {
  background: #dbeafe;
  color: #1e40af;
}

.cab-mov-badge--fbs {
  background: #ede9fe;
  color: #5b21b6;
}

.cab-mov-badge--defect {
  background: #ffedd5;
  color: #9a3412;
}

.cab-mov-badge--other {
  background: #e2e8f0;
  color: #334155;
}

.cab-stock-card-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.cab-stock-card {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.55rem 0.75rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  border-bottom: 1px solid #eef2f7;
}

.cab-stock-card:last-child {
  border-bottom: 0;
}

.cab-stock-card:hover {
  background: #f8fafc;
}

.cab-stock-card-photo {
  line-height: 0;
}

.cab-stock-card-photo .stock-thumb,
.cab-stock-card-photo .stock-thumb--empty {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.cab-stock-card-body {
  min-width: 0;
}

.cab-stock-card-title {
  font-weight: 650;
  font-size: 0.9rem;
  color: #0f172a;
  line-height: 1.25;
  margin: 0 0 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cab-stock-card-meta {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  font-size: 0.72rem;
  color: #94a3b8;
  overflow: hidden;
}

.cab-stock-card-meta-item {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cab-stock-card-qty {
  display: inline-flex;
  align-items: baseline;
  gap: 0.2rem;
  text-align: right;
  min-width: 0;
  flex-shrink: 0;
  padding: 0.2rem 0.55rem;
  border-radius: 8px;
  background: #f1f5f9;
}

.cab-stock-card-qty-num {
  display: inline;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1.2;
}

.cab-stock-card-qty-unit {
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 600;
  text-transform: lowercase;
}

.cab-stock-card-qty--edit {
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  background: #eff6ff;
  border: 1px solid rgba(36, 93, 255, 0.18);
  padding: 0.3rem 0.45rem;
}

.cab-stock-qty-input {
  width: 4.5rem;
  padding: 0.28rem 0.4rem;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  font-size: 0.95rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: #0f172a;
  background: #fff;
}

.cab-stock-qty-input:focus {
  outline: none;
  border-color: #245dff;
  box-shadow: 0 0 0 2px rgba(36, 93, 255, 0.15);
}

.cab-stock-qty-save {
  padding: 0.28rem 0.55rem;
  font-size: 12px;
  font-weight: 700;
  border-radius: 7px;
}

.cab-stock-mov-head {
  margin-top: 1.5rem;
  align-items: flex-end;
  gap: 0.75rem;
}

.cab-stock-mov-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.cab-stock-filter {
  appearance: none;
  border: 1px solid #d7dee9;
  background: #fff;
  color: #475569;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 650;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
}

.cab-stock-filter:hover {
  border-color: #94a3b8;
  color: #0f172a;
}

.cab-stock-filter.is-active {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
}

.cab-mov-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.cab-mov-card {
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #fff;
  border-left-width: 4px;
}

.cab-mov-card--in {
  border-left-color: #10b981;
}

.cab-mov-card--fbo {
  border-left-color: #2563eb;
}

.cab-mov-card--fbs {
  border-left-color: #7c3aed;
}

.cab-mov-card--defect {
  border-left-color: #ea580c;
}

.cab-mov-card--other {
  border-left-color: #94a3b8;
}

.cab-mov-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}

.cab-mov-date {
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
}

.cab-mov-card-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.3rem;
}

.cab-mov-product {
  font-weight: 650;
  color: #0f172a;
  min-width: 0;
}

.cab-mov-product-link,
.cab-mov-doc-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}

.cab-mov-product-link:hover,
.cab-mov-doc-link:hover {
  color: #1d4ed8;
  border-bottom-color: #1d4ed8;
}

.cab-mov-qty {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.cab-mov-qty--in {
  color: #047857;
}

.cab-mov-qty--out {
  color: #1d4ed8;
}

.cab-mov-qty--defect {
  color: #c2410c;
}

.cab-mov-doc {
  font-size: 0.84rem;
  color: #64748b;
}

@media (max-width: 720px) {
  .cab-stock-card {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 0.5rem;
    padding: 0.5rem 0.65rem;
  }

  .cab-stock-card-photo .stock-thumb,
  .cab-stock-card-photo .stock-thumb--empty {
    width: 36px;
    height: 36px;
  }

  .cab-stock-card-title {
    font-size: 0.84rem;
  }

  .cab-stock-card-qty {
    padding: 0.15rem 0.45rem;
  }

  .cab-stock-card-qty-num {
    font-size: 0.95rem;
  }

  .cab-stock-mov-head {
    flex-direction: column;
    align-items: stretch;
  }

  .cab-mov-card-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }
}

.stock-balances-table .stock-thumb-col,
.stock-balances-table .stock-thumb-cell {
  width: 56px;
  padding-top: 8px;
  padding-bottom: 8px;
  vertical-align: middle;
}

.stock-thumb-btn {
  display: block;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  border-radius: 8px;
  line-height: 0;
}

.stock-thumb-btn:focus-visible {
  outline: 2px solid #245dff;
  outline-offset: 2px;
}

.stock-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #c5d0e0;
  display: block;
  background: #fff;
}

.stock-thumb--empty {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 1px dashed #d7dee9;
  background: #f8fafc;
  font-size: 10px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

@media (max-width: 720px) {
  .stock-balances-table,
  .stock-balances-table thead,
  .stock-balances-table tbody,
  .stock-balances-table tr,
  .stock-balances-table th,
  .stock-balances-table td,
  #stock-movements .cabinet-table,
  #stock-movements .cabinet-table thead,
  #stock-movements .cabinet-table tbody,
  #stock-movements .cabinet-table tr,
  #stock-movements .cabinet-table th,
  #stock-movements .cabinet-table td,
  #stock-defects .cabinet-table,
  #stock-defects .cabinet-table thead,
  #stock-defects .cabinet-table tbody,
  #stock-defects .cabinet-table tr,
  #stock-defects .cabinet-table th,
  #stock-defects .cabinet-table td {
    display: block;
    width: 100%;
  }

  .stock-balances-table thead,
  #stock-movements .cabinet-table thead,
  #stock-defects .cabinet-table thead {
    display: none;
  }

  .stock-balances-table tr,
  #stock-movements .cabinet-table tr,
  #stock-defects .cabinet-table tr {
    margin: 0 0 10px;
    padding: 10px 12px;
    border: 1px solid #e5eaf3;
    border-radius: 12px;
    background: #fff;
    box-sizing: border-box;
  }

  .stock-balances-table td,
  #stock-movements .cabinet-table td,
  #stock-defects .cabinet-table td {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 4px 0;
    border: 0;
    text-align: left;
  }

  .stock-balances-table td::before,
  #stock-movements .cabinet-table td::before,
  #stock-defects .cabinet-table td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    max-width: 42%;
    color: #64748b;
    font-size: 12px;
    font-weight: 650;
  }

  .stock-balances-table td.stock-thumb-cell {
    display: block;
    padding-bottom: 8px;
  }

  .stock-balances-table td.stock-thumb-cell::before {
    display: none;
  }

  .stock-balances-table td.num,
  #stock-movements .cabinet-table td.num,
  #stock-defects .cabinet-table td.num {
    text-align: left;
  }

  .stock-balances-table .stock-thumb,
  .stock-balances-table .stock-thumb--empty {
    width: 52px;
    height: 52px;
  }
}

.stock-fbs-modal .stock-fbs-dialog {
  width: min(720px, 100%);
  max-height: min(88vh, 820px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 1rem;
}

.stock-fbs-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
  flex: 0 0 auto;
}

.stock-fbs-date-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1.25rem;
  margin-bottom: 0.75rem;
  flex: 0 0 auto;
}

.stock-fbs-date-label {
  display: grid;
  gap: 0.35rem;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.stock-fbs-date-label input {
  min-width: 11rem;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
}

.stock-fbs-hint {
  margin: 0 0 0.2rem;
  font-size: 12px;
}

.stock-fbs-table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  border: 1px solid #e5eaf3;
  border-radius: 12px;
}

.stock-fbs-table {
  width: 100%;
  table-layout: fixed;
}

.stock-fbs-table th:nth-child(1),
.stock-fbs-table td:nth-child(1) {
  width: auto;
}

.stock-fbs-table th:nth-child(2),
.stock-fbs-table td:nth-child(2) {
  width: 5.5rem;
}

.stock-fbs-table th:nth-child(3),
.stock-fbs-table td:nth-child(3) {
  width: 6.5rem;
}

.stock-fbs-product-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  min-width: 0;
}

.stock-fbs-product-row .stock-thumb,
.stock-fbs-product-row .stock-thumb--empty {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
}

.stock-fbs-product-text {
  min-width: 0;
  flex: 1;
}

.stock-fbs-product-title {
  font-size: 13px;
  font-weight: 650;
  line-height: 1.3;
  color: #0f172a;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.stock-fbs-product-title .products-title-link,
.stock-fbs-product-title-link.products-title-link,
.cab-stock-card-title .products-title-link,
.cab-stock-card-title-text.products-title-link {
  color: inherit;
  text-decoration: none;
  font-weight: inherit;
}

.stock-fbs-product-title .products-title-link:hover,
.stock-fbs-product-title-link.products-title-link:hover,
.cab-stock-card-title .products-title-link:hover,
.cab-stock-card-title-text.products-title-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.stock-fbs-product-row .stock-thumb-btn {
  flex: 0 0 auto;
}

.stock-fbs-product-meta {
  margin-top: 2px;
  font-size: 11px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stock-fbs-table .stock-fbs-qty {
  width: 100%;
  max-width: 5.5rem;
  padding: 0.4rem 0.45rem;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  text-align: right;
  box-sizing: border-box;
}

.stock-fbs-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 0.85rem;
  flex: 0 0 auto;
}

#stock-fbs-error,
#stock-fbs-status {
  flex: 0 0 auto;
  margin: 0.5rem 0 0;
}

.clients-col-actions {
  width: 1%;
  text-align: right;
  white-space: nowrap;
  padding-right: 1rem;
  vertical-align: middle;
}

.clients-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
}

.clients-col-actions .btn,
.clients-col-actions .btn-ghost {
  flex: 0 0 auto;
}

.clients-invite-btn {
  padding: 0.4rem 0.75rem;
  font-size: 12.5px;
  font-weight: 650;
  border-radius: 9px;
  border: 1px solid #e2e8f0;
  color: #475569;
  background: #fff;
}

.clients-invite-btn:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
}

.clients-tg-btn {
  padding: 0.4rem 0.7rem;
  font-size: 12.5px;
  font-weight: 700;
  border-radius: 9px;
  border: 1px solid #e2e8f0;
  color: #475569;
  background: #fff;
}

.clients-tg-btn.is-on {
  border-color: rgba(36, 93, 255, 0.35);
  color: #1d4ed8;
  background: #eff6ff;
}

#admin-client-notify-modal .cab-confirm-comment input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d0d9ea;
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  font-size: 0.95rem;
}

.clients-open-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.8rem;
  font-size: 12.5px;
  font-weight: 700;
  border-radius: 9px;
  border: 1px solid rgba(36, 93, 255, 0.22);
  color: #245dff;
  background: #fff;
  box-shadow: none;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.2;
  box-sizing: border-box;
}

.clients-open-btn:hover {
  border-color: #245dff;
  background: #eff4ff;
  color: #1d4ed8;
}

.clients-open-btn::after {
  display: none;
}

/* Staff/admin cabinet: use wider canvas on large displays */
@media (min-width: 1280px) {
  .cabinet-page .container {
    width: min(1400px, calc(100% - 48px));
  }

  .admin-totals {
    gap: 14px;
    margin-bottom: 22px;
  }

  .admin-total-card {
    padding: 1.15rem 1.2rem;
  }

  .admin-total-card strong {
    font-size: 1.85rem;
  }

  .clients-simple-table thead th,
  .clients-simple-table tbody td {
    padding: 15px 18px;
  }

  .clients-col-company {
    width: 46%;
  }
}

@media (min-width: 1600px) {
  .cabinet-page .container {
    width: min(1640px, calc(100% - 64px));
  }
}

/* Clients table → stacked cards on phones */
@media (max-width: 720px) {
  .clients-table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
  }

  .clients-simple-table,
  .clients-simple-table thead,
  .clients-simple-table tbody,
  .clients-simple-table tr,
  .clients-simple-table th,
  .clients-simple-table td {
    display: block;
    width: 100%;
  }

  .clients-simple-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .clients-simple-table tbody {
    display: grid;
    gap: 10px;
  }

  .clients-simple-table tbody tr {
    margin: 0;
    padding: 12px 14px;
    border: 1px solid rgba(36, 93, 255, 0.14);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 6px 16px rgba(18, 54, 124, 0.05);
  }

  .clients-simple-table tbody tr:hover > td {
    background: transparent;
  }

  .clients-simple-table tbody td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 0.4rem 0;
    border: 0;
    background: transparent;
    text-align: right;
    box-sizing: border-box;
  }

  .clients-simple-table tbody td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    text-align: left;
  }

  .clients-simple-table tbody td.clients-col-company {
    display: block;
    width: auto;
    min-width: 0;
    padding: 0 0 0.55rem;
    margin: 0 0 0.35rem;
    border-bottom: 1px solid #e8eef8;
    text-align: left;
  }

  .clients-simple-table tbody td.clients-col-company::before {
    display: none;
  }

  .clients-simple-table tbody td.clients-col-login {
    max-width: none;
  }

  .clients-simple-table tbody td.num {
    width: auto;
    text-align: right;
  }

  .clients-simple-table tbody td.clients-col-actions {
    display: block;
    width: auto;
    padding-top: 0.65rem;
    padding-right: 0;
    margin-top: 0.25rem;
    border-top: 1px solid #e8eef8;
    white-space: normal;
    text-align: left;
  }

  .clients-simple-table tbody td.clients-col-actions::before {
    display: none;
  }

  .clients-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100%;
  }

  .clients-col-actions .btn,
  .clients-col-actions .btn-ghost,
  .clients-open-btn {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }

  .clients-login {
    max-width: 100%;
  }

  .admin-totals {
    gap: 10px;
    margin: 4px 0 14px;
  }

  .admin-total-card {
    padding: 0.85rem 0.9rem;
  }

  .admin-total-card strong {
    font-size: 1.35rem;
  }
}

@media (max-width: 560px) {
  .cabinet-page .staff-tabs.cabinet-tabs {
    gap: 4px;
    padding: 4px;
  }

  .cabinet-page .staff-tabs .cabinet-tab {
    flex: 0 0 auto;
    font-size: 0.8rem;
    padding: 0.5rem 0.7rem;
    min-height: 40px;
  }
}

.admin-client-card {
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(36, 93, 255, 0.14);
  background: rgba(255, 255, 255, 0.88);
}

.sklad-client-card {
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sklad-client-card:hover,
.sklad-client-card:focus-visible {
  border-color: rgba(36, 93, 255, 0.42);
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.06);
  outline: none;
}

.admin-client-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.admin-client-head h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.admin-client-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-top: 12px;
  font-size: 14px;
  color: #374151;
}

.admin-warn {
  color: #b42318;
}

.admin-last {
  margin: 10px 0 0;
  font-size: 13px;
}

.admin-breakdown-wrap {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e5eaf3;
}

.admin-breakdown {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.admin-break-col {
  min-width: 0;
}

.admin-break-col-wide,
.admin-break-col:first-child {
  grid-column: 1 / -1;
}

.admin-breakdown-wrap[hidden] {
  display: none !important;
}

.admin-break-col h4 {
  margin: 0 0 8px;
  font-size: 14px;
}

.reception-toggle-cell {
  width: 56px;
  padding-right: 4px !important;
}

.reception-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 6px 8px;
  border: 1px solid #c5d0e0;
  border-radius: 8px;
  background: #fff;
  color: #1f2937;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  min-height: 32px;
}

.reception-toggle:hover {
  border-color: #245dff;
  color: #1d4ed8;
}

.reception-toggle-arrow {
  display: inline-block;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 7px solid currentColor;
  transition: transform 0.15s ease;
}

.reception-toggle.is-open .reception-toggle-arrow {
  transform: rotate(90deg);
}

.reception-date {
  color: #dc2626;
  font-weight: 700;
}

.reception-lines-row[hidden] {
  display: none !important;
}

.reception-lines-row > td {
  padding: 0 12px 14px;
  background: transparent;
  border-bottom: 1px solid #e5eaf3;
}

.cabinet-table-nested {
  margin: 0;
  width: 100%;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  color: #0f172a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.cabinet-table-nested th,
.cabinet-table-nested td {
  padding: 10px 12px;
  font-size: 13px;
  border-bottom: 1px solid #e8eef5;
  color: #1e293b;
  vertical-align: middle;
}

.cabinet-table-nested th {
  background: #eef2ff;
  color: #475569;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.cabinet-table-nested tbody tr:last-child td {
  border-bottom: 0;
}

.cabinet-table-nested tbody tr:hover td {
  background: rgba(36, 93, 255, 0.04);
}

.cabinet-table-nested td:last-child {
  font-weight: 700;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.cabinet-table-nested .reception-line-photo-sm {
  border: 1px solid #e2e8f0;
  background: #fff;
}

.reception-lines-empty {
  margin: 8px 0 0;
  color: #4b5568;
}

.admin-dl-btn,
.sklad-dl-btn {
  padding: 6px 10px !important;
  font-size: 13px !important;
  min-height: 0 !important;
}

.reception-status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  background: #e5e7eb;
  color: #111827;
}

.reception-status-badge.is-new,
.cabinet-badge.reception-status-new {
  background: #dbeafe;
  color: #1e40af;
}

.reception-status-badge.is-accepted,
.cabinet-badge.reception-status-accepted {
  background: #d1fae5;
  color: #065f46;
}

.reception-status-badge.is-accepted_diff,
.cabinet-badge.reception-status-accepted_diff {
  background: #ffe4e6;
  color: #9f1239;
}

.reception-status-badge.is-rejected,
.cabinet-badge.reception-status-rejected {
  background: #fee2e2;
  color: #991b1b;
}

.reception-edit-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
}

.reception-reject-btn {
  color: #9f1239 !important;
  border-color: rgba(159, 18, 57, 0.28) !important;
}

.reception-reject-btn:hover {
  background: #fff1f2 !important;
}

.staff-rec-card .cabinet-badge.reception-status-rejected {
  background: #fee2e2;
  color: #991b1b;
}

.staff-tabs {
  margin: 0 0 1.25rem;
  width: 100%;
  max-width: 100%;
}

.cabinet-tab.is-urgent {
  background: #fff7ed;
  color: #9a3412;
}

.cabinet-tab.is-urgent:hover {
  background: #ffedd5;
  color: #9a3412;
}

.cabinet-tab.is-urgent.active {
  background: #ea580c;
  color: #fff;
  box-shadow: 0 1px 3px rgba(234, 88, 12, 0.25);
}

.urgent-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.15rem;
  min-width: 1.25rem;
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
  background: #ea580c;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}

.cabinet-tab.is-urgent.active .urgent-count-badge {
  background: #fff;
  color: #c2410c;
}

.urgent-number,
.btn-link {
  background: none;
  border: 0;
  padding: 0;
  color: #245dff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
}

.urgent-number:hover,
.btn-link:hover {
  color: #1d4ed8;
}

.cab-item.is-deep-link-focus,
.products-head-row.is-deep-link-focus td {
  outline: 2px solid #245dff;
  outline-offset: 2px;
  border-radius: 8px;
}

.reception-actions {
  white-space: nowrap;
}

.staff-receptions {
  margin-bottom: 1rem;
}

.staff-rec-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 0 0 0.85rem;
}

.staff-rec-chips {
  margin: 0 0 0.65rem;
}

.staff-rec-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.staff-rec-head {
  margin-bottom: 0.75rem;
}

.staff-rec-list-host {
  margin-top: 0.25rem;
}

.staff-rec-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  margin: 0 0 0.45rem;
  font-size: 0.84rem;
  color: #334155;
}

.staff-rec-sheet {
  max-height: min(68vh, 42rem);
  overflow: auto;
  border: 1px solid #c5d0e2;
  border-radius: 8px;
  background: #fff;
}

.staff-rec-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
}

.staff-rec-table--fit {
  table-layout: fixed;
}

.staff-rec-table th,
.staff-rec-table td {
  padding: 0.28rem 0.4rem;
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
  background: #fff;
}

.staff-rec-table--fit th,
.staff-rec-table--fit td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.staff-rec-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #eef2f7;
  color: #334155;
  font-weight: 700;
  text-align: left;
  box-shadow: inset 0 -1px 0 #c5d0e2;
}

.staff-rec-table td.num {
  text-align: right;
}

.staff-rec-table tbody tr.is-alt td {
  background: #f8fafc;
}

.staff-rec-table tbody tr:hover td {
  background: #eef6ff;
}

.staff-rec-table--fit .staff-rec-col-date {
  width: 6.5%;
}

.staff-rec-table--fit .staff-rec-col-kind {
  width: 8%;
}

.staff-rec-table--fit .staff-rec-col-num {
  width: 14%;
}

.staff-rec-table--fit .staff-rec-col-company {
  width: 20%;
}

.staff-rec-table--fit .staff-rec-col-status {
  width: 10%;
}

.staff-rec-table--fit .staff-rec-col-created {
  width: 9%;
}

.staff-rec-table--fit .staff-rec-col-actions {
  width: 16%;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}

.staff-rec-table--fit th:nth-child(6),
.staff-rec-table--fit th:nth-child(7),
.staff-rec-table--fit th:nth-child(8),
.staff-rec-table--fit td.num {
  width: 5.5%;
}

.staff-rec-totals td {
  position: sticky;
  bottom: 0;
  z-index: 3;
  background: #e8eef8 !important;
  border-top: 2px solid #94a3b8;
  font-weight: 600;
}

.staff-rec-act {
  padding: 0.15rem 0.4rem !important;
  min-height: 0 !important;
  font-size: 0.72rem !important;
  margin-right: 0.15rem;
}

.staff-rec-num {
  font: inherit;
  font-weight: 700;
  color: #1d4ed8;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.staff-rec-num:hover {
  text-decoration: underline;
}

.staff-rec-diff.is-plus {
  color: #047857;
  font-weight: 700;
}

.staff-rec-diff.is-minus {
  color: #b91c1c;
  font-weight: 700;
}

.staff-rec-diff.is-zero {
  color: #94a3b8;
}

.cabinet-badge.reception-kind-manual {
  background: #eff6ff;
  color: #1d4ed8;
}

.cabinet-badge.reception-kind-returns {
  background: #fff7ed;
  color: #c2410c;
}

.staff-rec-filters input[type="search"],
.staff-rec-filters select {
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--cab-line-strong);
  border-radius: var(--cab-radius-sm);
  font: inherit;
  background: var(--cab-surface);
  color: var(--cab-ink);
}

@media (max-width: 720px) {
  .staff-rec-head {
    flex-direction: column;
    align-items: stretch;
  }

  .staff-rec-actions {
    width: 100%;
  }

  .staff-rec-actions .btn,
  .staff-rec-actions .btn-ghost {
    flex: 1 1 auto;
    justify-content: center;
  }
}

.staff-urgent .urgent-block {
  margin: 0 0 1.25rem;
  border: 1px solid var(--cab-line);
  border-radius: var(--cab-radius);
  background: var(--cab-surface-soft);
  box-shadow: var(--cab-shadow);
  padding: 0.9rem 0.95rem 1rem;
}

.staff-urgent .urgent-block h3 {
  margin: 0 0 0.7rem;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
  color: var(--cab-ink);
}

.staff-urgent .cab-list {
  gap: 0.45rem;
}

.staff-urgent .cab-item {
  border-color: var(--cab-line);
  box-shadow: var(--cab-shadow);
}

.staff-receptions .cab-item-title.btn-link,
.staff-urgent .cab-item-title.btn-link {
  font: inherit;
  font-weight: 700;
  color: #0f172a;
  text-align: left;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.staff-receptions .cab-item-title.btn-link:hover,
.staff-urgent .cab-item-title.btn-link:hover {
  color: #245dff;
}

.staff-rec-card .cab-item-main {
  min-width: 0;
  align-items: flex-start;
}

.staff-rec-card .cab-item-body {
  width: 100%;
}

.staff-rec-facts {
  display: grid;
  grid-template-columns: minmax(10rem, 1.8fr) repeat(3, max-content) minmax(9rem, 1fr);
  gap: 0.55rem 1.5rem;
  align-items: start;
  margin: 0.65rem 0 0;
  padding: 0.75rem 0.95rem;
  border: 1px solid #d7e3f7;
  border-radius: 12px;
  background: linear-gradient(180deg, #f5f8ff 0%, #eef3fc 100%);
}

.staff-rec-fact {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.staff-rec-fact-k {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.staff-rec-fact-v {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.staff-rec-fact--client .staff-rec-fact-v {
  color: #1e3a8a;
}

.staff-rec-fact--created {
  justify-self: end;
  text-align: right;
}

.staff-rec-card .cab-item-title-row {
  align-items: flex-start;
  gap: 0.65rem;
}

.staff-rec-card .cabinet-badge {
  flex: 0 0 auto;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.2;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.staff-rec-card .cabinet-badge.reception-status-new {
  background: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #93c5fd;
}

.staff-rec-card .cabinet-badge.reception-status-accepted {
  background: #bbf7d0;
  color: #047857;
  border: 1px solid #6ee7b7;
}

.staff-rec-card .cabinet-badge.reception-status-accepted_diff {
  background: #fecdd3;
  color: #be123c;
  border: 1px solid #fda4af;
}

.staff-rec-card .cabinet-badge.reception-status-rejected {
  background: #fecaca;
  color: #991b1b;
  border: 1px solid #f87171;
}

.cab-item-reject-note {
  margin: 0.55rem 0 0;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #9f1239;
  font-size: 0.9rem;
  line-height: 1.4;
}

.cab-item-reject-note strong {
  font-weight: 700;
}

.reception-reject-dialog {
  max-width: 480px;
}

.reception-reject-dialog textarea {
  width: 100%;
  min-height: 96px;
  resize: vertical;
}

.staff-rec-card .cab-item-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.95rem 0.9rem;
  min-width: 0;
}

.staff-rec-card .cab-item-actions .btn,
.staff-rec-card .cab-item-actions .btn-ghost {
  flex: 0 0 auto;
  width: auto;
  min-height: 36px;
  padding: 0.4rem 0.85rem;
  font-size: 0.88rem;
  justify-content: center;
  white-space: nowrap;
}

.staff-rec-card .cab-item-actions .reception-reject-btn,
.staff-rec-card .cab-item-actions .cab-item-delete {
  order: 3;
}

.staff-rec-card .cab-item-actions [data-rec-edit].btn,
.staff-rec-card .cab-item-actions [data-rec-edit].btn-ghost {
  order: 1;
}

.staff-rec-card .cab-item-actions a.btn,
.staff-rec-card .cab-item-actions a.btn-ghost {
  order: 2;
}

@media (min-width: 1280px) {
  .staff-rec-facts {
    gap: 0.6rem 2rem;
    padding: 0.85rem 1.1rem;
  }

  .staff-rec-card .cab-item-actions {
    padding-left: 1.1rem;
    padding-right: 1.1rem;
  }
}

@media (max-width: 860px) {
  .staff-rec-facts {
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem 0.85rem;
  }

  .staff-rec-fact--client,
  .staff-rec-fact--created {
    grid-column: 1 / -1;
  }

  .staff-rec-fact--created {
    justify-self: stretch;
    text-align: left;
  }

  .staff-rec-card .cab-item-actions {
    justify-content: stretch;
  }

  .staff-rec-card .cab-item-actions .btn,
  .staff-rec-card .cab-item-actions .btn-ghost {
    flex: 1 1 calc(50% - 0.25rem);
  }
}

@media (max-width: 560px) {
  .staff-rec-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .staff-rec-filters input[type="search"] {
    width: 100%;
  }

  .staff-rec-facts {
    grid-template-columns: 1fr;
  }

  .staff-rec-card .cab-item-title-row {
    flex-wrap: wrap;
  }

  .staff-rec-card .cab-item-actions .btn,
  .staff-rec-card .cab-item-actions .btn-ghost {
    flex: 1 1 100%;
  }
}

.urgent-overdue-tag {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 1px 6px;
  border-radius: 4px;
  background: #fee2e2;
  color: #991b1b;
  font-size: 11px;
  font-weight: 700;
  vertical-align: middle;
}

.urgent-row-overdue td {
  background: rgba(254, 226, 226, 0.45);
}

.cab-item.urgent-row-overdue {
  border-color: #fecaca;
  background: #fff7f7;
}

.reception-edit-line {
  margin-bottom: 0.85rem;
}

.reception-line-card {
  display: grid;
  gap: 0.65rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fafafa;
}

.reception-line-product {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.reception-line-photo,
.reception-line-photo-sm {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  background: #e5e7eb;
  flex-shrink: 0;
}

.reception-line-photo-btn,
.reception-line-photo-sm-btn {
  display: inline-flex;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  border-radius: 8px;
  line-height: 0;
  flex-shrink: 0;
}

.reception-line-photo-btn:hover img,
.reception-line-photo-sm-btn:hover img {
  box-shadow: 0 0 0 2px rgba(36, 93, 255, 0.35);
}

.reception-line-product-title-link {
  color: #1639a8;
  text-decoration: none;
}

.reception-line-product-title-link:hover {
  text-decoration: underline;
}

.reception-line-photo-sm {
  width: 40px;
  height: 40px;
}

.reception-line-photo-empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #9ca3af;
  text-align: center;
  line-height: 1.2;
  padding: 4px;
}

.reception-line-product-title {
  font-weight: 700;
  color: #111827;
}

.reception-line-product-sub {
  font-size: 12px;
  margin-top: 2px;
}

.reception-line-warn {
  display: inline-block;
  margin-top: 4px;
  font-size: 12px;
  color: #b45309;
}

.reception-line-qtys {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.reception-line-qtys input.is-diff,
.reception-line-qtys input.is-diff-plan,
.reception-edit-table input.is-diff,
.reception-edit-table input.is-diff-plan {
  color: #b91c1c;
  font-weight: 700;
  border-color: #fca5a5;
}

.reception-line-pick select {
  width: 100%;
}

.reception-create-lines {
  margin-bottom: 0.75rem;
}

.reception-edit-table-wrap {
  margin-top: 0.25rem;
  overflow-x: auto;
}

.reception-edit-table .reception-edit-col-pick select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.reception-edit-table .reception-edit-col-qty input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.receptions-list-table td.num,
.receptions-day-table td.num,
.cabinet-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.receptions-list-table thead th,
.receptions-day-table thead th {
  background: #f1f5ff;
  border-bottom: 1px solid #dbe4f5;
}

.receptions-list-table tbody tr:hover > td,
.receptions-day-table tbody tr:hover > td {
  background: rgba(36, 93, 255, 0.04);
}

.receptions-day-table {
  border-collapse: separate;
  border-spacing: 0;
}

.receptions-day-table > tbody > tr.reception-main-row > td {
  background: #fff;
  padding: 14px 14px;
  border-bottom: 0;
  vertical-align: middle;
}

.receptions-day-table > tbody > tr.reception-main-row > td:first-child {
  border-radius: 12px 0 0 0;
}

.receptions-day-table > tbody > tr.reception-main-row > td:last-child {
  border-radius: 0 12px 0 0;
}

.receptions-day-table tr.reception-lines-row:hover td {
  background: transparent;
}

.receptions-day-table tr.reception-lines-row > td {
  padding: 0 12px 14px;
  background: #f8fafc;
  border-bottom: 1px solid #e5eaf3;
}

.receptions-day-table tr.reception-lines-row > td > .cabinet-table-nested,
.receptions-day-table tr.reception-lines-row > td > .cabinet-muted {
  margin: 0;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.receptions-day-table tr.reception-lines-row > td > .cabinet-muted {
  padding: 0.75rem 1rem;
  color: #94a3b8;
  font-weight: 500;
}

.receptions-day-table .btn-link {
  font-weight: 700;
}

.reception-col-client {
  font-weight: 650;
  color: #0f172a;
  max-width: 16rem;
}

.reception-col-num {
  white-space: nowrap;
}

.reception-actions {
  white-space: nowrap;
  width: 1%;
  text-align: right;
}

.reception-actions-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
}

.reception-action-btn,
.reception-actions .btn,
.reception-actions .btn-ghost {
  margin: 0;
  padding: 0.38rem 0.75rem;
  font-size: 12.5px;
  font-weight: 700;
  border-radius: 9px;
  line-height: 1.2;
}

.reception-action-btn--primary {
  background: #245dff;
  border-color: #245dff;
  color: #fff;
}

.reception-action-btn--primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
}

.receptions-list-table {
  table-layout: auto;
  min-width: 0;
}

.receptions-list-table th,
.receptions-list-table td {
  padding: 10px 12px;
}

.receptions-list-table .receptions-col-client {
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.receptions-list-table .receptions-col-created {
  white-space: nowrap;
  font-size: 13px;
  color: #6b7280;
}

.receptions-list-table .cabinet-table-wrap,
.staff-receptions .cabinet-table-wrap {
  overflow-x: auto;
}

.receptions-calendar {
  margin: 0 0 1.75rem;
}

.cal-shell {
  padding: 1.1rem 1.2rem 1.25rem;
  border: 1px solid rgba(36, 93, 255, 0.12);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(247, 250, 255, 0.88) 100%);
  box-shadow: 0 10px 28px rgba(18, 54, 124, 0.06);
}

.cal-shell-head {
  margin-bottom: 0.35rem;
}

.cal-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.cal-nav-group {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.15rem;
  border-radius: 12px;
  background: rgba(36, 93, 255, 0.06);
  border: 1px solid rgba(36, 93, 255, 0.1);
}

.cal-nav-btn {
  min-width: 2.25rem;
  padding-left: 0.55rem;
  padding-right: 0.55rem;
}

.cal-nav-title,
.cal-nav [data-cal-title] {
  min-width: 9.5rem;
  text-align: center;
  font-size: 0.95rem;
  color: #1e3a8a;
}

.cal-month-input {
  border: 1px solid #d7dee9;
  border-radius: 10px;
  padding: 0.4rem 0.55rem;
  background: #fff;
  color: #334155;
}

.cal-wrap {
  margin-top: 0.85rem;
  padding: 0.75rem;
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.9);
  border: 1px solid #e8eef7;
}

.cal-weekdays,
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.cal-weekday {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  padding: 0.15rem 0 0.45rem;
}

.cal-day {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  gap: 0.45rem;
  min-height: 86px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  color: #0f172a;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.cal-day.is-empty {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  cursor: default;
  min-height: 86px;
}

.cal-day.is-weekend:not(.is-empty):not(.has-items) {
  background: #f8fafc;
}

.cal-day:not(.is-empty):hover {
  border-color: #93b4ff;
  box-shadow: 0 8px 18px rgba(36, 93, 255, 0.1);
}

.cal-day.is-today:not(.has-items) {
  border-color: #245dff;
  background: linear-gradient(180deg, #f5f8ff 0%, #fff 100%);
}

.cal-day.is-selected {
  border-color: #245dff;
  background: #eef4ff;
  box-shadow: 0 0 0 3px rgba(36, 93, 255, 0.18);
}

.cal-day.has-items {
  background: linear-gradient(165deg, #fff8f1 0%, #fff 70%);
  border-color: #fdba74;
}

.cal-day.has-items.is-selected {
  background: linear-gradient(165deg, #ffedd5 0%, #fff7ed 100%);
  border-color: #ea580c;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.18);
}

.cal-day-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.cal-day-num {
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.02em;
  color: #1e293b;
}

.cal-day.is-weekend .cal-day-num {
  color: #64748b;
}

.cal-day-today-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #245dff;
  box-shadow: 0 0 0 3px rgba(36, 93, 255, 0.18);
}

.cal-day-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: auto;
  min-height: 1.5rem;
}

.cal-day-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.cal-day-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.35rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.cal-day-pill-count {
  background: #ea580c;
  color: #fff;
}

.cal-day-pill-count::after {
  content: " пост.";
  font-weight: 600;
  opacity: 0.9;
}

.cal-day-pill-count--ship::after {
  content: none;
}

.cal-day-pill-kind {
  font-weight: 700;
  white-space: nowrap;
}

.cal-day-pill-kind--tz {
  background: #245dff;
  color: #fff;
}

.cal-day-pill-kind--delivery {
  background: #0f766e;
  color: #fff;
}

.cal-day-pill-kind--shipment {
  background: #ea580c;
  color: #fff;
}

.cal-day-pill-qty {
  background: rgba(234, 88, 12, 0.12);
  color: #9a3412;
  font-variant-numeric: tabular-nums;
}

.cal-day-empty {
  display: block;
  width: 1rem;
  height: 2px;
  border-radius: 999px;
  background: #e2e8f0;
}

.cal-day-detail {
  margin-top: 1rem;
  padding: 1.15rem 1.2rem 1.25rem;
  border-radius: 16px;
  border: 1px solid rgba(36, 93, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 250, 255, 0.95) 100%);
  box-shadow: 0 10px 24px rgba(18, 54, 124, 0.06);
}

.cal-detail-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid #e8eef7;
}

.cal-detail-head h3 {
  margin: 0;
  font-size: 1.12rem;
  color: #0f172a;
  text-transform: capitalize;
  letter-spacing: -0.01em;
}

.cal-detail-summary {
  margin: 0.3rem 0 0;
  font-size: 0.92rem;
}

.cal-detail-empty {
  padding: 0.5rem 0;
  text-align: center;
}

.cal-day-detail {
  margin-top: 1rem;
}

.cal-day-detail .tz-1c--compact,
.tz-1c.tz-1c--compact {
  min-height: 0;
}

.cal-day-journal .tz-1c-body {
  max-height: min(42vh, 420px);
}

.cal-day-lines {
  margin-top: 0.75rem;
}

.cal-day-lines-shell {
  min-height: 0;
}

.cal-day-lines-body {
  padding: 0.55rem 0.75rem 0.75rem;
  max-height: min(36vh, 360px);
  overflow: auto;
}

.cal-day-lines-body .cabinet-table-nested {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.cal-day-lines-body .cabinet-table-nested th,
.cal-day-lines-body .cabinet-table-nested td {
  border-bottom: 1px solid var(--tz1c-grid, #e5eaf0);
  padding: 0.35rem 0.4rem;
  text-align: left;
  vertical-align: middle;
}

.cal-day-lines-body .cabinet-table-nested thead th {
  background: var(--tz1c-head, #f4f6f8);
  font-size: 11px;
  font-weight: 650;
  color: #64748b;
}

.cal-day-empty-shell {
  margin-top: 0;
}

.cal-day-detail .cabinet-table-wrap {
  border: 0;
  background: transparent;
  padding: 0;
  border-radius: 0;
}

.cal-day-reception {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fafafa;
}

.cal-day-reception-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.cal-day-reception-meta {
  margin: 0 0 0.5rem;
}

@media (max-width: 720px) {
  .cal-shell {
    padding: 0.85rem;
  }

  .cal-wrap {
    padding: 0.45rem;
    gap: 4px;
  }

  .cal-weekdays,
  .cal-grid {
    gap: 4px;
  }

  .cal-day {
    min-height: 64px;
    padding: 6px;
    border-radius: 10px;
  }

  .cal-day.is-empty {
    min-height: 64px;
  }

  .cal-day-num {
    font-size: 13px;
  }

  .cal-day-pill {
    font-size: 10px;
    min-height: 1.15rem;
    padding: 0.05rem 0.35rem;
  }

  .cal-day-pill-count::after {
    content: "";
  }

  .cal-nav-title,
  .cal-nav [data-cal-title] {
    min-width: 7rem;
    font-size: 0.85rem;
  }
}

.reception-modal {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: max(7.5rem, 12vh) 1rem 2rem;
  overflow: auto;
}

.reception-modal[hidden] {
  display: none !important;
}

.reception-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.reception-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  max-height: min(92vh, 920px);
  overflow: auto;
  background: #fff;
  border-radius: 12px;
  padding: 1rem 1.25rem 1.25rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  color: #111827;
}

.reception-modal-dialog h2,
.reception-modal-dialog h3 {
  color: #111827;
}

.reception-modal-dialog .cabinet-muted,
.reception-modal-dialog label span {
  color: #4b5568;
}

.reception-modal-dialog input,
.reception-modal-dialog select {
  color: #111827;
  background: #fff;
  border: 1px solid #d1d5db;
}

.reception-edit-table-wrap {
  margin-top: 0.25rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.reception-edit-table {
  table-layout: fixed;
  width: 100%;
  min-width: 640px;
}

.reception-edit-table th,
.reception-edit-table td {
  vertical-align: middle;
  padding: 0.45rem 0.4rem;
}

.reception-edit-table .reception-edit-col-product {
  width: 38%;
}

.reception-edit-table .reception-edit-col-pick {
  width: 26%;
}

.reception-edit-table .reception-edit-col-qty {
  width: 5.25rem;
}

.reception-edit-table .reception-edit-col-cz {
  width: 9.5rem;
}

.reception-edit-table--no-cz .reception-edit-col-cz,
.reception-edit-table--no-cz [data-cz-col] {
  display: none;
}

.reception-edit-table .reception-edit-col-actions {
  width: 5rem;
  white-space: nowrap;
}

.reception-line-product {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  min-width: 0;
}

.reception-line-product-meta {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.15rem;
}

.reception-line-product-title {
  font-weight: 700;
  color: #111827;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  line-height: 1.25;
  max-height: 2.5em;
  word-break: normal;
  overflow-wrap: anywhere;
}

.reception-line-product-subrow {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  margin-top: 0;
}

.reception-line-product-sub {
  font-size: 12px;
  margin-top: 0;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: normal;
  min-width: 0;
  flex: 1 1 auto;
}

.reception-line-product-subrow .cab-label-bc-btn {
  margin-left: 0;
  flex: 0 0 auto;
}

.admin-cz-clients {
  max-width: 40rem;
}

.admin-wbf-log {
  margin: 0.75rem 0 0;
  max-width: 52rem;
  max-height: 22rem;
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  padding: 0.35rem 0.15rem;
}

.admin-wbf-log-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.admin-wbf-log-row {
  display: grid;
  grid-template-columns: 7.5rem 7.5rem minmax(0, 1fr);
  gap: 0.45rem 0.75rem;
  align-items: baseline;
  padding: 0.4rem 0.85rem;
  border-bottom: 1px solid #eef2f7;
  font-size: 0.84rem;
  line-height: 1.35;
}

.admin-wbf-log-row:last-child {
  border-bottom: none;
}

.admin-wbf-log-row.is-error {
  background: #fff1f2;
}

.admin-wbf-log-time {
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  color: #64748b;
  white-space: nowrap;
}

.admin-wbf-log-kind {
  font-weight: 750;
  color: #1e293b;
  white-space: nowrap;
}

.admin-wbf-log-row.is-error .admin-wbf-log-kind {
  color: #be123c;
}

.admin-wbf-log-text {
  color: #334155;
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 720px) {
  .admin-wbf-log-row {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

.admin-cz-table td {
  vertical-align: middle;
}

.admin-cz-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.admin-cz-switch input {
  width: 1.1rem;
  height: 1.1rem;
}

.staff-sheet {
  display: grid;
  gap: 0.75rem;
}

.staff-sheet-card {
  display: grid;
  gap: 1rem;
  padding: 1.5rem 1.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  max-width: 40rem;
}

.staff-sheet-card h2 {
  margin: 0;
  font-size: 1.35rem;
}

.staff-sheet-card .cabinet-lead {
  margin: 0;
}

.staff-sheet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.staff-sheet-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.staff-sheet-toolbar .cabinet-muted {
  margin: 0;
  flex: 1 1 16rem;
}

.staff-sheet-frame {
  width: 100%;
  min-height: min(75vh, 820px);
  height: 75vh;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f8fafc;
}

@media (max-width: 720px) {
  .cabinet-form-grid {
    grid-template-columns: 1fr;
  }

  .cabinet-span-2 {
    grid-column: span 1;
  }

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

  .admin-breakdown {
    grid-template-columns: 1fr;
  }

  .staff-sheet-frame {
    min-height: 70vh;
    height: 70vh;
  }
}

/* Client cabinet lists */
.cab-list {
  display: grid;
  gap: 8px;
}

.cab-item {
  border: 1px solid var(--cab-line);
  border-radius: var(--cab-radius);
  background: var(--cab-surface);
  box-shadow: var(--cab-shadow);
  overflow: hidden;
  position: relative;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cab-item:hover {
  border-color: var(--cab-line-strong);
  box-shadow: var(--cab-shadow-hover);
}

.cab-item:has(img.cab-item-thumb:hover) {
  overflow: visible;
  z-index: 30;
}

.cab-item-main {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 10px 10px 12px;
  text-align: left;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  box-sizing: border-box;
}

.cab-item-thumb {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid #d7dee9;
  background: #f8fafc;
  display: block;
}

img.cab-item-thumb {
  cursor: zoom-in;
  position: relative;
  z-index: 1;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
  transform-origin: left center;
}

img.cab-item-thumb:hover {
  z-index: 80;
  transform: scale(3.4);
  border-color: #93c5fd;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.28);
  background: #fff;
}

.cab-list:has(img.cab-item-thumb:hover),
#products-catalog:has(img.cab-item-thumb:hover) {
  overflow: visible;
}

@media (hover: none) {
  img.cab-item-thumb {
    cursor: default;
  }

  img.cab-item-thumb:hover {
    transform: none;
    box-shadow: none;
  }
}

.cab-item-thumb.is-empty {
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
}

.cab-item-body {
  flex: 1 1 auto;
  min-width: 0;
}

.cab-item-title,
.cab-item-title .products-title-link,
.cab-item-title .products-title-text {
  display: block;
  max-width: 100%;
  margin: 0;
  color: var(--cab-ink);
  font-size: 0.92rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}

.cab-item-title .products-title-link {
  color: #1d4ed8;
  text-decoration: none;
}

.cab-item-title .products-title-link:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

.cab-item-title-row .cab-item-title {
  flex: 1 1 auto;
  min-width: 0;
}

.cab-item-meta {
  margin-top: 3px;
  color: var(--cab-muted);
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.cab-item-more {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--cab-line);
  border-radius: 11px;
  background: var(--cab-surface-soft);
  color: var(--cab-accent);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.cab-item-more:hover {
  background: var(--cab-hover);
  border-color: var(--cab-line-strong);
}

.cab-item-chevron {
  display: block;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
  margin-top: -3px;
}

.cab-item-more.is-open .cab-item-chevron,
.cab-item-main.is-open .cab-item-chevron {
  transform: rotate(225deg);
  margin-top: 3px;
}

.cab-item-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 7px;
  padding: 0 10px 10px;
}

.cab-item-actions .btn,
.cab-item-actions .btn-ghost {
  flex: 0 0 auto;
  min-height: 38px;
  justify-content: center;
  margin: 0;
}

@media (max-width: 560px) {
  .cab-item-actions {
    justify-content: stretch;
  }

  .cab-item-actions > .btn,
  .cab-item-actions > .btn-ghost,
  .cab-item-actions .btn,
  .cab-item-actions .btn-ghost {
    flex: 1 1 100%;
  }

  .cab-item-actions > .cab-pack-actions,
  .cab-pack-actions {
    flex: 1 1 100%;
    width: 100%;
  }

  .cab-pack-actions .btn,
  .cab-pack-actions .btn-ghost {
    flex: 1 1 calc(50% - 3px);
  }
}

.cab-item-delete {
  color: #b91c1c !important;
  border-color: rgba(185, 28, 28, 0.28) !important;
}

.cab-item-delete:hover {
  border-color: #ef4444 !important;
  background: #fef2f2 !important;
}

.cab-confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.cab-confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.cab-confirm-dialog {
  position: relative;
  width: min(28rem, 100%);
  display: grid;
  gap: 0.85rem;
  padding: 1.25rem 1.3rem 1.15rem;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.cab-confirm-dialog h2 {
  margin: 0;
  font-size: 1.15rem;
}

.cab-confirm-dialog p {
  margin: 0;
  line-height: 1.45;
}

.cab-confirm-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
  margin-top: 0.25rem;
}

.cab-confirm-danger {
  background: #dc2626 !important;
  border-color: #dc2626 !important;
  color: #fff !important;
}

.cab-confirm-danger:hover {
  background: #b91c1c !important;
  border-color: #b91c1c !important;
}

.cab-item-detail {
  padding: 0 12px 14px;
  border-top: 1px solid #eef2f7;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.cab-item-detail[hidden] {
  display: none !important;
}

.cab-item-detail .products-detail-inner {
  padding-top: 12px;
}

.cab-stock-qty {
  flex: 0 0 auto;
  font-size: 1.2rem;
  font-weight: 800;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.cab-lines {
  display: grid;
  gap: 8px;
  padding-top: 12px;
}

.cab-line {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px;
  border: 1px solid #e5eaf3;
  border-radius: 12px;
  background: #fff;
}

.cab-line-thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #d7dee9;
  background: #f8fafc;
  flex: 0 0 auto;
}

.cab-line-thumb-btn {
  display: inline-flex;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  border-radius: 8px;
  line-height: 0;
  flex: 0 0 auto;
}

.cab-line-thumb-btn:hover .cab-line-thumb {
  box-shadow: 0 0 0 2px rgba(36, 93, 255, 0.35);
}

.cab-line-thumb.is-empty {
  display: grid;
  place-items: center;
  font-size: 11px;
  color: #94a3b8;
}

.cab-line-body {
  min-width: 0;
  flex: 1;
}

.cab-line-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
}

a.cab-line-title-link {
  color: #1639a8;
  text-decoration: none;
  display: inline-block;
}

a.cab-line-title-link:hover {
  text-decoration: underline;
}

.cab-line-meta,
.cab-line-qty {
  margin-top: 2px;
  font-size: 12px;
  color: #64748b;
}

.cab-line-qty {
  font-weight: 600;
  color: #334155;
}

.reception-create-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 7.5rem auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 10px;
  padding: 12px;
  border: 1px solid #d7dee9;
  border-radius: 12px;
  background: #fff;
}

.reception-create-line-search {
  align-items: start;
}

.rec-create-search-wrap {
  position: relative;
  min-width: 0;
}

.rec-create-input-wrap {
  position: relative;
  display: block;
}

.rec-create-match {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.35;
}

.rec-create-match.is-empty {
  color: #94a3b8;
}

.rec-create-match.is-ok {
  color: #0f172a;
  font-weight: 600;
}

.rec-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 40;
  max-height: 240px;
  overflow: auto;
  padding: 4px;
  border: 1px solid #c9d4ea;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(18, 54, 124, 0.12);
}

.rec-suggest[hidden] {
  display: none !important;
}

.rec-suggest-item {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.rec-suggest-item:hover,
.rec-suggest-item:focus {
  background: #eff4ff;
  outline: none;
}

.rec-suggest-item strong {
  font-size: 13px;
  color: #1d4ed8;
  font-variant-numeric: tabular-nums;
}

.rec-suggest-item span {
  font-size: 12px;
  color: #475569;
}

.reception-create-line label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
}

.reception-create-line select,
.reception-create-line input {
  width: 100%;
  border: 1px solid #c9d4ea;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 16px;
  background: #fff;
  box-sizing: border-box;
}

.reception-create-line .reception-line-remove {
  align-self: end;
}

.rec-cz {
  grid-column: 1 / -1;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.rec-cz[hidden] {
  display: none !important;
}

.rec-cz-toggle {
  display: flex !important;
  align-items: center;
  gap: 8px;
  font-weight: 700 !important;
  color: #0f172a !important;
  cursor: pointer;
}

.rec-cz-toggle input {
  width: auto !important;
  min-height: auto !important;
  margin: 0;
}

.rec-cz-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 8px;
}

.rec-cz-options[hidden] {
  display: none !important;
}

.rec-cz-radio {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  font-weight: 600 !important;
  font-size: 13px !important;
  cursor: pointer;
}

.rec-cz-radio input {
  width: auto !important;
  min-height: auto !important;
  margin: 0;
}

.rec-cz-qty {
  width: 7.5rem !important;
  min-height: 36px !important;
  padding: 6px 10px !important;
  font-size: 14px !important;
}

.rec-cz-qty[hidden] {
  display: none !important;
}

.reception-edit-col-cz {
  min-width: 11rem;
  vertical-align: top;
}

.cab-line-cz {
  margin-top: 4px;
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 12px;
  font-weight: 700;
}

.reception-create-line.has-cz {
  grid-template-columns: minmax(0, 1fr) 7.5rem auto;
}

#products-catalog.cabinet-table-wrap,
#receptions-list.cabinet-table-wrap,
#stock-list.cabinet-table-wrap {
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}

@media (max-width: 900px) {
  .cabinet-page {
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  .cabinet-page .header {
    padding: 8px 0 6px;
  }

  .cabinet-page .header-inner {
    min-height: 58px;
    padding: 0 12px;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 10px;
    border-radius: 14px;
  }

  .cabinet-page .header-inner > .nav {
    display: none !important;
  }

  .cabinet-page .header-inner > .header-actions {
    display: flex !important;
    align-items: center;
    gap: 8px;
    grid-column: 2;
    justify-self: end;
  }

  .cabinet-page .header-inner > .logo {
    grid-column: 1;
  }

  .cabinet-page .header-inner > .logo img {
    max-height: 36px;
    width: auto;
  }

  .cabinet-page .header-actions:has(#logout-btn) .header-cabinet-link {
    display: none;
  }

  .cabinet-page .header-actions .btn,
  .cabinet-page .header-actions .btn-ghost {
    padding: 8px 12px;
    font-size: 13px;
    min-height: 40px;
  }

  .cabinet-page .section-compact {
    padding-top: 12px;
  }

  .cabinet-page .container {
    padding-left: 12px;
    padding-right: 12px;
  }

  .cabinet-top {
    display: grid;
    gap: 8px;
    margin-bottom: 4px;
  }

  .cabinet-top h1 {
    font-size: 1.35rem;
    margin: 0 0 2px;
  }

  .cabinet-lead {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
  }

  .cabinet-owner-banner {
    width: 100%;
    margin: 0;
    padding: 8px 10px;
    border-radius: 10px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    font-size: 13px;
  }

  .cabinet-tabs {
    position: sticky;
    top: 72px;
    z-index: 20;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 12px 0 14px;
    padding: 5px;
    overflow: visible;
    width: 100%;
    max-width: 100%;
    border: 1px solid var(--cab-line, #e2e8f0);
    border-radius: 14px;
    background: var(--cab-plate, #f1f5f9);
    backdrop-filter: none;
  }

  .cabinet-tab {
    justify-content: center;
    flex: 1 1 0;
    min-width: 0;
    min-height: 44px;
    padding: 0.55rem 0.35rem;
    font-size: 0.78rem;
    line-height: 1.15;
    border-radius: 10px;
    background: transparent;
    border: 0;
    white-space: normal;
    text-align: center;
  }

  .cabinet-tabs:not(:has(#tab-stock:not([hidden]))) .cabinet-tab {
    font-size: 0.86rem;
    padding: 0.65rem 0.55rem;
  }

  .cab-cmdk-trigger kbd {
    display: none;
  }

  .cab-cmdk-trigger {
    min-width: 44px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .cab-delivery-time-slots {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cab-chip {
    min-height: 40px;
    padding: 0.5rem 0.8rem;
  }

  .cabinet-tab.active {
    background: #fff;
    border: 0;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    color: #1d4ed8;
  }

  .cabinet-panel-head {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
  }

  .cabinet-panel-head h2 {
    font-size: 1.1rem;
  }

  .cabinet-panel-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .cabinet-panel-actions .btn,
  .cabinet-panel-actions .btn-ghost,
  .cabinet-panel-head > .btn,
  .cabinet-panel-head > .btn-ghost {
    width: 100%;
    justify-content: center;
    min-height: 44px;
    font-size: 14px;
    margin: 0;
    white-space: nowrap;
  }

  .cabinet-panel-head > .btn-ghost {
    width: 100%;
  }

  #panel-stock .cabinet-panel-head {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  #panel-stock .cabinet-panel-head h2 {
    margin: 0;
  }

  .cabinet-form input,
  .cabinet-form select,
  .cabinet-form textarea {
    font-size: 16px;
    min-height: 44px;
  }

  .cabinet-form .btn {
    width: 100%;
    min-height: 46px;
  }

  .cabinet-auth {
    max-width: none;
  }

  .products-import-card {
    padding: 14px;
  }

  .products-import-card .cabinet-panel-actions {
    grid-template-columns: 1fr;
  }

  .reception-create-line {
    grid-template-columns: 1fr;
  }

  .reception-create-line .reception-line-remove {
    width: 100%;
    min-height: 42px;
  }

  #reception-create-form.cabinet-form,
  #reception-create-form .cabinet-span-2 {
    display: grid;
    gap: 12px;
  }

  .cab-item-thumb {
    width: 48px;
    height: 48px;
  }

  .products-attrs-list {
    grid-template-columns: 1fr;
  }

  .products-photo-strip a {
    width: 72px;
    height: 72px;
  }
}

/* Product catalog: WB / Ozon separation */
.products-search-row {
  margin: 0 0 0.75rem;
}

.products-search-label {
  display: block;
  margin: 0;
}

.products-search-input {
  width: 100%;
  max-width: 28rem;
  min-height: 42px;
  padding: 0.55rem 0.85rem;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 14px;
  color: #0f172a;
}

.products-search-input:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.products-source-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 0.85rem;
}

.products-source-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 34px;
  padding: 5px 12px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.products-source-filter:hover {
  border-color: #93c5fd;
  color: #1d4ed8;
}

.products-source-filter.is-active {
  border-color: #245dff;
  background: #eff6ff;
  color: #1d4ed8;
}

.products-source-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
}

.products-source-filter.is-active .products-source-count {
  background: rgba(36, 93, 255, 0.12);
  color: #1d4ed8;
}

.products-source-section {
  margin: 0 0 1.25rem;
}

.products-source-section:last-child {
  margin-bottom: 0;
}

.products-source-heading {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.55rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
}

.products-source-heading--wb::before,
.products-source-heading--ozon::before,
.products-source-heading--other::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.products-source-heading--wb::before {
  background: #a855f7;
}

.products-source-heading--ozon::before {
  background: #0069ff;
}

.products-source-heading--other::before {
  background: #94a3b8;
}

.products-source-badge {
  display: inline-flex;
  align-items: center;
  margin-right: 0.4rem;
  padding: 1px 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  vertical-align: middle;
  flex: 0 0 auto;
}

.products-source-badge--wb {
  background: #f3e8ff;
  color: #7e22ce;
}

.products-source-badge--ozon {
  background: #e0edff;
  color: #005bdb;
}

.products-source-badge--other {
  background: #f1f5f9;
  color: #64748b;
}

.cab-item-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.15rem;
}

/* Toast / skeleton / empty states */
.cab-toast-host {
  position: fixed;
  z-index: 12000;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  flex-direction: column-reverse;
  gap: 0.55rem;
  width: min(22rem, calc(100vw - 2rem));
  pointer-events: none;
}

.cab-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--cab-line);
  background: var(--cab-surface);
  color: var(--cab-ink);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.12);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.cab-toast.is-in {
  opacity: 1;
  transform: translateY(0);
}

.cab-toast.is-leaving {
  opacity: 0;
  transform: translateY(6px);
}

.cab-toast-msg {
  flex: 1 1 auto;
  font-size: 0.92rem;
  line-height: 1.35;
  font-weight: 600;
}

.cab-toast-close {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--cab-muted);
  font: inherit;
  font-size: 1.15rem;
  line-height: 1;
  padding: 0 0.15rem;
  cursor: pointer;
}

.cab-toast-close:hover {
  color: var(--cab-ink);
}

.cab-toast--ok {
  border-color: #86efac;
  background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 70%);
}

.cab-toast--err {
  border-color: #fda4af;
  background: linear-gradient(180deg, #fff1f2 0%, #ffffff 70%);
}

.cab-toast--info {
  border-color: #93c5fd;
  background: linear-gradient(180deg, #eff6ff 0%, #ffffff 70%);
}

.cab-skel-list {
  display: grid;
  gap: 0.5rem;
}

.cab-skel-card {
  border: 1px solid var(--cab-line);
  border-radius: var(--cab-radius);
  background: var(--cab-surface);
  padding: 0.85rem 0.95rem;
  display: grid;
  gap: 0.55rem;
}

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

.cab-skel-line,
.cab-skel-pill {
  display: block;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    #e8eef8 0%,
    #f5f8ff 45%,
    #e8eef8 90%
  );
  background-size: 200% 100%;
  animation: cab-skel-shimmer 1.15s ease-in-out infinite;
}

.cab-skel-line {
  height: 0.7rem;
}

.cab-skel-pill {
  flex: 0 0 auto;
  width: 4.2rem;
  height: 1.35rem;
}

.cab-skel-w40 {
  width: 40%;
}
.cab-skel-w55 {
  width: 55%;
}
.cab-skel-w80 {
  width: 80%;
}

@keyframes cab-skel-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cab-skel-line,
  .cab-skel-pill {
    animation: none;
  }
  .cab-toast {
    transition: none;
  }
}

.cab-empty {
  margin: 0.15rem 0;
  padding: 1.35rem 1.15rem;
  border: 1px dashed var(--cab-line-strong);
  border-radius: var(--cab-radius);
  background: rgba(255, 255, 255, 0.65);
  text-align: center;
}

.cab-empty-icon {
  width: 2.25rem;
  height: 2.25rem;
  margin: 0 auto 0.7rem;
  border-radius: 999px;
  border: 1.5px solid #cbd5e1;
  background:
    linear-gradient(#cbd5e1, #cbd5e1) center/1.1rem 1.5px no-repeat,
    linear-gradient(#cbd5e1, #cbd5e1) center/1.5px 1.1rem no-repeat,
    #f8fafc;
  opacity: 0.7;
  transform: rotate(45deg);
}

.cab-empty-title {
  font-size: 1rem;
  font-weight: 750;
  color: var(--cab-ink);
  margin: 0 0 0.35rem;
}

.cab-empty-text {
  margin: 0;
  color: var(--cab-muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.cab-empty-action {
  margin-top: 0.85rem;
}

/* Live preview while creating a request */
.cab-live-preview-host {
  min-height: 0;
}

.cab-reception-aside .cab-live-preview-host {
  grid-column: 1 / -1;
}

.cab-live-preview {
  border: 1px solid #d8e2f4;
  border-radius: 16px;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(36, 93, 255, 0.07), transparent 55%),
    linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
  box-shadow: 0 8px 22px rgba(24, 54, 120, 0.05);
  padding: 0.85rem 0.9rem 0.75rem;
}

.cab-live-preview-label {
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 700;
  margin-bottom: 0.55rem;
}

.cab-live-preview-card {
  margin: 0;
  box-shadow: none !important;
  border-style: dashed !important;
  background: rgba(255, 255, 255, 0.85) !important;
}

.cab-live-preview-card .cab-item-main {
  padding: 0.55rem 0.35rem;
}

.cab-live-preview-hint {
  margin: 0.55rem 0 0;
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.35;
}

.cab-live-preview.is-ready {
  border-color: #86efac;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(16, 185, 129, 0.08), transparent 55%),
    linear-gradient(180deg, #f0fdf4 0%, #ffffff 70%);
}

.cab-live-preview.is-ready .cab-live-preview-hint {
  color: #047857;
  font-weight: 650;
}

.cab-tz-shell {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.cab-tz-shell > .cab-reception-aside {
  display: grid;
  grid-template-columns: 1fr;
  position: sticky;
  top: 1rem;
}

@media (max-width: 860px) {
  .cab-tz-shell {
    grid-template-columns: 1fr;
  }

  .cab-tz-shell > .cab-reception-aside {
    position: static;
  }
}


/* WB FBS: orders left + ops right */
.cab-wbf-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem 1.25rem;
  align-items: start;
}

.cab-wbf-split-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.cab-wbf-split-head {
  margin: 0;
  align-items: flex-start;
}

.cab-wbf-split-head h2 {
  font-size: 1.05rem;
}

.cab-wbf-split-scroll {
  max-height: min(28rem, 58vh);
  overflow: auto;
  padding-right: 0.15rem;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 900px) {
  .cab-wbf-split {
    grid-template-columns: 1fr;
  }

  .cab-wbf-split-scroll {
    max-height: min(22rem, 50vh);
  }
}


/* WB FBS daily orders chart */
.cab-wbf-chart-wrap {
  margin-top: 1.1rem;
}

.cab-wbf-chart-head {
  margin: 0 0 0.55rem;
}

.cab-wbf-chart-head h2 {
  font-size: 1.05rem;
}

.cab-wbf-orders-chart .summary-chart-bars {
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  height: 108px;
}

.cab-wbf-chart-value {
  font-size: 11px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  color: #1e293b;
  line-height: 1;
}

.cab-wbf-chart-value.is-zero {
  color: #cbd5e1;
  font-weight: 600;
}

.summary-chart-bar.is-orders {
  width: 14px;
  background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%);
}

.summary-chart-bar.is-orders.is-today,
.summary-chart-col.is-today .summary-chart-bar.is-orders {
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
}

.summary-chart-col.is-today .summary-chart-label {
  color: #b45309;
  font-weight: 700;
}

.summary-chart-swatch.is-orders {
  background: #2563eb;
}

.cab-wbf-chart-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem 1rem;
}

.cab-wbf-chart-period {
  flex-shrink: 0;
}

/* ——— TZ registry: 1C Taxi (2024–2026) journal ——— */
.tz-1c-root {
  margin-top: 0.35rem;
}

.tz-1c {
  --tz1c-border: #d0d7de;
  --tz1c-head: #f4f6f8;
  --tz1c-cmd: #f7f8fa;
  --tz1c-accent: #3d7eff;
  --tz1c-accent-soft: #e8f0ff;
  --tz1c-sel: #d6e6ff;
  --tz1c-sel-text: #0f172a;
  --tz1c-alt: #fafbfc;
  --tz1c-grid: #e5eaf0;
  --tz1c-font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  border: 1px solid var(--tz1c-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.04);
  font-family: var(--tz1c-font);
  font-size: 13px;
  color: #1e293b;
  display: flex;
  flex-direction: column;
  min-height: min(70vh, 640px);
  overflow: hidden;
}

.tz-1c-titlebar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.85rem;
  background: #fff;
  border-bottom: 1px solid var(--tz1c-border);
  color: #0f172a;
  user-select: none;
}

.tz-1c-titlebar strong {
  display: block;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: #0f172a;
}

.tz-1c-titlebar span {
  display: block;
  font-size: 12px;
  color: #64748b;
  margin-top: 0.05rem;
}

.tz-1c-titlebar-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 7px;
  border: none;
  background:
    linear-gradient(145deg, #5b93ff 0%, var(--tz1c-accent) 55%, #2f62e8 100%);
  box-shadow: 0 1px 2px rgba(61, 126, 255, 0.35);
  position: relative;
}

.tz-1c-titlebar-icon::after {
  content: "";
  position: absolute;
  inset: 7px 6px 7px 6px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 5px 0 rgba(255, 255, 255, 0.45);
}

.tz-1c-cmd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.4rem;
  padding: 0.45rem 0.7rem;
  background: var(--tz1c-cmd);
  border-bottom: 1px solid var(--tz1c-border);
}

.tz-1c-btn {
  appearance: none;
  font: inherit;
  font-size: 12px;
  line-height: 1.25;
  padding: 0.35rem 0.7rem;
  border: 1px solid #c9d2dc;
  border-radius: 6px;
  background: #fff;
  color: #1e293b;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.tz-1c-btn:hover:not(:disabled) {
  border-color: #9eb6e8;
  background: var(--tz1c-accent-soft, #e8f0ff);
  box-shadow: 0 0 0 3px rgba(61, 126, 255, 0.08);
}

.tz-1c-btn:active:not(:disabled) {
  background: #dbe7ff;
}

.tz-1c-btn:disabled {
  opacity: 0.42;
  cursor: default;
}

.tz-1c-btn--primary {
  border-color: transparent;
  background: var(--tz1c-accent, #3d7eff);
  color: #fff;
  font-weight: 600;
}

.tz-1c-btn--primary:hover:not(:disabled) {
  background: #2f6af0;
  border-color: transparent;
  color: #fff;
  box-shadow: 0 0 0 3px rgba(61, 126, 255, 0.18);
}

.tz-1c-cmd-sep {
  width: 1px;
  align-self: stretch;
  min-height: 1.5rem;
  background: #d8dee6;
  margin: 0 0.2rem;
}

.tz-1c-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0;
  font-size: 12px;
  color: #64748b;
}

.tz-1c-filter span {
  white-space: nowrap;
}

.tz-1c-filter select,
.tz-1c-search input {
  font: inherit;
  font-size: 12px;
  padding: 0.3rem 0.45rem;
  border: 1px solid #c9d2dc;
  border-radius: 6px;
  background: #fff;
  color: #1e293b;
  min-height: 1.85rem;
}

.tz-1c-filter select:focus,
.tz-1c-search input:focus {
  outline: none;
  border-color: var(--tz1c-accent);
  box-shadow: 0 0 0 3px rgba(61, 126, 255, 0.15);
}

.tz-1c-search {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
  flex: 1 1 12rem;
  min-width: 10rem;
}

.tz-1c-search input {
  flex: 1 1 auto;
  min-width: 8rem;
}

.tz-1c-body {
  flex: 1 1 auto;
  min-height: 0;
  background: #fff;
  overflow: auto;
  overflow-x: auto;
  overflow-y: auto;
  border-bottom: 1px solid var(--tz1c-border);
  -webkit-overflow-scrolling: touch;
}

.tz-1c-grid-wrap {
  width: 100%;
  min-width: 100%;
}

.tz-1c-grid {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-size: 12.5px;
}

.tz-1c-grid--resizable {
  width: 100%;
  min-width: 100%;
}

.tz-1c-th-resizable {
  position: relative;
}

.tz-1c-col-resize {
  position: absolute;
  top: 0;
  right: -3px;
  width: 5px;
  height: 100%;
  cursor: col-resize;
  z-index: 2;
  user-select: none;
}

.tz-1c-col-resize::after {
  content: "";
  position: absolute;
  top: 20%;
  bottom: 20%;
  left: 3px;
  width: 1px;
  background: transparent;
}

.tz-1c-th:hover .tz-1c-col-resize::after,
.tz-1c-col-resize:hover::after {
  background: #3d7eff;
}

body.tz-1c-resizing {
  cursor: col-resize !important;
  user-select: none !important;
}

body.tz-1c-resizing iframe,
body.tz-1c-resizing .tz-1c-grid {
  pointer-events: none;
}

.tz-1c-grid thead th,
.tz-1c-grid thead .tz-1c-th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--tz1c-head);
  border-bottom: 1px solid var(--tz1c-border);
  border-right: 1px solid var(--tz1c-grid);
  padding: 0.32rem 0.28rem;
  font-weight: 600;
  font-size: 11px;
  text-align: center;
  white-space: nowrap;
  color: #64748b;
  letter-spacing: 0.01em;
  text-transform: none;
  cursor: pointer;
  user-select: none;
  transition: background 0.12s ease, color 0.12s ease;
}

.tz-1c-grid thead th:last-child,
.tz-1c-grid thead .tz-1c-th:last-child {
  border-right: none;
}

.tz-1c-th {
  display: table-cell;
}

.tz-1c-th-label {
  display: inline-block;
  vertical-align: middle;
}

.tz-1c-th-sort {
  display: inline-block;
  width: 0.7rem;
  height: 0.85rem;
  margin-left: 0.25rem;
  vertical-align: middle;
  position: relative;
  opacity: 0.28;
}

.tz-1c-th-sort::before,
.tz-1c-th-sort::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
}

.tz-1c-th-sort::before {
  top: 0;
  border-bottom: 4px solid currentColor;
}

.tz-1c-th-sort::after {
  bottom: 0;
  border-top: 4px solid currentColor;
}

.tz-1c-th:hover {
  background: #e8eef8;
  color: #334155;
}

.tz-1c-th:hover .tz-1c-th-sort {
  opacity: 0.55;
}

.tz-1c-th.is-sorted {
  background: #e8f0ff;
  color: #1d4ed8;
}

.tz-1c-th.is-sorted .tz-1c-th-sort {
  opacity: 1;
  color: #3d7eff;
}

.tz-1c-th.is-sorted-asc .tz-1c-th-sort::after {
  opacity: 0.25;
}

.tz-1c-th.is-sorted-desc .tz-1c-th-sort::before {
  opacity: 0.25;
}

.tz-1c-th:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(61, 126, 255, 0.35);
}

.tz-1c-grid tbody td {
  border-bottom: 1px solid var(--tz1c-grid);
  border-right: 1px solid transparent;
  padding: 0.32rem 0.35rem;
  vertical-align: middle;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: #fff;
}

.tz-1c-row.is-alt td {
  background: var(--tz1c-alt);
}

.tz-1c-row:hover td {
  background: #f0f5ff;
}

.tz-1c-row.is-selected td,
.tz-1c-row.is-selected:hover td {
  background: var(--tz1c-sel) !important;
  color: var(--tz1c-sel-text);
  box-shadow: inset 3px 0 0 var(--tz1c-accent);
}

.tz-1c-row.is-obsolete td {
  color: #94a3b8;
}

.tz-1c-row.is-selected.is-obsolete td {
  color: #64748b;
}

.tz-1c-row:focus {
  outline: none;
}

.tz-1c-num {
  width: 2.6rem;
  text-align: center !important;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
}

.tz-1c-row.is-selected .tz-1c-num {
  color: #64748b;
}

.tz-1c-doc-num {
  font-weight: 650;
  color: #0f172a;
}

.tz-1c-rev {
  margin-left: 0.4rem;
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
}

.tz-1c-client {
  font-weight: 600;
  text-align: left !important;
}

.tz-1c-center {
  text-align: center !important;
}

.tz-1c-qty {
  text-align: center !important;
  font-variant-numeric: tabular-nums;
  width: 3.4rem;
}

.tz-1c-qty--defect {
  color: #b45309;
  font-weight: 700;
}

.tz-1c-row.is-selected .tz-1c-qty--defect {
  color: #92400e;
}

.tz-1c-dest {
  color: #475569;
  text-align: left !important;
}

.tz-1c-doc {
  text-align: left !important;
}

.tz-1c-muted {
  color: #94a3b8;
  font-size: 12px;
}

.tz-1c-row.is-selected .tz-1c-muted,
.tz-1c-row.is-selected .tz-1c-dest {
  color: #475569;
}

.tz-1c-scheme {
  display: inline-block;
  min-width: 2.5rem;
  padding: 0.12rem 0.4rem;
  border: none;
  border-radius: 999px;
  background: #eef2f7;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.tz-1c-scheme--fbo {
  background: #dcfce7;
  color: #166534;
}

.tz-1c-scheme--fbs {
  background: #dbeafe;
  color: #1d4ed8;
}

.tz-1c-row.is-selected .tz-1c-scheme {
  box-shadow: inset 0 0 0 1px rgba(61, 126, 255, 0.25);
}

.tz-1c-st {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  border: none;
  border-radius: 999px;
  background: #eef2f7;
  font-size: 11px;
  font-weight: 600;
}

.tz-1c-st--new {
  background: #fef3c7;
  color: #92400e;
}

.tz-1c-st--shipped {
  background: #e0e7ff;
  color: #3730a3;
}

.tz-1c-st--ready {
  background: #dcfce7;
  color: #166534;
}

.tz-1c-st--obsolete {
  background: #f1f5f9;
  color: #64748b;
}

.tz-1c-st--accepted {
  background: #dcfce7;
  color: #166534;
}

.tz-1c-st--accepted_diff {
  background: #ffedd5;
  color: #9a3412;
}

.tz-1c-st--rejected {
  background: #fee2e2;
  color: #991b1b;
}

.tz-1c-row.is-selected .tz-1c-st {
  box-shadow: inset 0 0 0 1px rgba(61, 126, 255, 0.2);
}

.tz-1c-flag {
  font-size: 12px;
  font-weight: 700;
}

.tz-1c-flag--ok {
  color: #15803d;
}

.tz-1c-flag--no {
  color: #b45309;
}

.tz-1c-flag--mute {
  color: #cbd5e1;
  font-weight: 500;
}

.tz-1c-row.is-selected .tz-1c-flag--ok {
  color: #166534;
}

.tz-1c-row.is-selected .tz-1c-flag--no {
  color: #92400e;
}

.tz-1c-row.is-selected .tz-1c-flag--mute {
  color: #94a3b8;
}

.tz-1c-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
  padding: 0.4rem 0.85rem;
  background: #f8fafc;
  font-size: 12px;
  color: #64748b;
}

.tz-1c-status b {
  font-weight: 650;
  color: #334155;
}

.tz-1c-status-sep {
  color: #cbd5e1;
}

.tz-1c-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 2rem 1.5rem;
  color: #64748b;
}

.tz-1c-empty strong {
  font-size: 14px;
  color: #0f172a;
}

.tz-1c-skel {
  padding: 0.85rem;
  display: grid;
  gap: 0.45rem;
}

.tz-1c-skel-bar,
.tz-1c-skel-row {
  height: 1.45rem;
  background: linear-gradient(90deg, #eef2f7, #f8fafc, #eef2f7);
  background-size: 200% 100%;
  animation: tz1c-skel 1.1s ease-in-out infinite;
  border-radius: 6px;
}

.tz-1c-skel-bar {
  height: 2.1rem;
  margin-bottom: 0.35rem;
}

@keyframes tz1c-skel {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

@media (max-width: 900px) {
  .tz-1c {
    min-height: 60vh;
    font-size: 12px;
    border-radius: 6px;
  }

  .tz-1c-search {
    margin-left: 0;
    flex: 1 1 100%;
  }

  .tz-1c-grid {
    table-layout: fixed;
    min-width: 920px;
  }
}

/* ——— TZ registry: period + Excel column filters ——— */
.tz-1c-period {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
  padding: 0.5rem 0.75rem;
  background: #f8fafc;
  border-bottom: 1px solid var(--tz1c-border, #d0d7de);
}

.tz-1c-period-label {
  font-size: 12px;
  font-weight: 650;
  color: #475569;
}

.tz-1c-period-presets {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.tz-1c-period-chip {
  appearance: none;
  font: inherit;
  font-size: 12px;
  padding: 0.28rem 0.6rem;
  border: 1px solid #c9d2dc;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  cursor: pointer;
}

.tz-1c-period-chip:hover {
  border-color: #9eb6e8;
  background: #e8f0ff;
}

.tz-1c-period-chip.is-active {
  border-color: transparent;
  background: #3d7eff;
  color: #fff;
  font-weight: 600;
}

.tz-1c-period-dates {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0;
  font-size: 12px;
  color: #64748b;
}

.tz-1c-period-dates input[type="date"] {
  font: inherit;
  font-size: 12px;
  padding: 0.28rem 0.4rem;
  border: 1px solid #c9d2dc;
  border-radius: 6px;
  background: #fff;
  color: #1e293b;
}

.tz-1c-th {
  position: relative;
  padding: 0.2rem 0.25rem !important;
}

.tz-1c-th-sortbtn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  max-width: calc(100% - 1.4rem);
  margin: 0;
  padding: 0.25rem 0.15rem;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  cursor: pointer;
  vertical-align: middle;
}

.tz-1c-th-filterbtn {
  appearance: none;
  position: relative;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  margin: 0 0.2rem 0 0.1rem;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  vertical-align: middle;
}

.tz-1c-th-filterbtn:hover,
.tz-1c-th-filterbtn.is-on {
  background: #e8f0ff;
  border-color: #b6c9f0;
  color: #3d7eff;
}

.tz-1c-th.is-filtered {
  background: #eef4ff;
}

.tz-1c-th-filter-ico {
  width: 10px;
  height: 10px;
  display: block;
  background:
    linear-gradient(currentColor, currentColor) center 1px / 10px 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) center 4px / 7px 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) center 7px / 4px 1.5px no-repeat;
}

.tz-1c-filter-pop {
  position: fixed;
  z-index: 10050;
  width: 280px;
  max-height: min(70vh, 440px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #c9d2dc;
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.14);
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 12.5px;
  color: #1e293b;
  overflow: hidden;
}

.tz-1c-filter-pop-head {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid #e5eaf0;
  background: #f8fafc;
}

.tz-1c-filter-link {
  appearance: none;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 0.3rem 0.35rem;
  border-radius: 4px;
  font: inherit;
  color: #1e40af;
  cursor: pointer;
}

.tz-1c-filter-link:hover {
  background: #e8f0ff;
}

.tz-1c-filter-search {
  padding: 0.4rem 0.55rem 0.25rem;
}

.tz-1c-filter-search input {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  padding: 0.35rem 0.45rem;
  border: 1px solid #c9d2dc;
  border-radius: 6px;
}

.tz-1c-filter-all {
  margin: 0.15rem 0.55rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid #eef2f7;
}

.tz-1c-filter-list {
  flex: 1 1 auto;
  overflow: auto;
  max-height: 220px;
  padding: 0.15rem 0.35rem 0.35rem;
}

.tz-1c-filter-opt {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  margin: 0;
  padding: 0.28rem 0.35rem;
  border-radius: 4px;
  cursor: pointer;
}

.tz-1c-filter-opt:hover {
  background: #f1f5f9;
}

.tz-1c-filter-opt input {
  margin-top: 0.15rem;
}

.tz-1c-filter-opt span {
  word-break: break-word;
  line-height: 1.3;
}

.tz-1c-filter-empty {
  padding: 0.75rem;
  color: #94a3b8;
  text-align: center;
}

.tz-1c-filter-actions {
  display: flex;
  flex-wrap: wrap;
  flex: 0 0 auto;
  gap: 0.35rem;
  padding: 0.45rem 0.55rem;
  border-top: 1px solid #e5eaf0;
  background: #f8fafc;
}

.tz-1c-check {
  width: 2.1rem;
  min-width: 2.1rem;
  max-width: 2.4rem;
  text-align: center;
  padding-left: 0.25rem !important;
  padding-right: 0.25rem !important;
}

.tz-1c-check-lab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  cursor: pointer;
}

.tz-1c-check-lab input {
  width: 14px;
  height: 14px;
  margin: 0;
  cursor: pointer;
}

.tz-1c-row.is-checked:not(.is-selected) {
  background: #f3f8ff;
}

.tz-1c-report-overlay {
  --tz1c-border: #d0d7de;
  --tz1c-head: #f4f6f8;
  --tz1c-cmd: #f7f8fa;
  --tz1c-accent: var(--cab-accent, #245dff);
  --tz1c-accent-soft: var(--cab-accent-soft, rgba(36, 93, 255, 0.1));
  --tz1c-grid: #e5eaf0;
  --tz1c-font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  position: fixed;
  inset: 0;
  z-index: 11000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(30, 41, 59, 0.42);
  box-sizing: border-box;
}

.tz-1c-report-modal {
  --tz1c-border: #d0d7de;
  --tz1c-head: #f4f6f8;
  --tz1c-cmd: #f7f8fa;
  --tz1c-accent: var(--cab-accent, #245dff);
  --tz1c-accent-soft: var(--cab-accent-soft, rgba(36, 93, 255, 0.1));
  --tz1c-grid: #e5eaf0;
  --tz1c-font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  width: min(1320px, calc(100vw - 1.5rem));
  max-height: min(92vh, 940px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--tz1c-border);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 18px 48px rgba(15, 23, 42, 0.22);
  font-family: var(--tz1c-font);
  font-size: 13px;
  color: var(--cab-ink, #0f172a);
  overflow: hidden;
  min-height: 0;
}

.tz-1c-report-modal.tz-1c {
  min-height: 0;
  margin: 0;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 18px 48px rgba(15, 23, 42, 0.22);
}

.tz-1c-report-modal .tz-1c-titlebar {
  flex-shrink: 0;
  background: #fff;
  border-bottom: 1px solid var(--tz1c-border);
  padding: 0.45rem 0.75rem;
  gap: 0.55rem;
}

.tz-1c-report-modal .tz-1c-titlebar strong {
  font-size: 13px;
  font-weight: 650;
  color: var(--cab-ink, #0f172a);
}

.tz-1c-report-modal .tz-1c-titlebar span {
  font-size: 12px;
  color: var(--cab-muted, #64748b);
}

.tz-1c-report-modal .tz-1c-titlebar-icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: linear-gradient(145deg, #5b93ff 0%, var(--tz1c-accent) 55%, #1d4ed8 100%);
  box-shadow: 0 1px 2px rgba(36, 93, 255, 0.35);
}

.tz-1c-report-modal .tz-1c-titlebar-icon::after {
  inset: 6px 5px 6px 5px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 0 rgba(255, 255, 255, 0.45);
}

.tz-1c-report-modal .tz-1c-cmd {
  background: var(--tz1c-cmd);
  border-bottom: 1px solid var(--tz1c-border);
  padding: 0.4rem 0.65rem;
  gap: 0.3rem 0.35rem;
}

.tz-1c-report-modal .tz-1c-btn {
  border-radius: 6px;
  border-color: #c9d2dc;
  background: #fff;
  padding: 0.32rem 0.7rem;
  font-size: 12px;
  box-shadow: none;
}

.tz-1c-report-modal .tz-1c-btn:hover:not(:disabled) {
  border-color: #9eb6e8;
  background: var(--tz1c-accent-soft);
  box-shadow: 0 0 0 3px rgba(36, 93, 255, 0.08);
}

.tz-1c-report-modal .tz-1c-btn--primary {
  border-color: transparent;
  background: var(--tz1c-accent);
  color: #fff;
  font-weight: 600;
}

.tz-1c-report-modal .tz-1c-btn--primary:hover:not(:disabled) {
  border-color: transparent;
  background: #1d4ed8;
  color: #fff;
  box-shadow: 0 0 0 3px rgba(36, 93, 255, 0.18);
}

.tz-1c-report-cmd,
.tz-1c-report-filters,
.tz-1c-report-foot {
  flex-shrink: 0;
}

.tz-1c-report-filters {
  gap: 0.45rem 0.65rem;
  align-items: flex-end;
}

.tz-1c-report-filters .tz-1c-report-sec-field {
  margin-bottom: 0;
}

.tz-1c-report-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid var(--tz1c-border);
  background: #fff;
}

.tz-1c-report-head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.tz-1c-report-head strong {
  display: block;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.3;
  color: #0f172a;
}

.tz-1c-report-head span {
  display: block;
  margin-top: 0.15rem;
  font-size: 12px;
  color: #64748b;
}

.tz-1c-report-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 0;
  background: #fff;
}

.tz-1c-report-grid {
  width: 100%;
  min-width: 1100px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13px;
}

.tz-1c-report-grid th,
.tz-1c-report-grid td {
  border-bottom: 1px solid var(--tz1c-grid);
  border-right: 1px solid #eef2f6;
  padding: 0.28rem 0.4rem;
  text-align: left;
  vertical-align: middle;
}

.tz-1c-report-grid th:last-child,
.tz-1c-report-grid td:last-child {
  border-right: 0;
}

.tz-1c-report-grid thead th {
  position: sticky;
  top: 0;
  background: var(--tz1c-head);
  border-bottom: 1px solid var(--tz1c-border);
  border-right: 1px solid var(--tz1c-grid);
  font-weight: 650;
  font-size: 11px;
  line-height: 1.25;
  color: var(--cab-ink-2, #334155);
  z-index: 1;
  white-space: normal;
}

.tz-1c-report-grid tr.is-alt td {
  background: #fafbfc;
}

.tz-1c-report-grid tbody tr:hover td {
  background: #f3f8ff;
}

.tz-1c-report-grid tr.tz-1c-report-sec td {
  background: #eef3fa;
  border-bottom-color: #c9d3e0;
  padding-top: 0.45rem;
  padding-bottom: 0.4rem;
  font-size: 12.5px;
}

.tz-1c-report-grid tfoot td {
  border-top: 1px solid var(--tz1c-border);
  background: var(--tz1c-head);
  font-weight: 650;
}

.tz-1c-report-sec-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.65rem 1rem;
}

.tz-1c-report-sec-num {
  margin-right: 0.35rem;
  white-space: nowrap;
}

.tz-1c-report-sec-sum {
  text-align: right !important;
  vertical-align: middle !important;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.tz-1c-report-sec-sum-lab {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
  line-height: 1.2;
  margin-bottom: 0.1rem;
}

.tz-1c-report-sec-sum b {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.tz-1c-report-sec-field {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
}

.tz-1c-report-sec-field input,
.tz-1c-report-sec-field select {
  width: 11rem;
  max-width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 0.28rem 0.4rem;
  border: 1px solid #c9d2dc;
  border-radius: 6px;
  background: #fff;
  color: var(--cab-ink, #0f172a);
  min-height: 1.85rem;
}

.tz-1c-report-sec-field input:focus,
.tz-1c-report-sec-field select:focus {
  outline: none;
  border-color: var(--tz1c-accent, #245dff);
  box-shadow: 0 0 0 2px var(--tz1c-accent-soft, rgba(36, 93, 255, 0.1));
}

.tz-1c-seg {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid #c9d2dc;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.tz-1c-seg-opt {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0.32rem 0.7rem;
  font-size: 12px;
  font-weight: 650;
  color: var(--cab-ink-2, #334155);
  cursor: pointer;
  user-select: none;
  border-right: 1px solid #c9d2dc;
  background: #fff;
}

.tz-1c-seg-opt:last-child {
  border-right: 0;
}

.tz-1c-seg-opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tz-1c-seg-opt.is-active,
.tz-1c-seg-opt:has(input:checked) {
  background: var(--tz1c-accent-soft, rgba(36, 93, 255, 0.1));
  color: #1d4ed8;
}

.tz-1c-manual-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.55rem 0.75rem;
  margin-top: 0.65rem;
}

.tz-1c-manual-add-bar {
  display: flex;
  justify-content: flex-start;
  padding: 0.45rem 0.65rem 0.55rem;
  border-top: 1px solid var(--tz1c-border, #d0d7de);
  background: var(--tz1c-cmd, #f7f8fa);
}

.tz-1c-manual-pick {
  appearance: none;
  width: 100%;
  text-align: left;
  border: 1px solid #c9d2dc;
  border-radius: 6px;
  background: #fff;
  padding: 0.28rem 0.4rem;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  color: var(--cab-ink, #0f172a);
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-height: 1.85rem;
}

.tz-1c-manual-pick:hover:not(:disabled) {
  border-color: #93c5fd;
  background: #f8fbff;
}

.tz-1c-manual-pick:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.tz-1c-manual-pick-meta {
  font-size: 11px;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}

.tz-1c-manual-pick-title {
  display: block;
  line-height: 1.3;
}

.tz-1c-manual-pick a.staff-tz-line-title-link,
.tz-1c-manual-suggest .tz-1c-manual-suggest-title a.staff-tz-line-title-link {
  color: #1d4ed8;
  font-weight: 700;
  text-decoration: none;
}

.tz-1c-manual-pick a.staff-tz-line-title-link:hover,
.tz-1c-manual-suggest .tz-1c-manual-suggest-title a.staff-tz-line-title-link:hover {
  text-decoration: underline;
}

.tz-1c-report-price.is-muted-rate input {
  opacity: 0.55;
  background: #f8fafc;
}

.tz-1c-report-price input,
.tz-1c-report-grid .tz-1c-qty input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: 13px;
  padding: 0.22rem 0.35rem;
  border: 1px solid #c9d2dc;
  border-radius: 6px;
  background: #fff;
  color: var(--cab-ink, #0f172a);
  min-height: 1.7rem;
}

.tz-1c-report-price input:focus,
.tz-1c-report-grid .tz-1c-qty input:focus {
  outline: none;
  border-color: var(--tz1c-accent, #245dff);
  box-shadow: 0 0 0 2px var(--tz1c-accent-soft, rgba(36, 93, 255, 0.1));
}

.tz-1c-manual-suggest {
  z-index: 12000 !important;
  background: #fff;
  border: 1px solid var(--tz1c-border, #d0d7de);
  border-radius: 4px;
  color: #1e293b;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.18);
  font-family: var(--tz1c-font, "Segoe UI", system-ui, sans-serif);
  font-size: 13px;
}

.tz-1c-manual-suggest .cab-priemka-title-filter-wrap {
  background: var(--tz1c-cmd, #f7f8fa);
  border-bottom: 1px solid var(--tz1c-border, #d0d7de);
}

.tz-1c-manual-suggest .cab-priemka-title-filter {
  border-radius: 3px;
  border-color: var(--tz1c-border, #d0d7de);
}

.tz-1c-manual-suggest .cab-priemka-title-list {
  background: #fff;
}

.tz-1c-manual-suggest .rec-suggest-item,
.tz-1c-manual-suggest .cab-priemka-title-item {
  background: #fff;
  color: #1e293b;
  border-radius: 3px;
}

.tz-1c-manual-suggest .rec-suggest-item:hover,
.tz-1c-manual-suggest .rec-suggest-item:focus,
.tz-1c-manual-suggest .cab-priemka-title-item:hover,
.tz-1c-manual-suggest .cab-priemka-title-item:focus {
  background: var(--tz1c-accent-soft, #e8f0ff);
}

.tz-1c-manual-suggest .cab-priemka-title-item-text strong {
  color: #0f172a;
  font-weight: 650;
}

.tz-1c-manual-suggest .cab-priemka-title-item-text span {
  color: #64748b;
}

.tz-1c-report-type {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  margin-top: 0.35rem;
}

.tz-1c-report-type-opt {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 12px;
  font-weight: 650;
  color: #334155;
  cursor: pointer;
  user-select: none;
}

.tz-1c-report-type-opt input {
  margin: 0;
}

.tz-1c-report-grid--compact {
  min-width: 720px;
}

.tz-1c-report-grid--rates2 {
  min-width: 880px;
}

.tz-1c-report-grid--compact th:nth-child(1),
.tz-1c-report-grid--compact td:nth-child(1) {
  width: 10rem;
}

.tz-1c-report-grid--compact th:nth-child(3),
.tz-1c-report-grid--compact td:nth-child(3),
.tz-1c-report-grid--compact th:nth-child(4),
.tz-1c-report-grid--compact td:nth-child(4),
.tz-1c-report-grid--compact th:nth-child(5),
.tz-1c-report-grid--compact td:nth-child(5) {
  width: 7.5rem;
}

.tz-1c-report-grid--rates2 th:nth-child(4),
.tz-1c-report-grid--rates2 td:nth-child(4),
.tz-1c-report-grid--rates2 th:nth-child(5),
.tz-1c-report-grid--rates2 td:nth-child(5),
.tz-1c-report-grid--rates2 th:nth-child(6),
.tz-1c-report-grid--rates2 td:nth-child(6) {
  width: 7.25rem;
}

.tz-1c-report-grid th:nth-child(1),
.tz-1c-report-grid td:nth-child(1) {
  width: 9.5rem;
}

.tz-1c-report-grid th:nth-child(2),
.tz-1c-report-grid td:nth-child(2) {
  width: auto;
}

.tz-1c-report-grid th:nth-child(3),
.tz-1c-report-grid td:nth-child(3) {
  width: 5.5rem;
  text-align: right;
}

.tz-1c-report-grid th:nth-child(4),
.tz-1c-report-grid td:nth-child(4) {
  width: 8.5rem;
}

.tz-1c-report-grid th:nth-child(5),
.tz-1c-report-grid td:nth-child(5) {
  width: 6.5rem;
  text-align: right;
}

.tz-1c-report-grid th:nth-child(6),
.tz-1c-report-grid td:nth-child(6) {
  width: 10rem;
}

.tz-1c-report-grid th:nth-child(7),
.tz-1c-report-grid td:nth-child(7) {
  width: 9rem;
}

.tz-1c-report-title {
  word-break: break-word;
}

.tz-1c-report-price input,
.tz-1c-report-invoice-date input,
.tz-1c-report-invoice-num input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: 13px;
  padding: 0.28rem 0.4rem;
  border: 1px solid #c9d2dc;
  border-radius: 6px;
  background: #fff;
  min-height: 1.7rem;
}

.tz-1c-report-price input:focus,
.tz-1c-report-invoice-date input:focus,
.tz-1c-report-invoice-num input:focus {
  outline: none;
  border-color: var(--tz1c-accent, #245dff);
  box-shadow: 0 0 0 2px var(--tz1c-accent-soft, rgba(36, 93, 255, 0.1));
}

.tz-1c-report-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
  flex: 0 0 auto;
  padding: 0.45rem 0.7rem;
  border-top: 1px solid var(--tz1c-border, #d0d7de);
  background: var(--tz1c-cmd, #f7f8fa);
}

.tz-1c-report-modal .tz-1c-report-foot {
  border-bottom: 0;
}

.tz-1c-report-modal .tz-1c-muted {
  font-size: 12px;
  color: var(--cab-muted, #64748b);
  align-self: center;
}

/* —— Product labels 58×40 —— */
.labels-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  align-items: center;
  margin: 0.75rem 0 0.5rem;
}

.labels-search-wrap {
  flex: 1 1 220px;
  min-width: 180px;
}

.labels-copies-global {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: #475569;
}

.labels-copies-global input {
  width: 4rem;
  padding: 0.35rem 0.45rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font: inherit;
}

.labels-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 1rem;
  align-items: start;
  margin-top: 0.75rem;
}

@media (max-width: 900px) {
  .labels-layout {
    grid-template-columns: 1fr;
  }
}

.labels-list-wrap {
  max-height: min(70vh, 720px);
  overflow: auto;
}

.labels-table .labels-row {
  cursor: pointer;
}

.labels-table .labels-row.is-preview {
  background: #eff4ff;
}

.labels-table .labels-row.is-disabled {
  opacity: 0.55;
  cursor: default;
}

.labels-copies-input {
  width: 4rem;
  padding: 0.25rem 0.35rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font: inherit;
}

.labels-preview-card {
  border: 1px solid #e5eaf3;
  border-radius: 12px;
  background: #fbfcff;
  padding: 0.75rem;
  position: sticky;
  top: 0.75rem;
}

.labels-preview-title {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.labels-preview-card canvas {
  width: 100%;
  height: auto;
  display: block;
  border: 1px dashed #cbd5e1;
  background: #fff;
  border-radius: 4px;
}

.labels-preview-hint {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
}

/* Override .btn display so [hidden] actually hides in panel actions */
.cabinet-panel-actions [hidden],
.labels-toolbar [hidden] {
  display: none !important;
}

/* Barcode → label download */
.cab-label-bc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  margin-left: 0.35rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 6px;
  color: #245dff;
  background: #eff4ff;
  border: 1px solid #d6e2ff;
  text-decoration: none;
  flex: 0 0 auto;
  line-height: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  padding: 0;
  gap: 0.2rem;
}
.cab-label-bc-btn--text {
  width: auto;
  min-height: 1.5rem;
  padding: 0.15rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
}
.cab-label-bc-btn--text span {
  line-height: 1;
}
.cab-label-bc-btn svg {
  display: block;
  width: 14px;
  height: 14px;
}
.cab-label-bc-btn:hover {
  background: #dde8ff;
  color: #1a4ad6;
}
.cab-label-bc-cell {
  white-space: nowrap;
  vertical-align: middle;
}
.cab-label-bc-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  vertical-align: middle;
}
.cab-label-bc-wrap .cab-label-bc-btn {
  margin-left: 0;
}
.cab-label-bc-text {
  font-variant-numeric: tabular-nums;
}
.cab-mov-product .cab-label-bc-btn,
.cab-stock-card-meta-item .cab-label-bc-btn {
  margin-left: 0.4rem;
  vertical-align: middle;
}
.cab-label-bc-btn.is-busy {
  opacity: 0.55;
  pointer-events: none;
}

/* Document lines: photos + pickers + qty aligned on one axis */
.reception-edit-table th,
.reception-edit-table td {
  vertical-align: middle;
}
.reception-edit-table .reception-edit-col-product .reception-line-product {
  min-height: 2.75rem;
}
.reception-edit-table .reception-line-photo,
.reception-edit-table .reception-line-photo-empty {
  width: 44px;
  height: 44px;
}
.reception-edit-table .cab-priemka-title-btn {
  min-height: 2.75rem;
  align-items: center;
}
.reception-edit-table .reception-edit-col-qty input,
.reception-edit-table .reception-edit-col-actions .btn {
  vertical-align: middle;
}
.cabinet-table-nested td.stock-thumb-cell,
.cabinet-table-nested td.cab-label-bc-cell {
  vertical-align: middle;
}
.cabinet-table-nested .stock-thumb-cell {
  width: 3rem;
}
.cabinet-table-nested .reception-line-photo-sm,
.cabinet-table-nested .reception-line-photo-sm.reception-line-photo-empty {
  width: 40px;
  height: 40px;
  display: block;
}
.cabinet-table-nested .reception-line-photo-sm-btn {
  display: inline-flex;
  vertical-align: middle;
}

/* —— Sklad shell (shift board) —— */
.cabinet-page--sklad .container--sklad {
  max-width: 1440px;
}

.sklad-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 280px;
  gap: 18px;
  align-items: start;
  min-height: 70vh;
}

.sklad-shell[data-active-tab]:not([data-active-tab="urgent"]) {
  grid-template-columns: 220px minmax(0, 1fr);
}

.sklad-shell[data-active-tab]:not([data-active-tab="urgent"]) .sklad-shift-rail {
  display: none;
}

.sklad-nav {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--cab-line);
  border-radius: var(--cab-radius);
  background: var(--cab-surface);
  box-shadow: var(--cab-shadow);
}

.sklad-nav-brand {
  display: grid;
  gap: 2px;
  padding: 4px 6px 10px;
  border-bottom: 1px solid var(--cab-line);
}

.sklad-nav-brand strong {
  font-size: 15px;
  letter-spacing: 0.01em;
}

.sklad-nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.sklad-nav-item.cabinet-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--cab-radius-sm);
  background: transparent;
  color: var(--cab-ink-2);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  box-shadow: none;
  white-space: normal;
}

.sklad-nav-item.cabinet-tab:hover {
  background: var(--cab-hover);
  color: var(--cab-ink);
}

.sklad-nav-item.cabinet-tab.active {
  background: var(--cab-accent-soft);
  color: var(--cab-accent);
  box-shadow: none;
}

.sklad-nav-item.cabinet-tab.is-urgent:not(.active) {
  color: #b42318;
}

.sklad-nav-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 8px;
  background: var(--cab-plate);
  color: var(--cab-ink-2);
  font-size: 12px;
  flex: 0 0 auto;
}

.sklad-nav-item.active .sklad-nav-ico {
  background: rgba(36, 93, 255, 0.16);
  color: var(--cab-accent);
}

.sklad-nav-label {
  flex: 1 1 auto;
  line-height: 1.25;
}

.sklad-nav-item .urgent-count-badge {
  margin-left: auto;
}

.sklad-nav-refresh {
  width: 100%;
  margin-top: auto;
}

.sklad-main {
  min-width: 0;
}

.sklad-main-head {
  margin-bottom: 8px;
}

.sklad-main-head h1 {
  margin: 0;
  font-size: 1.55rem;
}

.sklad-main-head .cabinet-lead {
  margin: 6px 0 0;
}

.sklad-shift-rail {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sklad-rail-block {
  padding: 14px;
  border: 1px solid var(--cab-line);
  border-radius: var(--cab-radius);
  background: var(--cab-surface);
  box-shadow: var(--cab-shadow);
}

.sklad-rail-title {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cab-muted);
}

.sklad-rail-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.sklad-rail-stat {
  padding: 10px;
  border-radius: var(--cab-radius-sm);
  background: var(--cab-surface-soft);
  border: 1px solid var(--cab-line);
}

.sklad-rail-stat b {
  display: block;
  font-size: 1.35rem;
  line-height: 1.1;
  color: var(--cab-ink);
}

.sklad-rail-stat span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--cab-muted);
}

.sklad-rail-plan {
  display: grid;
  gap: 8px;
}

.sklad-rail-plan-item {
  display: grid;
  gap: 2px;
  padding: 10px 10px;
  border-radius: var(--cab-radius-sm);
  border: 1px solid var(--cab-line);
  background: var(--cab-surface-soft);
  cursor: pointer;
  text-align: left;
  width: 100%;
  font: inherit;
  color: inherit;
}

.sklad-rail-plan-item:hover {
  border-color: var(--cab-line-strong);
  background: var(--cab-hover);
}

.sklad-rail-plan-item strong {
  font-size: 13px;
  color: var(--cab-ink);
}

.sklad-rail-plan-item span {
  font-size: 12px;
  color: var(--cab-muted);
}

.staff-urgent--board .urgent-block {
  padding: 14px;
  border: 1px solid var(--cab-line);
  border-radius: var(--cab-radius);
  background: var(--cab-surface);
  box-shadow: var(--cab-shadow);
  margin-bottom: 14px;
}

.staff-urgent--board .cab-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}

.staff-urgent--board .cab-item {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--cab-line);
  border-radius: var(--cab-radius-sm);
  background: var(--cab-surface-soft);
  box-shadow: none;
}

.staff-urgent--board .cab-item:hover {
  border-color: var(--cab-line-strong);
  background: #fff;
}

@media (max-width: 1100px) {
  .sklad-shell,
  .sklad-shell[data-active-tab]:not([data-active-tab="urgent"]) {
    grid-template-columns: 1fr;
  }

  .sklad-nav,
  .sklad-shift-rail {
    position: static;
  }

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

@media (max-width: 640px) {
  .sklad-nav-list {
    grid-template-columns: 1fr;
  }

  .staff-urgent--board .cab-list {
    grid-template-columns: 1fr;
  }
}

/* ——— Учёт FBS (день) ——— */
.fbs-daily {
  --fbs-input: var(--cab-accent-soft);
  --fbs-input-border: rgba(36, 93, 255, 0.28);
  --fbs-locked: var(--cab-plate);
  max-width: 1240px;
}

.fbs-daily-top-cols {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 12px;
  align-items: stretch;
}

.fbs-daily-top-cols > .fbs-daily-group {
  margin-bottom: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  max-height: min(70vh, 640px);
}

.fbs-daily-top-cols > .fbs-daily-group > .fbs-daily-group-h {
  position: sticky;
  top: 0;
  z-index: 2;
  flex: 0 0 auto;
}

.fbs-daily-group-body {
  min-height: 0;
  flex: 1 1 auto;
}

.fbs-daily-top-cols > .fbs-daily-group > .fbs-daily-group-body {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.fbs-daily-top-cols .fbs-daily-row {
  padding: 7px 12px;
  min-height: 40px;
  gap: 8px;
}

.fbs-daily-top-cols .fbs-daily-row-name {
  font-size: 13px;
}

.fbs-daily-top-cols .fbs-daily-row input {
  min-height: 34px;
  padding: 6px 8px;
  font-size: 14px;
}

.fbs-daily-top-cols .fbs-daily-subh {
  padding: 10px 12px 4px;
}

/* iPad landscape / small laptop: keep 2 cols, slightly shorter cards */
@media (max-width: 1180px) and (min-width: 901px) {
  .fbs-daily {
    max-width: none;
  }

  .fbs-daily-top-cols > .fbs-daily-group {
    max-height: min(62vh, 560px);
  }

  .fbs-daily-top-cols .fbs-daily-row {
    grid-template-columns: minmax(0, 1fr) 88px;
  }
}

/* iPad portrait and below: stack columns */
@media (max-width: 900px) {
  .fbs-daily-top-cols {
    grid-template-columns: 1fr;
  }

  .fbs-daily-top-cols > .fbs-daily-group {
    max-height: min(52vh, 480px);
  }

  .fbs-daily-top-cols > .fbs-daily-group > .fbs-daily-group-body {
    overflow: auto;
  }

  .fbs-daily-head {
    align-items: stretch;
  }

  .fbs-daily-toolbar {
    width: 100%;
  }

  .fbs-daily-date-label {
    flex: 1 1 auto;
  }

  .fbs-daily-date-label input {
    width: 100%;
    min-height: 44px;
  }

  .fbs-daily-mode {
    flex: 1 1 auto;
  }

  .fbs-daily-mode button {
    flex: 1 1 0;
    min-height: 44px;
    padding: 10px 12px;
  }
}

.fbs-daily-head {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 16px;
}

.fbs-daily-head h2 {
  margin: 0 0 4px;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}

.fbs-daily-head .cabinet-muted,
.fbs-daily-head-text .cabinet-muted {
  margin: 0;
  line-height: 1.45;
  max-width: 36rem;
}

.fbs-daily-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
}

.fbs-daily-date-label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--cab-muted);
}

.fbs-daily-date-label input {
  border: 1px solid var(--cab-line-strong);
  border-radius: var(--cab-radius-sm);
  padding: 8px 10px;
  font: inherit;
  background: var(--cab-surface);
}

.fbs-daily-mode {
  display: inline-flex;
  gap: 4px;
  background: var(--cab-plate);
  padding: 4px;
  border-radius: var(--cab-radius-sm);
}

.fbs-daily-mode button {
  border: 0;
  background: transparent;
  padding: 8px 12px;
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--cab-muted);
  cursor: pointer;
}

.fbs-daily-mode button.active {
  background: var(--cab-surface);
  color: var(--cab-ink);
  box-shadow: var(--cab-shadow);
}

.fbs-daily-rolehint {
  margin: 0 0 12px;
  font-size: 13px;
}

.fbs-daily-totals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

@media (max-width: 640px) {
  .fbs-daily-totals {
    grid-template-columns: 1fr;
  }
}

.fbs-daily-total-card {
  background: var(--cab-surface);
  border: 1px solid var(--cab-line);
  border-radius: var(--cab-radius);
  padding: 14px 16px;
  box-shadow: var(--cab-shadow);
}

.fbs-daily-total-card span {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--cab-muted);
  margin-bottom: 4px;
}

.fbs-daily-total-card strong {
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
}

.fbs-daily-group {
  background: var(--cab-surface);
  border: 1px solid var(--cab-line);
  border-radius: var(--cab-radius);
  box-shadow: var(--cab-shadow);
  margin-bottom: 12px;
  overflow: hidden;
}

.fbs-daily-group-h {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 12px 14px;
  background: var(--cab-surface-soft);
  border-bottom: 1px solid var(--cab-line);
  font-weight: 700;
  font-size: 14px;
}

.fbs-daily-group-h em {
  font-style: normal;
  font-weight: 600;
  font-size: 12px;
  color: var(--cab-muted);
}

.fbs-daily-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  border-top: 1px solid var(--cab-line);
  min-height: 48px;
}

.fbs-daily-group > .fbs-daily-row:first-child,
.fbs-daily-group-body > .fbs-daily-row:first-child {
  border-top: 0;
}

.fbs-daily-row-name {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  text-align: left;
  font: inherit;
  font-size: 14px;
  color: var(--cab-ink-2);
  line-height: 1.35;
  padding-right: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.fbs-daily-row-name:hover {
  color: var(--cab-accent);
}

.fbs-daily-prod-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--cab-accent-soft);
  color: var(--cab-accent);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.fbs-daily-prod-dialog {
  width: min(720px, 100%);
}

.fbs-daily-products-modal .reception-modal-dialog {
  width: min(720px, 100%);
}

.fbs-daily-prod-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.fbs-daily-prod-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid var(--cab-line);
  border-radius: var(--cab-radius-sm);
  background: var(--cab-surface-soft);
}

.fbs-daily-prod-list .cab-line-thumb {
  width: 52px;
  height: 52px;
  object-fit: cover;
  flex: 0 0 auto;
}

.fbs-daily-prod-main {
  display: grid;
  gap: 4px;
  min-width: 0;
  flex: 1 1 200px;
}

.fbs-daily-prod-main strong {
  font-size: 14px;
  line-height: 1.35;
  color: var(--cab-ink);
}

.fbs-daily-prod-wb {
  color: inherit;
  text-decoration: none;
}

.fbs-daily-prod-wb:hover {
  color: var(--cab-accent);
  text-decoration: underline;
}

.fbs-daily-prod-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.fbs-daily-row input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--fbs-input-border);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  background: var(--fbs-input);
  color: var(--cab-ink);
  box-sizing: border-box;
}

.fbs-daily-row input:focus {
  outline: none;
  border-color: var(--cab-accent);
  box-shadow: 0 0 0 3px rgba(36, 93, 255, 0.14);
  background: var(--cab-surface);
}

.fbs-daily-row.is-text input {
  text-align: left;
  background: var(--cab-surface-soft);
  border-color: var(--cab-line-strong);
  font-size: 13px;
}

.fbs-daily-subh {
  padding: 12px 14px 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--cab-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-top: 1px solid var(--cab-line);
  background: var(--cab-surface-soft);
}

.fbs-daily-subh:first-of-type,
.fbs-daily-group-body > .fbs-daily-subh:first-child {
  border-top: 0;
}

.fbs-daily-subh em {
  font-style: normal;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  margin-left: 4px;
  color: var(--cab-muted);
  opacity: 0.85;
}

.fbs-daily-cols {
  display: grid;
  grid-template-columns: repeat(var(--fbs-cols, 3), minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--cab-line);
}

.fbs-daily-cols .fbs-daily-row.is-stack {
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: stretch;
  padding: 12px 14px 14px;
  border-top: 0;
  border-right: 1px solid var(--cab-line);
  min-height: auto;
}

.fbs-daily-cols .fbs-daily-row.is-stack:last-child {
  border-right: 0;
}

.fbs-daily-row.is-stack .fbs-daily-row-name {
  font-weight: 700;
  color: var(--cab-ink);
  font-size: 13px;
  line-height: 1.3;
  min-height: 2.6em;
}

.fbs-daily-cols .fbs-daily-row.is-stack input {
  max-width: none;
  width: 100%;
  min-height: 42px;
}

.fbs-daily-top-cols .fbs-daily-cols .fbs-daily-row.is-stack {
  padding: 8px 10px 10px;
}

.fbs-daily-top-cols .fbs-daily-row.is-stack .fbs-daily-row-name {
  font-size: 12px;
  min-height: 2.4em;
}

/* Logistics in a half-width card: one stack column until the card is wide enough */
.fbs-daily-top-cols .is-logistics .fbs-daily-cols {
  grid-template-columns: 1fr;
}

.fbs-daily-top-cols .is-logistics .fbs-daily-cols .fbs-daily-row.is-stack {
  border-right: 0;
  border-top: 1px solid var(--cab-line);
}

.fbs-daily-top-cols .is-logistics .fbs-daily-cols .fbs-daily-row.is-stack:first-child {
  border-top: 0;
}

.fbs-daily-top-cols .is-logistics .fbs-daily-row.is-stack .fbs-daily-row-name {
  min-height: 0;
}

@media (min-width: 1200px) {
  .fbs-daily-top-cols .is-logistics .fbs-daily-cols {
    grid-template-columns: repeat(var(--fbs-cols, 3), minmax(0, 1fr));
  }

  .fbs-daily-top-cols .is-logistics .fbs-daily-cols .fbs-daily-row.is-stack {
    border-top: 0;
    border-right: 1px solid var(--cab-line);
  }

  .fbs-daily-top-cols .is-logistics .fbs-daily-cols .fbs-daily-row.is-stack:last-child {
    border-right: 0;
  }

  .fbs-daily-top-cols .is-logistics .fbs-daily-row.is-stack .fbs-daily-row-name {
    min-height: 2.4em;
  }
}

@media (max-width: 720px) {
  .fbs-daily-cols {
    grid-template-columns: 1fr;
  }

  .fbs-daily-cols .fbs-daily-row.is-stack {
    border-right: 0;
    border-top: 1px solid var(--cab-line);
  }

  .fbs-daily-cols .fbs-daily-row.is-stack:first-child {
    border-top: 0;
  }

  .fbs-daily-row.is-stack .fbs-daily-row-name {
    min-height: 0;
  }
}

.fbs-daily-row input:disabled {
  background: var(--fbs-locked);
  border-color: var(--cab-line-strong);
  color: var(--cab-muted);
  cursor: not-allowed;
}

.fbs-daily-week-wrap {
  overflow-x: auto;
  background: var(--cab-surface);
  border: 1px solid var(--cab-line);
  border-radius: var(--cab-radius);
  box-shadow: var(--cab-shadow);
}

.fbs-daily-week {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 760px;
}

.fbs-daily-week th,
.fbs-daily-week td {
  border-bottom: 1px solid var(--cab-line);
  padding: 6px 8px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.fbs-daily-week th:first-child,
.fbs-daily-week td:first-child {
  text-align: left;
  position: sticky;
  left: 0;
  background: var(--cab-surface);
  min-width: 200px;
  z-index: 1;
}

.fbs-daily-week thead th {
  background: var(--cab-surface-soft);
  font-size: 12px;
  color: var(--cab-muted);
  font-weight: 700;
}

.fbs-daily-week thead th:first-child {
  background: var(--cab-surface-soft);
}

.fbs-daily-week .is-today {
  background: rgba(36, 93, 255, 0.05);
}

.fbs-daily-week td input {
  width: 68px;
  border: 1px solid var(--fbs-input-border);
  border-radius: 6px;
  padding: 4px 6px;
  text-align: right;
  background: var(--fbs-input);
  color: var(--cab-ink);
  font: inherit;
  font-variant-numeric: tabular-nums;
}

.fbs-daily-week td input:focus {
  outline: none;
  border-color: var(--cab-accent);
  box-shadow: 0 0 0 2px rgba(36, 93, 255, 0.14);
  background: var(--cab-surface);
}

.fbs-daily-week td input:disabled {
  background: var(--fbs-locked);
  border-color: var(--cab-line);
  color: var(--cab-muted);
}

.fbs-daily-week-group td {
  text-align: left !important;
  font-weight: 700;
  background: var(--cab-surface-soft);
  padding-top: 10px;
  padding-bottom: 10px;
}

.fbs-daily-savebar {
  position: sticky;
  bottom: 12px;
  z-index: 5;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
  margin-top: 14px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--cab-line);
  border-radius: var(--cab-radius);
  box-shadow: var(--cab-shadow-hover);
  backdrop-filter: blur(8px);
}

.fbs-daily-savebar .cabinet-muted {
  margin-right: auto;
  font-size: 13px;
}

/* Touch / tablet / phone */
@media (hover: none), (pointer: coarse) {
  .fbs-daily-row input,
  .fbs-daily-top-cols .fbs-daily-row input,
  .fbs-daily-cols .fbs-daily-row.is-stack input,
  .fbs-daily-week td input,
  .fbs-daily-date-label input {
    min-height: 44px;
    font-size: 16px; /* avoid iOS focus zoom */
  }

  .fbs-daily-week td input {
    width: 72px;
    padding: 8px 6px;
  }

  .fbs-daily-mode button,
  .fbs-daily-savebar .btn,
  .fbs-daily-toolbar .btn {
    min-height: 44px;
  }

  .fbs-daily-row-name {
    padding: 4px 0;
  }
}

@media (max-width: 720px) {
  .fbs-daily {
    max-width: none;
  }

  .fbs-daily-head h2 {
    font-size: 1.25rem;
  }

  .fbs-daily-group-h {
    flex-wrap: wrap;
    padding: 10px 12px;
    font-size: 13px;
  }

  .fbs-daily-row {
    grid-template-columns: minmax(0, 1fr) 96px;
    gap: 8px;
    padding: 8px 12px;
    min-height: 48px;
  }

  .fbs-daily-row-name {
    font-size: 13px;
  }

  .fbs-daily-row input {
    min-height: 44px;
    font-size: 16px;
  }

  .fbs-daily-top-cols > .fbs-daily-group {
    max-height: min(60vh, 420px);
  }

  .fbs-daily-savebar {
    bottom: max(8px, env(safe-area-inset-bottom, 0px));
    left: 0;
    right: 0;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    padding: 10px;
  }

  .fbs-daily-savebar .cabinet-muted {
    flex: 1 1 100%;
    margin-right: 0;
  }

  .fbs-daily-savebar .btn {
    flex: 1 1 auto;
  }

  .fbs-daily-week-wrap {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }

  .fbs-daily-week th:first-child,
  .fbs-daily-week td:first-child {
    min-width: 140px;
    max-width: 46vw;
  }

  .fbs-daily-log-list {
    max-height: 220px;
  }

  .fbs-daily-reports-nav {
    gap: 4px;
  }

  .fbs-daily-reports-nav .fbs-daily-csv {
    margin-left: 0;
    width: 100%;
  }
}

@media (max-width: 420px) {
  .fbs-daily-row {
    grid-template-columns: 1fr;
    gap: 6px;
    align-items: stretch;
  }

  .fbs-daily-row input {
    width: 100%;
    max-width: none;
    text-align: right;
  }

  .fbs-daily-totals {
    grid-template-columns: 1fr;
  }
}

.fbs-daily-log {
  margin-top: 18px;
  background: var(--cab-surface);
  border: 1px solid var(--cab-line);
  border-radius: var(--cab-radius);
  box-shadow: var(--cab-shadow);
}

.fbs-daily-log-h {
  padding: 12px 14px;
  border-bottom: 1px solid var(--cab-line);
  font-weight: 700;
  font-size: 14px;
}

.fbs-daily-log-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 260px;
  overflow: auto;
}

.fbs-daily-log-list li {
  padding: 10px 14px;
  border-top: 1px solid var(--cab-line);
  font-size: 13px;
  color: var(--cab-ink-2);
  line-height: 1.4;
}

.fbs-daily-log-list li:first-child {
  border-top: 0;
}

.fbs-daily-log-list time {
  display: block;
  font-size: 11px;
  color: var(--cab-muted);
  margin-bottom: 2px;
}

.fbs-daily.is-busy {
  opacity: 0.72;
  pointer-events: none;
}

.fbs-daily-reports-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 0 0 14px;
  padding: 8px;
  background: var(--cab-plate);
  border-radius: var(--cab-radius-sm);
}

.fbs-daily-reports-nav button {
  border: 0;
  background: transparent;
  padding: 7px 11px;
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--cab-muted);
  cursor: pointer;
}

.fbs-daily-reports-nav button.active {
  background: var(--cab-surface);
  color: var(--cab-ink);
  box-shadow: var(--cab-shadow);
}

.fbs-daily-reports-nav .fbs-daily-csv {
  margin-left: auto;
}

.fbs-daily-report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 900px) {
  .fbs-daily-report-grid {
    grid-template-columns: 1fr;
  }
}

.fbs-daily-report-table td:first-child,
.fbs-daily-report-table th:first-child {
  white-space: nowrap;
}

.fbs-daily-report-audit {
  background: var(--cab-surface);
  border: 1px solid var(--cab-line);
  border-radius: var(--cab-radius);
  max-height: 70vh;
  overflow: auto;
}
