:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --border: #dce7f5;
  --border-soft: #edf3fa;
  --text: #10233f;
  --muted: #8a9ab3;
  --muted-dark: #5c6f8d;
  --primary: #005bff;
  --primary-dark: #0048cc;
  --primary-soft: #e8f1ff;
  --green: #005bff;
  --green-dark: #0048cc;
  --green-soft: #eaf1ff;
  --red: #dc3e3e;
  --shadow: 0 18px 44px rgba(17, 45, 89, 0.08);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: linear-gradient(180deg, #f7faff 0%, #f3f7fc 100%);
  color: var(--text);
  font-family: "Inter", sans-serif;
  scrollbar-gutter: stable;
}

body {
  min-height: 100vh;
}

a {
  color: inherit;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 288px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border-right: 1px solid var(--border);
  padding: 20px 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.sidebar > div:first-child {
  min-height: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2px 4px 24px;
}

.logo-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0d6efd, #3a8cff);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 24px rgba(13, 110, 253, 0.24);
}

.logo-text {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.store-switcher-wrapper {
  padding: 0 4px 18px;
}

.store-switcher {
  position: relative;
}

.store-switcher-summary,
.store-switcher-empty {
  list-style: none;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  min-height: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 8px 24px rgba(0, 91, 255, 0.06);
  cursor: pointer;
  text-decoration: none;
}

.store-switcher-summary::-webkit-details-marker {
  display: none;
}

.store-switcher-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.store-switcher-text-rich {
  gap: 0px;
}

.store-switcher-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  line-height: 1.15;
  color: var(--muted-dark);
}

.store-switcher-line-top {
  align-items: flex-start;
}

.store-switcher-text strong {
  font-size: 15px;
  line-height: 1.25;
  color: var(--text);
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.store-switcher-text span {
  font-size: 13px;
  color: var(--muted-dark);
}

.store-switcher-line-right {
  flex-shrink: 0;
  text-align: right;
  white-space: nowrap;
}

.store-rating {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: #d08a00;
}

.store-switcher-arrow {
  margin-left: auto;
  color: #8ea2c2;
  font-size: 15px;
  padding-top: 4px;
}

.store-switcher[open] .store-switcher-arrow {
  transform: rotate(180deg);
}

.store-switcher-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 15;
  padding: 8px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 20px 40px rgba(10, 35, 85, 0.14);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.store-switcher-dropdown form {
  margin: 0;
}

.store-switcher-option {
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 14px;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
}

.store-switcher-option:hover,
.store-switcher-option.active {
  background: var(--primary-soft);
}

.store-switcher-option-name {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.store-switcher-option-meta {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted-dark);
}

.brand {
  font-size: 22px;
  font-weight: 800;
}

.ai {
  font-size: 12px;
  color: var(--primary);
  font-weight: 800;
  margin-top: 4px;
}

.menu-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9aa9bf;
  margin: 22px 10px 10px;
  font-weight: 800;
}

.menu {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding: 0 4px 12px;
  scrollbar-width: thin;
  scrollbar-color: #c6d4e8 transparent;
}

.menu::-webkit-scrollbar {
  width: 6px;
}

.menu::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #c6d4e8;
}

.menu-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 16px;
  text-decoration: none;
  color: #48617f;
  font-weight: 600;
  transition: 0.2s ease;
}

.menu-item:hover {
  background: #f4f8ff;
  color: var(--primary-dark);
}

.menu-item.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 800;
}

.menu-ico {
  width: 18px;
  text-align: center;
  color: inherit;
  opacity: 0.85;
}

.sidebar-account-card {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.sidebar-account-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #005bff, #2d7dff);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 800;
}

.sidebar-account-meta {
  min-width: 0;
}

.sidebar-account-meta strong {
  display: block;
  font-size: 16px;
  line-height: 1.2;
}

.sidebar-account-meta span {
  display: block;
  color: var(--muted-dark);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-icon-button {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: #8a98aa;
  display: grid;
  place-items: center;
  cursor: pointer;
  text-decoration: none;
  font-size: 18px;
}

.sidebar-icon-button:hover {
  background: #f5f8fc;
  color: var(--primary);
}

.notification-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
  padding: 0 4px;
}

.content {
  flex: 1;
  padding: 28px 30px;
}

.content-auth {
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  margin-top: 4px;
}

.page-header-stack {
  align-items: flex-start;
}

.page-header-column {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.page-header-left {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.page-header h1,
.auth-card h1,
.hero-card h2,
.info-card h2,
.info-card h3,
.modal-card h2 {
  margin: 0;
}

.page-header h1 {
  font-size: 40px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.page-subtitle {
  margin: 0;
  color: var(--muted-dark);
  font-size: 16px;
}

.page-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  min-height: 44px;
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  background: #fff;
  text-decoration: none;
  transition: 0.2s ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-outline {
  border-color: var(--primary);
  color: var(--primary);
  background: #fff;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 22px rgba(13, 110, 253, 0.2);
}

.btn-success {
  background: var(--green);
  color: #fff;
  box-shadow: 0 10px 22px rgba(0, 91, 255, 0.22);
}

.btn-outline-green {
  color: var(--primary);
  border-color: var(--primary);
  background: #fff;
}

.btn-light {
  background: #f4f7fb;
  color: var(--muted-dark);
  border-color: var(--border);
}

.btn-full {
  width: 100%;
}

.btn-sm {
  min-height: 36px;
  padding: 8px 14px;
  font-size: 14px;
  border-radius: 12px;
}

.hero-card,
.info-card,
.auth-card,
.modal-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 30px;
  margin-bottom: 22px;
}

.hero-card p,
.info-card p,
.auth-card p,
.section-head p,
.empty-store-state p,
.store-context-note {
  color: var(--muted-dark);
  line-height: 1.6;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.settings-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.settings-layout-centered {
  max-width: 736px;
  margin: 0 auto;
}

.settings-page-header {
  justify-content: center;
}

.settings-page-header-inner {
  width: 100%;
  max-width: 736px;
  text-align: left;
}

.settings-card {
  padding: 28px;
}

.settings-card-wide {
  grid-column: 1 / -1;
}

.section-head {
  margin-bottom: 22px;
}

.section-head-space {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.settings-card .btn-success {
  min-width: 220px;
}

.auth-card {
  width: 100%;
  max-width: 520px;
  padding: 32px;
}

.auth-card-header {
  margin-bottom: 24px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.compact-form {
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 14px;
  font-weight: 700;
  color: #243750;
}

.form-group input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  min-height: 48px;
  padding: 0 16px;
  font-size: 15px;
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus {
  outline: none;
  border-color: #8cb8ff;
  box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.12);
}

.form-help,
.form-error {
  font-size: 13px;
  line-height: 1.5;
}

.form-help {
  color: var(--muted-dark);
}

.form-error {
  color: var(--red);
}

.auth-footer {
  margin-top: 18px;
  display: flex;
  gap: 8px;
  justify-content: center;
  color: var(--muted-dark);
}

.auth-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
}

.messages-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.message {
  padding: 14px 18px;
  border-radius: 14px;
  font-weight: 700;
}

.message-success {
  background: #eefbf3;
  color: #14884e;
  border: 1px solid #cfeeda;
}

.message-error {
  background: #fff4f4;
  color: var(--red);
  border: 1px solid #ffd8d8;
}

.message-info {
  background: #eef4ff;
  color: var(--primary);
  border: 1px solid #d4e3ff;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: #edf4ff;
  color: var(--primary);
  font-size: 14px;
  font-weight: 700;
  margin-right: 15px;
}

.store-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.store-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.store-row-meta strong {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
}

.store-row-meta span {
  color: var(--muted-dark);
  font-size: 14px;
}

.store-row-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-action-button {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--primary);
  display: grid;
  place-items: center;
  text-decoration: none;
  cursor: pointer;
  font-size: 16px;
}

.icon-action-button:hover {
  background: var(--primary-soft);
}

.icon-action-danger {
  color: var(--red);
}

.icon-action-danger:hover {
  background: #fff4f4;
}

.empty-store-state {
  min-height: 220px;
  border: 1px dashed #cfe0f7;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px;
  background: linear-gradient(180deg, #fbfdff 0%, #f7fbff 100%);
}

.empty-store-icon {
  font-size: 36px;
  margin-bottom: 14px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 27, 48, 0.5);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 56px 20px;
  z-index: 50;
}

.modal-card {
  width: 100%;
  max-width: 560px;
  padding: 28px;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  text-decoration: none;
  background: #f4f7fb;
  color: var(--muted-dark);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}

.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;
}

.tariffs-header {
  justify-content: center;
}

.tariffs-header-inner {
  width: 100%;
  max-width: 1200px;
  text-align: left;
}

.tariffs-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.tariff-card {
  background: linear-gradient(180deg, #0b1730 0%, #081120 100%);
  border: 1px solid rgba(79, 140, 255, 0.18);
  border-radius: 24px;
  padding: 24px;
  color: #edf4ff;
  box-shadow: 0 18px 44px rgba(5, 23, 56, 0.36);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.tariff-card-pro {
  background: linear-gradient(180deg, #0c1c3f 0%, #08152d 100%);
}

.tariff-card-premier {
  background: linear-gradient(180deg, #122552 0%, #0a1730 100%);
}

.tariff-card-top {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tariff-plan-name {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.tariff-price-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.tariff-price {
  font-size: 44px;
  line-height: 1;
  font-weight: 800;
  color: #ffffff;
}

.tariff-period {
  font-size: 16px;
  color: #c4d6f7;
  font-weight: 700;
  padding-bottom: 4px;
}

.tariff-description {
  margin: 0;
  color: #b5c7e5;
  min-height: 72px;
}

.btn-tariff-disabled {
  width: 100%;
  background: linear-gradient(180deg, #cfe1ff 0%, #e5efff 100%);
  color: #6e84aa;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: none;
  cursor: not-allowed;
}

.btn-tariff-disabled:hover {
  transform: none;
}

.tariff-feature-box {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #dce8ff;
  font-size: 14px;
  font-weight: 700;
}

.tariff-feature-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tariff-feature-list li {
  position: relative;
  padding-left: 24px;
  color: #edf4ff;
  line-height: 1.55;
}

.tariff-feature-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: #68a4ff;
  font-weight: 800;
}

.label-generator-summary-card {
  padding: 24px 28px;
}

.label-generator-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.products-period-tabs {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.products-period-header-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.products-period-subtitle {
  white-space: nowrap;
}

.products-period-tab,
.products-period-empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted-dark);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.products-period-tab.active {
  background: var(--primary-soft);
  border-color: #bfd4ff;
  color: var(--primary);
}

.products-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}

.products-summary-card {
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.products-summary-label {
  color: var(--muted-dark);
  font-size: 14px;
  font-weight: 600;
}

.products-summary-card strong {
  font-size: 40px;
  line-height: 1;
  letter-spacing: -0.03em;
}

.products-summary-meta {
  color: var(--muted-dark);
  font-size: 13px;
}

.products-toolbar {
  align-items: center;
}

.products-toolbar-form {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  flex-wrap: wrap;
}

.products-segmented-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.products-segment {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted-dark);
  border-radius: 999px;
  min-height: 38px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.products-segment span {
  color: inherit;
}

.products-segment.is-active,
.products-segment:hover {
  background: #1e2433;
  border-color: #1e2433;
  color: #fff;
}

#productsVisibleCount {
  width: 200px;
  min-width: 200px;
  justify-content: center;
}

.products-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.products-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.products-toggle-slider {
  position: relative;
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: #d9e5f4;
  transition: background 0.2s ease;
}

.products-toggle-slider::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(16, 35, 63, 0.18);
  transition: transform 0.2s ease;
}

.products-toggle input:checked + .products-toggle-slider {
  background: #1ac26b;
}

.products-toggle input:checked + .products-toggle-slider::after {
  transform: translateX(20px);
}

.products-toggle-label {
  color: var(--muted-dark);
  font-size: 14px;
  font-weight: 600;
}

.products-analytics-table col.col-revenue,
.products-analytics-table col.col-orders,
.products-analytics-table col.col-stock {
  width: 140px;
}

.product-name-cell strong {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
  line-height: 1.45;
}

.product-name-cell span {
  color: var(--muted-dark);
  font-size: 13px;
  word-break: break-all;
}

.label-generator-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.toolbar-search {
  flex: 1;
  max-width: 520px;
}

.compact-card {
  padding: 18px 20px;
}

.label-generator-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.compact-row {
  gap: 12px;
}

.label-generator-summary-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.label-generator-summary-row h2 {
  margin-bottom: 8px;
}

.label-generator-search-row {
  margin-top: 14px;
}

.label-generator-search {
  position: relative;
}

.label-generator-search input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fbfcff;
  padding: 0 16px 0 40px;
  font-size: 14px;
  color: var(--text);
}

.label-generator-search input:focus {
  outline: none;
  border-color: #8cb8ff;
  box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.08);
}

.label-generator-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 16px;
}

.label-generator-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.table-card {
  padding: 0;
  overflow: visible;
  border-radius: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--panel);
}

.table-scroll {
  overflow-x: auto;
}

.table-card-visible-overflow {
  overflow: visible;
}

.products-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  border-radius: 24px;
  overflow: hidden;
}

.products-table col.col-photo {
  width: 94px;
}

.products-table col.col-sku {
  width: 136px;
}

.products-table col.col-barcode {
  width: 170px;
}

.products-table col.col-article {
  width: 210px;
}

.products-table col.col-copies {
  width: 136px;
}

.products-table col.col-actions {
  width: 128px;
}

.dispensers-table col.col-login {
  width: 240px;
}

.dispensers-table col.col-dispenser-id {
  width: 220px;
}

.dispensers-table col.col-metric {
  width: 138px;
}

.dispensers-table col.col-last-seen {
  width: 210px;
}

.dispenser-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.dispenser-status.synced {
  background: #eefbf3;
  color: #14884e;
}

.dispenser-status.pending,
.status-pill-pending {
  background: #fff5e8;
  color: #b76a00;
}

.inline-form {
  margin: 0;
}

.dispenser-form-row td {
  background: #fbfdff;
  padding-top: 0;
}

.dispenser-edit-form {
  padding: 18px 0 4px;
}

.dispenser-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.dispenser-form-group-wide {
  grid-column: 1 / -1;
}

.dispenser-input,
.dispenser-textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  min-height: 44px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text);
  font-family: inherit;
}

.dispenser-textarea {
  min-height: 104px;
  resize: vertical;
}

.dispenser-input:focus,
.dispenser-textarea:focus {
  outline: none;
  border-color: #8cb8ff;
  box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.08);
}

.dispenser-form-actions {
  margin-top: 18px;
}

.dispenser-settings-layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px 16px;
  align-items: start;
}

.dispenser-settings-section-title {
  grid-column: 1 / -1;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-dark);
}

.dispenser-settings-layout + .dispenser-settings-layout {
  margin-top: 20px;
}

.dispenser-settings-head {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-dark);
  padding-bottom: 2px;
}

.dispenser-settings-head.current {
  grid-column: 2;
}

.dispenser-settings-head.new {
  grid-column: 3;
}

.dispenser-setting-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  padding-top: 12px;
}

.dispenser-setting-label[data-param-label],
.dispenser-readonly-label[data-param-label] {
  cursor: help;
}

.param-tooltip {
  position: fixed;
  z-index: 10000;
  max-width: min(520px, calc(100vw - 24px));
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(220, 231, 245, 0.9);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 44px rgba(17, 45, 89, 0.14);
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
  pointer-events: none;
}

.dispenser-setting-current-text {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: #f8fbff;
  color: var(--text);
  word-break: break-word;
}

.dispenser-setting-input {
  min-width: 0;
}

.dispenser-setting-input .dispenser-input,
.dispenser-setting-input .dispenser-textarea {
  width: 100%;
}

.dispenser-setting-input-wide {
  align-self: stretch;
}

.dispenser-readonly-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.dispenser-readonly-item {
  padding: 14px 16px;
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  background: #fff;
}

.dispenser-readonly-label {
  display: block;
  font-size: 12px;
  color: var(--muted-dark);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.dispenser-readonly-item strong {
  font-size: 16px;
}

.products-table thead th {
  background: #f7faff;
  color: var(--muted-dark);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.products-table thead th:first-child {
  border-top-left-radius: 24px;
}

.products-table thead th:last-child {
  border-top-right-radius: 24px;
}

.products-table th,
.products-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-soft);
  text-align: left;
  vertical-align: top;
}

.products-table tbody tr:hover {
  background: #f9fbff;
}

.products-table tbody tr:last-child td:first-child {
  border-bottom-left-radius: 24px;
}

.products-table tbody tr:last-child td:last-child {
  border-bottom-right-radius: 24px;
}

.products-table tbody td:nth-child(3) {
  min-width: 140px;
}

.products-table tbody td:nth-child(4) {
  font-weight: 600;
}

.product-title-cell {
  white-space: normal;
  word-break: break-word;
  line-height: 1.45;
}

.product-article-cell {
  white-space: normal;
  word-break: break-all;
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.label-copies-input {
  width: 88px;
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 12px;
  font-size: 14px;
}

.label-copies-input:focus {
  outline: none;
  border-color: #8cb8ff;
  box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.08);
}

.label-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.label-actions-icons {
  gap: 8px;
}

.icon-action-print {
  border: 0;
  background: var(--primary);
  color: #fff;
}

.icon-action-print:hover {
  background: var(--primary-dark);
}

.product-image-hover {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
}

.product-thumb {
  width: auto;
  height: 60px;
  max-width: 60px;
  border-radius: 12px;
  border: 1px solid var(--border);
  object-fit: cover;
  background: #fff;
  display: block;
}

.product-thumb-placeholder {
  width: 60px;
  min-width: 60px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: #f7faff;
}

.product-image-zoom {
  position: fixed;
  left: var(--zoom-left, 120px);
  top: var(--zoom-top, 120px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
  z-index: 9999;
  padding: 8px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 16px 36px rgba(16, 35, 63, 0.18);
}

.product-image-zoom img {
  display: block;
  width: 220px;
  height: 220px;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
}

.product-image-hover:hover .product-image-zoom {
  opacity: 1;
}

@media (max-width: 1200px) {
  .sidebar {
    width: 248px;
  }

  .content {
    padding: 20px;
  }

  .card-grid,
  .settings-layout,
  .tariffs-grid,
  .products-summary-grid {
    grid-template-columns: 1fr;
  }

  .label-generator-summary-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .label-generator-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .products-toolbar-form {
    flex-direction: column;
    align-items: stretch;
  }

  .label-generator-toolbar-actions {
    justify-content: space-between;
  }

  .dispenser-form-grid {
    grid-template-columns: 1fr;
  }

  .dispenser-settings-layout {
    grid-template-columns: 1fr;
  }

  .dispenser-settings-head.current,
  .dispenser-settings-head.new {
    grid-column: auto;
  }

  .dispenser-readonly-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .app-shell {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    position: static;
    height: auto;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-header h1 {
    font-size: 32px;
  }

  .page-header-right,
  .section-head-space,
  .store-row,
  .modal-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .store-row-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .auth-card,
  .modal-card,
  .settings-card {
    padding: 22px;
  }

  .sidebar-account-card {
    grid-template-columns: auto 1fr auto auto;
  }
}

/* ===== Складской учет ===== */

.modal-overlay[hidden] {
  display: none;
}

.warehouse-page-header .page-header-left {
  flex: 1;
  min-width: 0;
  align-items: flex-start;
}

.warehouse-page-header h1 {
  align-self: flex-start;
  margin-left: 0;
}

.warehouse-products-table col.col-fixed {
  width: 140px;
}

.warehouse-products-table col.col-warehouse-stock {
  width: 130px;
}

.warehouse-products-table col.col-warehouse-actions {
  width: 186px;
}

.warehouse-products-table td:last-child .label-actions {
  justify-content: flex-end;
}

.warehouse-products-table tbody tr {
  height: 97px;
}

.warehouse-tabs {
  margin-top: 10px;
}

.warehouse-summary-wrap {
  position: relative;
  display: inline-flex;
}

.warehouse-summary-wrap .status-pill {
  cursor: help;
}

.warehouse-summary-popover {
  position: absolute;
  right: 15px;
  top: calc(100% + 10px);
  z-index: 20;
  width: 250px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 27, 48, 0.16);
  color: var(--muted-dark);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: 0.15s ease;
  pointer-events: none;
}

.warehouse-summary-popover span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.warehouse-summary-popover strong {
  color: var(--text);
  white-space: nowrap;
}

.warehouse-summary-wrap:hover .warehouse-summary-popover,
.warehouse-summary-wrap:focus-within .warehouse-summary-popover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.warehouse-code-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted-dark);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}

.warehouse-code-button:hover {
  border-color: #bfd4ff;
  color: var(--primary);
  background: var(--primary-soft);
}

.warehouse-code-button strong {
  color: var(--text);
  font-family: monospace;
  font-size: 14px;
}

.warehouse-code-copy-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.warehouse-code-copy-row input {
  flex: 1;
  font-family: monospace;
}

.warehouse-code-form {
  margin-top: 18px;
}

a.products-segment {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.warehouse-modal-wide {
  max-width: 760px;
}

.warehouse-form-modal {
  height: 821px;
  max-height: calc(100vh - 40px);
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.warehouse-form-modal .modal-header {
  flex-shrink: 0;
  margin: 0;
  padding: 28px 28px 20px;
  border-bottom: 1px solid var(--border);
}

.warehouse-modal-form {
  flex: 1;
  min-height: 0;
  gap: 0;
}

.warehouse-modal-scroll {
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.warehouse-form-modal .warehouse-modal-scroll {
  flex: 1;
  padding: 22px 28px;
}

.warehouse-modal-footer {
  flex-shrink: 0;
  margin: 0;
  padding: 18px 28px 24px;
  border-top: 1px solid var(--border);
  background: #fff;
}

.warehouse-add-modal {
  height: 821px;
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.warehouse-add-modal #manualMode:not([hidden]) {
  flex: 1;
  min-height: 0;
  display: flex;
}

.warehouse-manual-form {
  width: 100%;
  height: 100%;
}

.warehouse-manual-form .warehouse-modal-scroll {
  flex: 1;
  padding-right: 6px;
}

.warehouse-manual-form .warehouse-modal-footer {
  padding: 18px 0 0;
}

.warehouse-product-info-modal {
  max-width: 720px;
  max-height: calc(100vh - 40px);
  padding: 0;
  overflow-y: auto;
}

.warehouse-product-info-header {
  margin: 0;
  padding: 26px 28px 22px;
  background: linear-gradient(135deg, #f5f9ff 0%, #fff 70%);
  border-bottom: 1px solid var(--border);
}

.warehouse-product-info-header h2 {
  margin: 4px 0 3px;
  font-size: 24px;
}

.warehouse-info-eyebrow {
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.warehouse-product-info-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px 28px;
}

.warehouse-product-info-hero {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 18px;
}

.warehouse-product-info-image {
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #f5f7fa;
  color: var(--muted-dark);
  font-size: 12px;
}

.warehouse-product-info-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.warehouse-product-info-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.warehouse-product-info-stats div {
  min-width: 0;
  padding: 16px;
  border: 1px solid #dbe8fb;
  border-radius: 16px;
  background: #f8fbff;
}

.warehouse-product-info-stats span,
.warehouse-product-comment > span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.warehouse-product-info-stats strong {
  font-size: 17px;
  line-height: 1.25;
}

.warehouse-product-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
}

.warehouse-product-info-grid div {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.warehouse-product-info-grid div:nth-child(odd) {
  border-right: 1px solid var(--border);
}

.warehouse-product-info-grid div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.warehouse-product-info-grid dt {
  margin-bottom: 4px;
  color: var(--muted-dark);
  font-size: 11px;
  font-weight: 700;
}

.warehouse-product-info-grid dd {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.warehouse-product-comment {
  padding: 15px 16px;
  border-radius: 16px;
  background: #f8fafc;
}

.warehouse-product-info-grid a {
  color: var(--primary);
  text-decoration: none;
}

.warehouse-product-info-grid a:hover {
  text-decoration: underline;
}

.product-name-cell a {
  color: inherit;
  font-weight: inherit;
  text-decoration: none;
}

.product-name-cell a:hover {
  text-decoration: underline;
}

.warehouse-product-comment p {
  margin: 0;
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.warehouse-product-info-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 18px 28px;
  border-top: 1px solid var(--border);
  background: #fbfcfe;
}

.warehouse-product-info-actions form {
  order: -1;
  margin-right: auto;
}

.warehouse-delete-hint {
  margin: 0;
  padding: 0 28px 20px;
  background: #fbfcfe;
  text-align: right;
}

.btn:disabled,
.icon-action-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.warehouse-mode-tabs {
  margin-bottom: 18px;
}

.warehouse-mode-tabs .products-period-tab {
  cursor: pointer;
}

.warehouse-picker-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.warehouse-picker-select {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  min-height: 44px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}

.warehouse-picker-search {
  flex: 1;
  min-width: 220px;
}

.warehouse-picker-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 4px;
}

.warehouse-picker-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: 0.15s ease;
}

.warehouse-picker-row:hover {
  border-color: #bfd4ff;
  background: #f8fbff;
}

.warehouse-picker-row.is-added {
  opacity: 0.55;
  cursor: default;
}

.warehouse-picker-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--primary);
  cursor: pointer;
}

.warehouse-picker-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.warehouse-picker-meta strong {
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.warehouse-picker-meta span {
  font-size: 12px;
  color: var(--muted-dark);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.warehouse-picker-added {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  background: #edf4ff;
  border-radius: 999px;
  padding: 4px 10px;
}

.warehouse-picker-empty {
  margin-top: 12px;
}

.warehouse-cost-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 430px;
  overflow-y: auto;
  padding-right: 4px;
}

.warehouse-cost-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 160px;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
}

.warehouse-cost-row label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--muted-dark);
  font-size: 11px;
  font-weight: 700;
}

.warehouse-cost-row input {
  width: 100%;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
  color: var(--text);
}

.warehouse-product-details-row {
  display: block;
  padding: 14px;
}

.warehouse-batch-product {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.warehouse-batch-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.warehouse-batch-comment {
  grid-column: 1 / -1;
}

.warehouse-batch-fields textarea {
  width: 100%;
  min-height: 64px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  resize: vertical;
}

.warehouse-refresh-row {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.form-group select,
.form-group textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  min-height: 48px;
  padding: 0 16px;
  font-size: 15px;
  color: var(--text);
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group textarea {
  padding: 12px 16px;
  min-height: 90px;
  resize: vertical;
}

.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #8cb8ff;
  box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.12);
}

.warehouse-file-input {
  font-size: 13px;
  color: var(--muted-dark);
}

.warehouse-file-input::file-selector-button {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f4f7fb;
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
  padding: 8px 14px;
  margin-right: 10px;
  cursor: pointer;
}

.warehouse-file-preview {
  margin-top: 8px;
}

.warehouse-file-preview img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.supply-form-card {
  padding: 26px 28px;
}

.supply-form-card h2 {
  margin-bottom: 8px;
}

.warehouse-supply-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 18px 0;
}

.warehouse-supply-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 110px) minmax(0, 110px) minmax(0, 165px) auto;
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fbfdff;
}

.supply-row-product {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  align-self: center;
}

.supply-row-photo {
  flex-shrink: 0;
}

.supply-row-photo .product-thumb {
  width: 56px;
  height: 56px;
}

.supply-row-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.supply-row-meta strong {
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supply-row-meta span {
  font-size: 12px;
  color: var(--muted-dark);
}

.supply-photo-field {
  display: flex;
  align-items: center;
  gap: 8px;
}

.supply-photo-field .warehouse-file-input {
  font-size: 0;
  max-width: 100%;
  min-width: 0;
}

.supply-photo-field .warehouse-file-input::file-selector-button {
  font-size: 13px;
  margin-right: 0;
}

.supply-photo-field .warehouse-file-preview {
  margin-top: 0;
  flex-shrink: 0;
}

.supply-photo-field .warehouse-file-preview img {
  width: 44px;
  height: 44px;
}

.warehouse-picker-count {
  margin-right: auto;
  align-self: center;
  color: var(--muted-dark);
  font-size: 13px;
  font-weight: 700;
}

.warehouse-store-filter {
  max-width: 220px;
}

.warehouse-stock-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted-dark);
  white-space: nowrap;
  cursor: pointer;
}

.warehouse-stock-filter input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
  cursor: pointer;
}

.warehouse-edit-current-image img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.warehouse-delete-form {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
}

.btn-danger {
  background: #fff5f5;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.btn-danger:hover {
  background: #fee2e2;
  border-color: #fca5a5;
}

.supply-card {
  margin-bottom: 18px;
}

.supply-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  padding-left: 20px; /* или любое другое значение */
  padding-top: 10px; /* или любое другое значение */
}

.supply-card-header strong {
  font-size: 17px;
}

@media (max-width: 900px) {
  .warehouse-product-info-hero,
  .warehouse-product-info-stats,
  .warehouse-product-info-grid,
  .warehouse-batch-fields {
    grid-template-columns: 1fr;
  }

  .warehouse-product-info-grid div,
  .warehouse-product-info-grid div:nth-child(odd),
  .warehouse-product-info-grid div:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .warehouse-product-info-grid div:last-child {
    border-bottom: 0;
  }

  .warehouse-product-info-actions {
    flex-direction: column;
  }

  .warehouse-product-info-actions .btn {
    width: 100%;
  }

  .warehouse-batch-comment {
    grid-column: auto;
  }

  .warehouse-cost-row {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .warehouse-cost-row label {
    grid-column: 1 / -1;
  }

  .warehouse-supply-row {
    grid-template-columns: 1fr;
  }

  .warehouse-code-button {
    width: 100%;
    justify-content: center;
  }
}

/* Fulfillment */
.admin-sync-page {
  max-width: 1420px;
}

.admin-sync-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 30px 34px;
  margin-bottom: 20px;
  overflow: hidden;
  position: relative;
  border-radius: 25px;
  color: #fff;
  background: linear-gradient(128deg, #061a3a 0%, #005bff 100%);
}

.admin-sync-hero::after {
  content: "";
  position: absolute;
  right: -88px;
  top: -182px;
  width: 330px;
  height: 330px;
  border: 58px solid rgba(255, 255, 255, .11);
  border-radius: 50%;
}

.admin-sync-eyebrow {
  display: block;
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.admin-sync-hero .admin-sync-eyebrow {
  color: #92baff;
}

.admin-sync-hero h1 {
  margin: 6px 0 8px;
  font-size: 33px;
}

.admin-sync-hero p {
  max-width: 740px;
  margin: 0;
  color: rgba(255, 255, 255, .76);
  line-height: 1.55;
}

.admin-sync-hero-actions {
  display: flex;
  z-index: 1;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-sync-hero-actions form {
  margin: 0;
}

.admin-sync-hero .btn-primary {
  background: #fff;
  color: var(--primary);
  box-shadow: none;
}

.admin-sync-hero .btn-primary:hover {
  background: #eaf2ff;
}

.admin-sync-schedule {
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 10px;
  color: #d9e8ff;
  font-size: 12px;
  font-weight: 700;
  background: rgba(0, 0, 0, .1);
}

.admin-sync-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.admin-sync-stat-card {
  position: relative;
  min-height: 142px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(17, 45, 89, .045);
}

.admin-sync-stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20px;
  right: 20px;
  height: 3px;
  border-radius: 0 0 99px 99px;
  background: #c7dbfb;
}

.admin-sync-stat-icon {
  float: right;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 13px;
  color: var(--primary);
  font-size: 18px;
  font-weight: 800;
  background: var(--primary-soft);
}

.admin-sync-stat-label,
.admin-sync-stat-card strong {
  display: block;
}

.admin-sync-stat-label {
  max-width: 185px;
  padding-top: 15px;
  color: var(--muted-dark);
  font-size: 13px;
  line-height: 1.35;
}

.admin-sync-stat-card strong {
  clear: both;
  padding-top: 12px;
  color: var(--text);
  font-size: 27px;
  line-height: 1;
}

.admin-sync-status-card.is-running::before {
  background: #32b06b;
}

.admin-sync-status-card.is-running .admin-sync-stat-icon {
  color: #167c43;
  background: #e3f7eb;
  animation: admin-sync-spin 1.6s linear infinite;
}

@keyframes admin-sync-spin {
  to { transform: rotate(360deg); }
}

.admin-sync-password-card,
.admin-sync-history-card {
  margin-bottom: 20px;
  padding: 25px;
}

.admin-sync-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.admin-sync-card-header h2 {
  margin: 5px 0 7px;
  font-size: 21px;
}

.admin-sync-card-header p {
  max-width: 790px;
  margin: 0;
  color: var(--muted-dark);
  font-size: 13px;
  line-height: 1.55;
}

.admin-sync-password-state {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid #f3d9a7;
  border-radius: 999px;
  color: #956000;
  font-size: 12px;
  font-weight: 800;
  background: #fff8e8;
}

.admin-sync-password-state i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.admin-sync-password-state.is-set {
  border-color: #b9e5ca;
  color: #147744;
  background: #e9f9ef;
}

.admin-sync-password-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 14px;
  max-width: 830px;
  margin-top: 22px;
  padding: 17px;
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  background: #f8fbff;
}

.admin-sync-password-form .form-group {
  margin: 0;
}

.admin-sync-password-form input {
  background: #fff;
}

.admin-sync-table-wrap {
  margin-top: 20px;
  overflow-x: auto;
  border: 1px solid var(--border-soft);
  border-radius: 15px;
}

.admin-sync-table {
  min-width: 960px;
}

.admin-sync-table th {
  background: #f6f9fd;
}

.admin-sync-run-status {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  color: #586e8c;
  font-size: 11px;
  font-weight: 800;
  background: #edf2f8;
}

.admin-sync-run-status.is-success {
  color: #147744;
  background: #e5f8ec;
}

.admin-sync-run-status.is-failed {
  color: #b13131;
  background: #ffebeb;
}

.admin-sync-run-status.is-running {
  color: #0057e5;
  background: #e6efff;
}

.admin-sync-summary {
  max-width: 400px;
  max-height: 118px;
  margin: 0;
  overflow: auto;
  color: var(--muted-dark);
  font: inherit;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}

@media (max-width: 840px) {
  .admin-sync-hero,
  .admin-sync-card-header {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-sync-hero-actions {
    justify-content: space-between;
  }

  .admin-sync-stats,
  .admin-sync-password-form {
    grid-template-columns: 1fr;
  }

  .admin-sync-password-form .btn {
    width: 100%;
  }
}

.fulfillment-page-header {
  min-height: 48px;
  margin: 0 0 14px;
}

.fulfillment-title-row,
.fulfillment-header-actions,
.fulfillment-settings-heading,
.fulfillment-card-header,
.fulfillment-section-heading,
.fulfillment-order-header .page-header-left,
.fulfillment-order-header .page-header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.fulfillment-title-row h1,
.fulfillment-settings-heading h2,
.fulfillment-card-header h2,
.fulfillment-section-heading h2 {
  margin: 2px 0 0;
}

.fulfillment-title-row h1 {
  font-size: 26px;
  line-height: 1.1;
}

.fulfillment-eyebrow,
.fulfillment-card-index {
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.fulfillment-header-logo,
.fulfillment-settings-logo {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: #fff;
}

.fulfillment-page-header .fulfillment-header-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
}

.fulfillment-role-tabs {
  margin-top: 8px;
}

.fulfillment-section-tabs {
  margin: 0 0 18px;
}

.fulfillment-archive-tabs {
  display: flex;
  margin: 0 0 12px;
}

.fulfillment-archive-tabs .products-period-tab {
  min-height: 36px;
  padding: 7px 13px;
  font-size: 13px;
}

.fulfillment-archive-tabs .products-period-tab span {
  margin-left: 6px;
  opacity: .7;
}

.fulfillment-tab-badge {
  min-width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  margin-left: 6px;
  border-radius: 999px;
  background: #fff;
  color: var(--primary);
  font-size: 11px;
}

.fulfillment-role-grid,
.fulfillment-onboarding-grid,
.fulfillment-dashboard-columns,
.fulfillment-settings-layout,
.fulfillment-order-bottom-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.fulfillment-role-card {
  min-height: 330px;
  padding: 34px;
  border-radius: 28px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.fulfillment-role-card::before {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  right: -60px;
  top: -90px;
  border: 42px solid rgba(255, 255, 255, 0.12);
}

.fulfillment-role-card-owner {
  color: #fff;
  background: linear-gradient(145deg, #071c42, #005bff);
}

.fulfillment-role-card-client {
  color: #10233f;
  background: linear-gradient(145deg, #fff, #dceaff);
  border: 1px solid #c8dcff;
}

.fulfillment-role-number {
  position: absolute;
  top: 30px;
  left: 34px;
  font-size: 42px;
  font-weight: 800;
  opacity: 0.18;
}

.fulfillment-role-card h2 {
  margin: 0 0 12px;
  font-size: 32px;
}

.fulfillment-role-card p {
  max-width: 520px;
  line-height: 1.65;
  opacity: 0.8;
}

.fulfillment-onboarding-card {
  padding: 30px;
}

.fulfillment-onboarding-card h2,
.fulfillment-client-empty h2 {
  font-size: 27px;
  margin: 8px 0 10px;
}

.fulfillment-onboarding-dark {
  color: #fff;
  background: linear-gradient(145deg, #0b1d3a, #123e83);
  border: 0;
}

.fulfillment-onboarding-dark .form-help,
.fulfillment-onboarding-dark p,
.fulfillment-onboarding-dark label {
  color: #c4d6f3;
}

.fulfillment-onboarding-dark input {
  color: #fff;
  border-color: rgba(255,255,255,.22);
  background: rgba(255,255,255,.08);
}

.fulfillment-setup-form {
  margin-top: 24px;
}

.fulfillment-client-empty {
  min-height: 430px;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  padding: 50px;
  border-radius: 28px;
  border: 1px solid var(--border);
  background: radial-gradient(circle at 50% 0%, #dfebff, #fff 52%);
}

.fulfillment-client-empty > p {
  max-width: 660px;
  color: var(--muted-dark);
  line-height: 1.65;
}

.fulfillment-empty-mark {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  margin-bottom: 20px;
  color: #fff;
  background: linear-gradient(145deg, #005bff, #64a2ff);
  font-size: 24px;
  font-weight: 800;
  box-shadow: 0 18px 38px rgba(0, 91, 255, .24);
}

.fulfillment-invite-inline {
  width: min(640px, 100%);
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.fulfillment-invite-inline input {
  flex: 1;
  min-width: 0;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: 13px;
  font: inherit;
}

.fulfillment-hero {
  min-height: 190px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  padding: 30px 34px;
  margin-bottom: 20px;
  border-radius: 26px;
  overflow: hidden;
  position: relative;
}

.fulfillment-hero::after {
  content: "";
  width: 300px;
  height: 300px;
  border-radius: 50%;
  position: absolute;
  right: -100px;
  top: -170px;
  border: 54px solid rgba(255,255,255,.1);
}

.fulfillment-hero-owner {
  color: #fff;
  background: linear-gradient(135deg, #071a39, #0d58df);
}

.fulfillment-hero-client {
  color: #10233f;
  background: linear-gradient(135deg, #e9f2ff, #c9ddff);
  border: 1px solid #bfd6ff;
}

.fulfillment-hero h2 {
  margin: 5px 0 8px;
  font-size: 34px;
}

.fulfillment-hero p {
  max-width: 620px;
  margin: 0;
  opacity: .76;
}

.fulfillment-hero-owner .fulfillment-eyebrow {
  color: #89b5ff;
}

.fulfillment-hero-stat {
  z-index: 1;
  text-align: right;
}

.fulfillment-hero-stat span,
.fulfillment-hero-stat strong {
  display: block;
}

.fulfillment-hero-stat strong {
  font-size: 54px;
  line-height: 1;
}

.fulfillment-status-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.fulfillment-status-card {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
}

.fulfillment-status-card span,
.fulfillment-status-card strong {
  display: block;
}

.fulfillment-status-card span {
  color: var(--muted-dark);
  font-size: 13px;
}

.fulfillment-status-card strong {
  margin-top: 8px;
  font-size: 28px;
}

.fulfillment-card-header,
.fulfillment-section-heading {
  justify-content: space-between;
  margin-bottom: 20px;
}

.fulfillment-table-heading {
  padding: 22px 22px 0;
}

.fulfillment-orders-card {
  padding-top: 0;
}

.fulfillment-order-status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  border-radius: 999px;
  background: #edf3fb;
  color: #566d8d;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.fulfillment-order-status.status-request { background: #fff4d7; color: #966100; }
.fulfillment-order-status.status-waiting,
.fulfillment-order-status.item-waiting { background: #f1cdd1; color: #702d36; }
.fulfillment-order-status.item-package_ordered {
  background: #fef1cf;
  color: #775300;
}
.fulfillment-order-status.status-working,
.fulfillment-order-status.item-working { background: #fef1cf; color: #775300; }
.fulfillment-order-status.status-ready,
.fulfillment-order-status.item-ready { background: #b4d9a6; color: #245b25; }
.fulfillment-order-status.status-completed { background: #d8f5e5; color: #006b3b; }
.fulfillment-order-status.item-failed { background: #fc6e00; color: #fff; }

.fulfillment-table-progress {
  min-width: 120px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fulfillment-table-progress > span,
.fulfillment-summary-progress i {
  height: 7px;
  flex: 1;
  overflow: hidden;
  border-radius: 99px;
  background: #e8eef7;
}

.fulfillment-table-progress i,
.fulfillment-summary-progress b {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, #005bff, #4a91ff);
}

.fulfillment-settings-layout {
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, .7fr);
  align-items: start;
}

.fulfillment-settings-main,
.fulfillment-invite-card,
.fulfillment-clients-card,
.fulfillment-dashboard-card,
.fulfillment-dashboard-notifications,
.fulfillment-notifications-card,
.fulfillment-order-control-card,
.fulfillment-extra-services,
.fulfillment-owner-comment-card,
.fulfillment-public-comment,
.fulfillment-extra-summary,
.fulfillment-event-log {
  padding: 24px;
}

.fulfillment-settings-heading {
  justify-content: space-between;
  margin-bottom: 20px;
}

.fulfillment-settings-side {
  display: grid;
  gap: 20px;
}

.fulfillment-rate-builder {
  padding: 22px;
  margin: 22px 0;
  border-radius: 18px;
  background: #f5f8fd;
  border: 1px solid var(--border-soft);
}

.fulfillment-rate-inputs,
.fulfillment-order-control-grid,
.fulfillment-item-edit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.fulfillment-rate-inputs label,
.fulfillment-order-control-grid label,
.fulfillment-item-edit-grid label,
.fulfillment-order-fields label,
.fulfillment-order-comment,
.fulfillment-owner-comment-card > label {
  display: grid;
  gap: 7px;
  color: var(--muted-dark);
  font-size: 12px;
  font-weight: 700;
}

.fulfillment-rate-inputs input,
.fulfillment-order-control-grid input,
.fulfillment-item-edit-grid input,
.fulfillment-item-edit-grid textarea,
.fulfillment-order-fields input,
.fulfillment-order-comment textarea,
.fulfillment-owner-comment-card textarea,
.fulfillment-extra-service-row input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.fulfillment-formula-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.fulfillment-formula-list > div,
.fulfillment-rate-card {
  padding: 16px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--border);
}

.fulfillment-formula-list span,
.fulfillment-formula-list strong,
.fulfillment-formula-list small,
.fulfillment-rate-card span,
.fulfillment-rate-card strong,
.fulfillment-rate-card small {
  display: block;
}

.fulfillment-formula-list strong,
.fulfillment-rate-card strong {
  margin: 7px 0;
  font-size: 21px;
}

.fulfillment-formula-list small,
.fulfillment-rate-card small {
  color: var(--muted-dark);
  line-height: 1.45;
}

.fulfillment-code-list,
.fulfillment-client-list,
.fulfillment-stock-list,
.fulfillment-progress-list,
.fulfillment-notification-list {
  display: grid;
  gap: 9px;
  margin-top: 18px;
}

.fulfillment-code-item,
.fulfillment-client-row,
.fulfillment-stock-row,
.fulfillment-notification-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 13px;
  background: #f7f9fd;
}

.fulfillment-code-item {
  display: grid;
}

.fulfillment-code-item code {
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

.fulfillment-code-item span,
.fulfillment-client-row small,
.fulfillment-stock-row small,
.fulfillment-notification-row small {
  display: block;
  color: var(--muted-dark);
  font-size: 11px;
}

.fulfillment-code-item.is-used {
  opacity: .55;
}

.fulfillment-client-row > span:nth-child(2),
.fulfillment-stock-row > span:nth-child(2),
.fulfillment-notification-row > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.fulfillment-client-row form {
  margin-left: auto;
}

.fulfillment-card-header > strong {
  font-size: 30px;
  color: var(--primary);
}

.fulfillment-stock-row img,
.fulfillment-stock-row > .product-thumb {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: 12px;
}

.fulfillment-stock-quantity {
  text-align: right;
}

.fulfillment-stock-quantity strong,
.fulfillment-stock-quantity small {
  display: block;
}

.fulfillment-progress-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  padding: 13px;
  border: 1px solid var(--border-soft);
  border-radius: 13px;
  text-decoration: none;
}

.fulfillment-progress-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted-dark);
}

.fulfillment-progress-track {
  grid-column: 1 / -1;
  height: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: #e9eef6;
}

.fulfillment-progress-track i {
  display: block;
  height: 100%;
  background: var(--primary);
}

.fulfillment-notification-row {
  align-items: flex-start;
  border: 1px solid transparent;
}

.fulfillment-notification-row.is-unread {
  background: #edf4ff;
  border-color: #cee0ff;
}

.fulfillment-notification-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  margin-top: 4px;
  background: #aebdd2;
}

.fulfillment-notification-row.is-unread .fulfillment-notification-dot {
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(0,91,255,.1);
}

.fulfillment-mini-empty,
.fulfillment-builder-empty {
  padding: 28px;
  border: 1px dashed #cbd8e9;
  border-radius: 14px;
  text-align: center;
  color: var(--muted-dark);
}

.fulfillment-rates-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.fulfillment-rate-card {
  border-top: 4px solid var(--primary);
  box-shadow: 0 10px 28px rgba(17,45,89,.05);
}

.fulfillment-order-builder {
  padding: 24px;
}

.fulfillment-order-rows {
  display: grid;
  gap: 14px;
}

.fulfillment-order-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(190px, .8fr) minmax(440px, 1.8fr) minmax(170px, .7fr) minmax(180px, .8fr) 130px 38px;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fbfdff;
}

.fulfillment-order-product {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.fulfillment-order-product-image img,
.fulfillment-order-product-image .product-thumb {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
}

.fulfillment-order-product > span:last-child {
  min-width: 0;
}

.fulfillment-order-product strong,
.fulfillment-order-product small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fulfillment-order-product small {
  margin-top: 4px;
  color: var(--muted-dark);
  font-size: 11px;
}

.fulfillment-order-product [data-product-stock] {
  color: #35649f;
}

.fulfillment-order-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.fulfillment-service-checks {
  display: grid;
  gap: 7px;
  color: var(--muted-dark);
  font-size: 12px;
}

.fulfillment-service-checks label {
  display: flex;
  align-items: center;
  gap: 7px;
}

.fulfillment-order-line-total span,
.fulfillment-order-line-total strong {
  display: block;
}

.fulfillment-order-line-total span {
  color: var(--muted-dark);
  font-size: 11px;
}

.fulfillment-order-line-total strong {
  margin-top: 5px;
}

.fulfillment-builder-footer {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
}

.fulfillment-builder-total {
  margin-left: auto;
  text-align: right;
}

.fulfillment-builder-total span,
.fulfillment-builder-total strong {
  display: block;
}

.fulfillment-builder-total span {
  color: var(--muted-dark);
  font-size: 12px;
}

.fulfillment-builder-total strong {
  margin-top: 3px;
  font-size: 22px;
}

.fulfillment-back-link {
  display: inline-flex;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  text-decoration: none;
  color: var(--muted-dark);
  font-size: 13px;
  font-weight: 700;
}

.fulfillment-order-header {
  min-height: 44px;
  margin: 0 0 14px;
}

.fulfillment-order-header h1 {
  font-size: 28px;
}

.fulfillment-order-header-actions {
  flex-wrap: nowrap;
}

.fulfillment-save-state {
  min-width: 68px;
  color: #147744;
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.fulfillment-save-state.is-error {
  color: #b52b2b;
}

.fulfillment-settings-gear {
  width: 38px;
  height: 38px;
}

.fulfillment-settings-gear svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.fulfillment-header-status,
.fulfillment-item-row-status {
  width: auto;
  min-width: 126px;
  min-height: 36px;
  padding: 7px 30px 7px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.fulfillment-item-row-status {
  width: 112px;
  min-width: 0;
  max-width: 112px;
  padding: 7px 23px 7px 9px;
  font-size: 11px;
}

.fulfillment-header-status.status-request { background-color: #fff4d7; color: #966100; border-color: #f3d995; }
.fulfillment-header-status.status-waiting,
.fulfillment-item-row-status.item-waiting { background-color: #f1cdd1; color: #702d36; border-color: #e2afb5; }
.fulfillment-item-row-status.item-package_ordered {
  background-color: #fef1cf;
  color: #775300;
  border-color: #f0d788;
}
.fulfillment-header-status.status-working,
.fulfillment-item-row-status.item-working { background-color: #fef1cf; color: #775300; border-color: #f0d788; }
.fulfillment-header-status.status-ready,
.fulfillment-item-row-status.item-ready { background-color: #b4d9a6; color: #245b25; border-color: #8fc77d; }
.fulfillment-header-status.status-completed { background-color: #d8f5e5; color: #006b3b; border-color: #afe0c5; }
.fulfillment-item-row-status.item-failed { background-color: #fc6e00; color: #fff; border-color: #d65c00; }

.fulfillment-order-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(200px, 1.2fr);
  gap: 1px;
  overflow: hidden;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--border);
}

.fulfillment-order-summary > div {
  position: relative;
  padding: 18px;
  background: #fff;
}

.fulfillment-order-summary span,
.fulfillment-order-summary strong {
  display: block;
}

.fulfillment-order-summary small {
  display: block;
  margin-top: 3px;
  color: var(--muted-dark);
  font-size: 11px;
}

.fulfillment-summary-add {
  position: absolute;
  top: 50%;
  right: 15px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #bfd4ff;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  cursor: pointer;
  font-size: 20px;
  font-weight: 700;
  transform: translateY(-8%);
}

.fulfillment-paid-summary strong {
  padding-right: 38px;
}

.fulfillment-order-summary span {
  color: var(--muted-dark);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.fulfillment-order-summary strong {
  margin-top: 7px;
  font-size: 20px;
}

.fulfillment-summary-progress i {
  display: block;
  margin-top: 8px;
}

.fulfillment-order-control-card,
.fulfillment-order-items-section,
.fulfillment-order-bottom-grid,
.fulfillment-order-public-details,
.fulfillment-event-log {
  margin-bottom: 20px;
}

.fulfillment-rate-details {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
}

.fulfillment-rate-details summary {
  cursor: pointer;
  color: var(--primary);
  font-weight: 700;
}

.fulfillment-component-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 14px;
}

.fulfillment-rate-details-title {
  color: var(--primary);
  font-weight: 700;
}

.fulfillment-order-products-card {
  padding-top: 0;
  margin-bottom: 20px;
  overflow-x: auto;
}

.fulfillment-order-products-table {
  min-width: 980px;
}

.fulfillment-order-products-table col.col-fixed {
  width: 112px;
}

.fulfillment-order-products-table col.col-status {
  width: 124px;
}

.fulfillment-order-products-table col.col-warehouse-actions {
  width: 54px;
}

.fulfillment-order-products-table tbody tr {
  height: 82px;
}

.fulfillment-order-products-table th,
.fulfillment-order-products-table td {
  padding-top: 12px;
  padding-bottom: 12px;
  vertical-align: middle;
}

.fulfillment-order-products-table th:nth-child(6),
.fulfillment-order-products-table td:nth-child(6),
.fulfillment-order-products-table th:last-child,
.fulfillment-order-products-table td:last-child {
  padding-right: 6px;
  padding-left: 6px;
}

.fulfillment-order-products-table [data-item-row-subline],
.fulfillment-order-products-table [data-item-row-subline] * {
  font-style: normal;
  font-weight: 400;
}

.fulfillment-order-products-table .product-name-cell span small {
  display: inline;
  color: inherit;
  font-size: inherit;
}

.fulfillment-order-products-table [data-item-row-package] a {
  color: inherit;
  font-weight: inherit;
  text-decoration: underline;
}

.fulfillment-no-stock {
  color: #b52b2b;
  font-size: 12px;
  font-weight: 700;
}

.fulfillment-manage-item {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 22px;
  padding: 20px;
  margin-bottom: 12px;
}

.fulfillment-manage-item-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fulfillment-manage-product-image {
  height: 130px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 15px;
  background: #f1f5fa;
  color: var(--muted-dark);
}

.fulfillment-manage-product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.fulfillment-warehouse-match {
  padding: 7px 9px;
  border-radius: 9px;
  background: #fff0f0;
  color: #b13232;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.fulfillment-warehouse-match.is-found {
  background: #e4f8ec;
  color: #147744;
}

.fulfillment-item-cost span,
.fulfillment-item-cost strong {
  display: block;
  text-align: center;
}

.fulfillment-item-cost span {
  color: var(--muted-dark);
  font-size: 11px;
}

.fulfillment-manage-item-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.fulfillment-manage-item-title h3 {
  margin: 0;
}

.fulfillment-item-status-select {
  width: auto;
}

.fulfillment-item-comment-field {
  grid-column: span 3;
}

.fulfillment-extra-service-row {
  display: grid;
  grid-template-columns: 1fr 160px 38px;
  gap: 9px;
  margin-bottom: 9px;
}

.fulfillment-image-upload {
  display: block;
  margin-top: 14px;
  padding: 13px;
  border: 1px dashed #b9cae0;
  border-radius: 12px;
  color: var(--muted-dark);
  cursor: pointer;
}

.fulfillment-image-upload input {
  display: block;
  margin-top: 8px;
}

.fulfillment-save-bar {
  position: sticky;
  bottom: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 16px 14px 20px;
  margin-bottom: 22px;
  border: 1px solid #bad1f7;
  border-radius: 16px;
  background: rgba(241,247,255,.95);
  box-shadow: 0 14px 34px rgba(12,46,99,.14);
  backdrop-filter: blur(12px);
  color: var(--muted-dark);
  font-size: 13px;
}

.fulfillment-public-comment p {
  color: var(--muted-dark);
  line-height: 1.65;
}

.fulfillment-order-images {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.fulfillment-order-image {
  position: relative;
}

.fulfillment-order-image img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 12px;
}

.fulfillment-order-image form {
  position: absolute;
  right: 5px;
  top: 5px;
}

.fulfillment-service-summary-row,
.fulfillment-extra-summary > .fulfillment-extra-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border-soft);
}

.fulfillment-extra-summary .fulfillment-extra-total {
  margin-top: 8px;
  border-bottom: 0;
  font-size: 18px;
}

.fulfillment-service-summary-row > span:first-child {
  min-width: 0;
  flex: 1;
}

.fulfillment-service-actions {
  display: flex;
  gap: 5px;
}

.fulfillment-service-actions .icon-action-button {
  width: 32px;
  height: 32px;
  min-height: 32px;
}

.fulfillment-public-comment .fulfillment-card-header,
.fulfillment-extra-summary .fulfillment-card-header {
  margin-bottom: 12px;
}

.fulfillment-public-comment p {
  min-height: 48px;
  margin: 0;
  white-space: pre-wrap;
}

.fulfillment-public-comment p.is-empty {
  font-style: italic;
}

.fulfillment-image-preview {
  width: 100%;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.fulfillment-image-delete {
  position: absolute;
  right: 5px;
  top: 5px;
}

.fulfillment-event-log .fulfillment-notification-list {
  max-height: 390px;
  overflow-y: auto;
  padding-right: 6px;
  overscroll-behavior: contain;
}

.fulfillment-modal-form {
  display: grid;
  gap: 16px;
}

.fulfillment-item-modal,
.fulfillment-settings-modal,
.fulfillment-comment-modal {
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}

.fulfillment-item-modal {
  width: min(960px, calc(100vw - 32px));
  max-width: 960px;
  border: 1px solid #d8e4f4;
  box-shadow: 0 28px 80px rgba(7, 34, 79, .24);
}

.fulfillment-item-modal .warehouse-product-info-header {
  position: sticky;
  z-index: 3;
  top: 0;
  align-items: center;
  gap: 18px;
  padding: 16px 20px 14px;
  background:
    radial-gradient(circle at 80% -60%, rgba(0, 91, 255, .2), transparent 42%),
    linear-gradient(135deg, #f4f8ff, #fff 72%);
}

.fulfillment-item-modal .warehouse-product-info-header h2 {
  max-width: 430px;
  margin: 3px 0 0;
  overflow: hidden;
  font-size: 24px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fulfillment-item-modal .warehouse-info-eyebrow {
  font-size: 11px;
}

.fulfillment-item-modal-heading {
  min-width: 0;
  flex: 1;
}

.fulfillment-item-modal-header-costs {
  display: flex;
  flex: 0 0 auto;
  gap: 22px;
}

.fulfillment-item-modal-header-costs span {
  color: var(--muted-dark);
  font-size: 12px;
  line-height: 1.25;
}

.fulfillment-item-modal-header-costs strong {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-size: 16px;
}

.fulfillment-item-modal .modal-close {
  width: 36px;
  height: 36px;
}

.fulfillment-item-modal .fulfillment-modal-form {
  gap: 12px;
  padding: 16px 20px 20px;
  background: #f7f9fc;
}

.fulfillment-item-modal-section {
  min-width: 0;
  padding: 14px 16px 16px;
  border: 1px solid #dce4ef;
  border-radius: 12px;
  background: #fff;
}

.fulfillment-item-modal-package-section {
  border-color: #cbdcf5;
  background: linear-gradient(145deg, #fff, #f6f9ff);
}

.fulfillment-item-modal-section legend {
  float: left;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  margin: 0 0 12px;
  color: #18365e;
  font-size: 14px;
  font-weight: 800;
}

.fulfillment-item-modal-section legend > span {
  width: 24px;
  height: 24px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 7px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 10px;
}

.fulfillment-item-modal-grid {
  clear: both;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
}

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

.fulfillment-item-modal-package-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.fulfillment-item-modal-package-grid > label {
  grid-column: span 2;
}

.fulfillment-item-modal-package-grid > .fulfillment-item-modal-package-link {
  grid-column: span 3;
}

.fulfillment-item-modal-grid label,
.fulfillment-item-modal-comment {
  min-width: 0;
  display: grid;
  gap: 7px;
  color: #617087;
  font-size: 12px;
  font-weight: 700;
}

.fulfillment-item-modal-grid input,
.fulfillment-item-modal-grid select,
.fulfillment-item-modal-comment textarea {
  width: 100%;
  min-height: 42px;
  padding: 11px 12px;
  border: 1px solid #d3deec;
  border-radius: 11px;
  outline: none;
  background: #fbfcfe;
  color: var(--text);
  font: inherit;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.fulfillment-item-modal-grid input:focus,
.fulfillment-item-modal-grid select:focus,
.fulfillment-item-modal-comment textarea:focus {
  border-color: #76a8f7;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 91, 255, .09);
}

.fulfillment-item-modal-comment textarea {
  min-height: 104px;
  resize: vertical;
}

.fulfillment-item-modal-comment {
  clear: both;
  width: 100%;
}

.fulfillment-modal-field-wide {
  grid-column: span 2;
}

.fulfillment-small-modal {
  width: min(500px, calc(100vw - 32px));
}

.fulfillment-settings-modal input[readonly],
.fulfillment-item-modal input[readonly],
.fulfillment-item-modal textarea[readonly] {
  background: #f4f6f9;
  color: #66758b;
}

.fulfillment-archive-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
  margin-top: 18px;
  border: 1px solid #f0caca;
  border-radius: 14px;
  background: #fff8f8;
}

.fulfillment-archive-action strong,
.fulfillment-archive-action span {
  display: block;
}

.fulfillment-archive-action span {
  margin-top: 4px;
  color: var(--muted-dark);
  font-size: 12px;
}

.fulfillment-comment-modal label:first-child {
  display: grid;
  gap: 7px;
  color: var(--muted-dark);
  font-size: 12px;
  font-weight: 700;
}

.fulfillment-comment-modal textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  resize: vertical;
  font: inherit;
}

.fulfillment-pasted-images {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.fulfillment-pasted-images span {
  max-width: 220px;
  overflow: hidden;
  padding: 6px 9px;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fulfillment-image-viewer {
  padding: 20px;
}

.fulfillment-image-viewer-card {
  position: relative;
  width: fit-content;
  max-width: min(1200px, 92vw);
  max-height: 90vh;
  padding: 12px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(7, 28, 66, .28);
}

.fulfillment-image-viewer-card > .modal-close {
  position: absolute;
  z-index: 2;
  top: 8px;
  right: 8px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 4px 15px rgba(0, 0, 0, .12);
}

.fulfillment-image-viewer-card img {
  display: block;
  width: auto;
  height: auto;
  max-width: calc(92vw - 24px);
  max-height: calc(90vh - 24px);
  border-radius: 10px;
  object-fit: contain;
}

@media (max-width: 1450px) {
  .fulfillment-order-row {
    grid-template-columns: minmax(180px, .8fr) minmax(380px, 1.6fr) minmax(160px, .7fr) 110px 38px;
  }
  .fulfillment-order-comment {
    grid-column: 2 / 4;
  }
  .fulfillment-order-line-total {
    grid-column: 4;
  }
  .fulfillment-order-row > [data-remove-order-row] {
    grid-column: 5;
  }
}

@media (max-width: 1100px) {
  .fulfillment-status-grid,
  .fulfillment-order-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .fulfillment-settings-layout,
  .fulfillment-dashboard-columns,
  .fulfillment-order-bottom-grid {
    grid-template-columns: 1fr;
  }
  .fulfillment-order-row {
    grid-template-columns: 1fr 1fr;
  }
  .fulfillment-order-fields,
  .fulfillment-order-comment,
  .fulfillment-order-line-total,
  .fulfillment-order-row > [data-remove-order-row] {
    grid-column: auto;
  }
  .fulfillment-order-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-column: 1 / -1;
  }
  .fulfillment-component-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .fulfillment-role-grid,
  .fulfillment-onboarding-grid,
  .fulfillment-rates-panel,
  .fulfillment-rate-inputs,
  .fulfillment-formula-list,
  .fulfillment-order-control-grid,
  .fulfillment-component-grid,
  .fulfillment-manage-item,
  .fulfillment-order-row,
  .fulfillment-item-edit-grid {
    grid-template-columns: 1fr;
  }
  .fulfillment-role-card {
    min-height: 260px;
  }
  .fulfillment-header-actions,
  .fulfillment-order-header-actions,
  .fulfillment-hero,
  .fulfillment-builder-footer,
  .fulfillment-manage-item-title,
  .fulfillment-save-bar,
  .fulfillment-invite-inline {
    align-items: stretch;
    flex-direction: column;
  }
  .fulfillment-section-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  .fulfillment-section-tabs .products-period-tab {
    white-space: nowrap;
  }
  .fulfillment-builder-total {
    margin-left: 0;
    text-align: left;
  }
  .fulfillment-order-fields {
    grid-template-columns: 1fr;
  }
  .fulfillment-item-comment-field {
    grid-column: auto;
  }
  .fulfillment-order-images {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .fulfillment-extra-service-row {
    grid-template-columns: 1fr 110px 38px;
  }
  .fulfillment-order-header {
    align-items: flex-start;
    flex-direction: column;
  }
  .fulfillment-order-header-actions {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .fulfillment-save-state {
    order: 4;
    width: 100%;
    min-height: 15px;
    text-align: left;
  }
  .fulfillment-archive-action {
    align-items: stretch;
    flex-direction: column;
  }
  .fulfillment-item-modal .fulfillment-modal-form {
    padding: 12px;
  }
  .fulfillment-item-modal .warehouse-product-info-header {
    flex-wrap: wrap;
    gap: 8px 12px;
  }
  .fulfillment-item-modal-grid,
  .fulfillment-item-modal-main-grid,
  .fulfillment-item-modal-package-grid {
    grid-template-columns: 1fr;
  }
  .fulfillment-item-modal-package-grid > label,
  .fulfillment-item-modal-package-grid > .fulfillment-item-modal-package-link {
    grid-column: auto;
  }
  .fulfillment-item-modal-header-costs {
    order: 3;
    width: 100%;
    justify-content: space-between;
  }
  .fulfillment-modal-field-wide {
    grid-column: auto;
  }
}

/* FBS: reuse the warehouse palette, tables, tabs and buttons. */
.content:has(> .fbs-page) {
  min-width: 0;
}

body:has(.fbs-page dialog[open]) {
  overflow: hidden;
}

.fbs-page [hidden] {
  display: none !important;
}

.fbs-page {
  min-width: 0;
}

.fbs-page .fbs-tabs {
  gap: 10px;
}

.fbs-page .fbs-update-state {
  align-items: flex-end;
  flex-direction: column;
  margin-left: auto;
  min-height: 46px;
  gap: 6px;
  text-align: right;
}

.fbs-page .fbs-refresh-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
}

.fbs-page .fbs-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #bfd4ff;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: fbs-spin 1s linear infinite;
}

.fbs-page .fbs-toolbar,
.fbs-page .fbs-toolbar-actions {
  flex-wrap: wrap;
}

.fbs-page .fbs-search {
  min-width: min(100%, 260px);
  max-width: 560px;
}

.fbs-page .fbs-search input {
  padding-left: 16px;
}

.fbs-page .fbs-auto-toggle input:checked + .products-toggle-slider {
  background: var(--primary);
}

.fbs-page .fbs-auto-toggle input:focus-visible + .products-toggle-slider,
.fbs-page :is(button, a, select, summary, [tabindex]):focus-visible {
  outline: 3px solid #8cb8ff;
  outline-offset: 3px;
}

.fbs-page .fbs-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 18px;
  margin: 0 0 16px;
  border: 1px solid #efd6a7;
  border-radius: 14px;
  background: #fff9ef;
  color: #7b5315;
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.fbs-page .fbs-error {
  background: #fff4f4;
  border-color: #ffd8d8;
  color: #a42727;
  white-space: pre-wrap;
}

.fbs-page .fbs-error-text {
  color: #a42727;
}

.fbs-page .fbs-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.fbs-page .fbs-summary .status-pill { margin-right: 0; }

.fbs-page .fbs-assembly-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.fbs-page .fbs-assembly-progress {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
}

.fbs-page .fbs-requirement-reason {
  display: block;
  margin-top: 5px;
  color: #b91c1c;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.fbs-page .fbs-assembly-items {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.fbs-page .fbs-assembly-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 14px;
  padding: 13px 14px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: #f9fbff;
}

.fbs-page .fbs-assembly-item > strong {
  overflow-wrap: anywhere;
}

.fbs-page .fbs-assembly-item .fbs-meta,
.fbs-page .fbs-assembly-item .fbs-error-text {
  grid-column: 1 / -1;
  margin-top: 0;
}

.fbs-page .fbs-loading,
.fbs-page .fbs-empty {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 32px 20px;
  text-align: center;
}

.fbs-page .fbs-empty p {
  margin: 0;
}

.fbs-page .fbs-ozon-mark {
  position: relative;
  display: inline-block;
  padding: 10px 22px 16px;
  color: var(--primary);
  font-size: 38px;
  font-weight: 800;
  font-style: italic;
  letter-spacing: -0.04em;
  animation: fbs-pulse 1.8s ease-in-out infinite;
}

.fbs-page .fbs-ozon-mark::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 3px;
  border-radius: 4px;
  background: var(--primary);
  transform-origin: left;
  animation: fbs-progress 1.8s ease-in-out infinite;
}

.fbs-page .fbs-table-card {
  overflow: hidden;
}

.fbs-page .fbs-table-scroll {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}

.fbs-page .fbs-table {
  min-width: 980px;
  border-radius: 0;
}

.fbs-page .fbs-table th,
.fbs-page .fbs-table td {
  padding: 16px 10px;
  overflow-wrap: anywhere;
}

.fbs-page .fbs-table th:nth-child(1) { width: 80px; }
.fbs-page .fbs-table th:nth-child(2) { width: auto; }
.fbs-page .fbs-table th:nth-child(3) { width: 132px; }
.fbs-page .fbs-table th:nth-child(4) { width: 128px; }
.fbs-page .fbs-table th:nth-child(5) { width: 150px; }
.fbs-page .fbs-table th:nth-child(6) { width: 134px; }
.fbs-page .fbs-table th:nth-child(7) { width: 168px; }

.fbs-page .fbs-table:not(.fbs-history-table) th:nth-child(4) {
  white-space: nowrap;
}

.fbs-page .fbs-table tbody td:nth-child(3) {
  min-width: 0;
}

.fbs-page .fbs-table tbody tr {
  height: auto;
}

.fbs-page .fbs-table tbody td:nth-child(4) {
  font-weight: 400;
}

.fbs-page .fbs-table tbody tr:last-child td {
  border-radius: 0;
}

.fbs-page .fbs-table .fbs-group-row,
.fbs-page .fbs-table .fbs-group-row:hover {
  background: #f1f6ff;
}

.fbs-page .fbs-group-row td {
  vertical-align: middle;
  border-bottom-color: var(--border);
}

.fbs-page .fbs-group-toggle {
  position: relative;
  border: 0;
  padding: 0 0 0 24px;
  background: transparent;
  color: var(--text);
  text-align: left;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
  cursor: pointer;
}

.fbs-page .fbs-group-toggle::before {
  content: '+';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-size: 20px;
  line-height: 1;
}

.fbs-page .fbs-group-toggle[aria-expanded='true']::before {
  content: '-';
}

.fbs-page .fbs-meta {
  display: block;
  margin-top: 6px;
  color: var(--muted-dark);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.fbs-page .fbs-posting-number {
  font-size: 14px;
}

.fbs-page .fbs-badge {
  display: inline-block;
  padding: 5px 9px;
  margin-bottom: 6px;
  border-radius: 9px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.fbs-page .fbs-badge-warning {
  background: #fff1d8;
  color: #82510a;
}

.fbs-page .fbs-product-lines {
  list-style: none;
  padding: 0;
  margin: 0;
}

.fbs-page .fbs-product-line {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-soft);
}

.fbs-page .fbs-product-line:first-child { padding-top: 0; }
.fbs-page .fbs-product-line:last-child { padding-bottom: 0; border-bottom: 0; }
.fbs-page .fbs-line-main { min-width: 0; }
.fbs-page .fbs-line-main > strong { font-size: 14px; line-height: 1.5; }
.fbs-page .fbs-line-main .fbs-badge { margin-top: 6px; }
.fbs-page .fbs-product-line .product-thumb { width: 42px; min-width: 42px; height: 48px; object-fit: contain; }
.fbs-page .fbs-table .fbs-product-line .product-thumb { display: none; }
.fbs-page .fbs-table .label-actions { justify-content: flex-start; }

.fbs-page .fbs-table .btn {
  max-width: 100%;
  white-space: normal;
}

.fbs-page .fbs-label-button.is-downloaded {
  background: #edf0f4;
  border-color: #d5dce6;
  color: #5c6677;
  box-shadow: none;
}

.fbs-page .fbs-label-button.is-downloaded:not(:disabled):hover {
  background: #e0e5ed;
  border-color: #abb8ca;
}

.fbs-page .fbs-label-button.is-downloaded:disabled {
  opacity: 1;
}

.fbs-page .fbs-label-hint { font-size: 11px; }
.fbs-page .fbs-history-table th:nth-child(1) { width: 84px; }
.fbs-page .fbs-history-table th:nth-child(2) { width: 174px; }
.fbs-page .fbs-history-table th:nth-child(3) { width: auto; }
.fbs-page .fbs-history-table th:nth-child(4) { width: 210px; }
.fbs-page .fbs-history-table th:nth-child(5) { width: 130px; }
.fbs-page .fbs-history-table th:nth-child(6) { width: 160px; }

.fbs-page .fbs-pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 20px;
}

.fbs-page .fbs-dialog {
  width: calc(100% - 40px);
  max-width: 850px;
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  margin: auto;
  padding: 0;
  color: var(--text);
  overflow: hidden;
}

.fbs-page .fbs-dialog[open] {
  display: flex;
  flex-direction: column;
}

.fbs-page .fbs-dialog::backdrop {
  background: rgba(15, 27, 48, 0.5);
}

.fbs-page .fbs-dialog .modal-header {
  flex-shrink: 0;
  align-items: center;
  padding: 22px 26px;
  margin: 0;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, #f5f9ff 0%, #fff 70%);
}

.fbs-page .fbs-dialog h2 { font-size: 22px; overflow-wrap: anywhere; }
.fbs-page .fbs-dialog h3 { margin: 0 0 10px; font-size: 16px; }

.fbs-page .fbs-dialog-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  padding: 22px 26px;
}

.fbs-page .fbs-details {
  margin-top: 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.fbs-page .fbs-details summary {
  padding: 14px;
  cursor: pointer;
  background: #f7faff;
  font-size: 13px;
  font-weight: 700;
}

.fbs-page .fbs-json {
  max-height: 440px;
  overflow: auto;
  margin: 0;
  padding: 16px;
  background: #fbfdff;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 12px/1.6 Consolas, monospace;
  tab-size: 2;
}

.fbs-page .fbs-api-sections {
  display: grid;
  gap: 14px;
  padding: 14px;
  background: #fbfdff;
}

.fbs-page .fbs-api-section {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: #fff;
}

.fbs-page .fbs-api-section h4 {
  margin: 0 0 14px;
  color: var(--primary-dark);
  font-size: 15px;
}

.fbs-page .fbs-api-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.fbs-page .fbs-api-field {
  min-width: 0;
  padding: 10px 12px;
  border-radius: 9px;
  background: #f7faff;
}

.fbs-page .fbs-api-field dt {
  color: var(--muted-dark);
  font-size: 12px;
  line-height: 1.4;
}

.fbs-page .fbs-api-field dt small {
  display: block;
  margin-top: 2px;
  color: #8a94a5;
  font: 10px/1.4 Consolas, monospace;
}

.fbs-page .fbs-api-field dd {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.fbs-page .fbs-api-field .fbs-api-fields {
  grid-template-columns: 1fr;
  margin-top: 8px;
}

.fbs-page .fbs-api-list {
  display: grid;
  gap: 8px;
}

.fbs-page .fbs-api-list-item {
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: #fff;
}

.fbs-page .fbs-api-list-item:has(> .fbs-api-index) {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.fbs-page .fbs-api-item-title {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
}

.fbs-page .fbs-api-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  min-width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 10px;
  font-weight: 700;
}

.fbs-page .fbs-api-empty {
  color: var(--muted-dark);
  font-size: 12px;
  font-style: italic;
}

.fbs-page .fbs-job-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 10px 0 22px;
  text-align: center;
}

.fbs-page .fbs-job-progress p { margin: 0; }
.fbs-page .fbs-job-progress > strong { font-size: 18px; }

.fbs-page .fbs-job-products {
  margin: 18px 0;
  padding: 18px;
  border: 1px solid #ffd9c2;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff9f3 0%, #fff 75%);
}

.fbs-page .fbs-job-products h3 {
  margin-bottom: 14px;
  font-size: 20px;
  line-height: 1.35;
}

.fbs-page .fbs-job-product-line {
  align-items: center;
  gap: 14px;
}

.fbs-page .fbs-job-product-description {
  flex: 1 1 auto;
  min-width: 0;
}

.fbs-page .fbs-job-product-description > strong {
  display: block;
  white-space: normal;
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  font-size: 15px;
  line-height: 1.4;
}

.fbs-page .fbs-job-product-description .fbs-meta {
  margin-top: 4px;
}

.fbs-page .fbs-job-product-quantity {
  display: flex;
  flex: 0 0 auto;
  align-items: baseline;
  justify-content: flex-end;
  gap: 5px;
  min-width: 66px;
  margin-left: auto;
  color: var(--text);
  white-space: nowrap;
  text-align: right;
}

.fbs-page .fbs-job-product-quantity strong {
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
}

.fbs-page .fbs-job-product-quantity span {
  color: var(--muted-dark);
  font-size: 13px;
  font-weight: 600;
}

.fbs-page .fbs-job-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 12px 0;
}

.fbs-page .fbs-job-meta div {
  padding: 12px 14px;
  border-radius: 12px;
  background: #f7faff;
}

.fbs-page .fbs-job-meta dt { color: var(--muted-dark); font-size: 12px; }
.fbs-page .fbs-job-meta dd { margin: 6px 0 0; font-size: 14px; overflow-wrap: anywhere; }

.fbs-page .fbs-job-actions {
  flex-shrink: 0;
  flex-wrap: wrap;
  padding: 16px 26px;
  margin: 0;
  border-top: 1px solid var(--border);
}

.fbs-page .fbs-job-actions .btn { white-space: normal; text-align: center; }

.fbs-page .fbs-carriage-tools {
  display: grid;
  gap: 14px;
  margin: 0 0 18px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.fbs-page .fbs-carriage-point,
.fbs-page .fbs-carriage-filters {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}

.fbs-page .fbs-carriage-point > div {
  display: grid;
  gap: 3px;
  min-width: 240px;
}

.fbs-page .fbs-carriage-filters label {
  display: grid;
  gap: 6px;
  color: var(--muted-dark);
  font-size: 12px;
  font-weight: 700;
}

.fbs-page .fbs-carriage-filters select {
  min-width: 150px;
  min-height: 42px;
  padding: 8px 34px 8px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
}

.fbs-page .fbs-carriage-count { margin: 0 0 11px auto; color: var(--muted-dark); font-size: 13px; white-space: nowrap; }
.fbs-page .fbs-carriage-filters .btn { margin-left: 0; }
.fbs-page .fbs-carriage-table { min-width: 1120px; }
.fbs-page .fbs-carriage-table th:nth-child(1) { width: 180px; }
.fbs-page .fbs-carriage-table th:nth-child(2) { width: 150px; }
.fbs-page .fbs-carriage-table th:nth-child(3) { width: 145px; }
.fbs-page .fbs-carriage-table th:nth-child(4) { width: auto; }
.fbs-page .fbs-carriage-table th:nth-child(5) { width: 115px; }
.fbs-page .fbs-carriage-table th:nth-child(6) { width: 100px; }
.fbs-page .fbs-carriage-table th:nth-child(7) { width: 150px; }
.fbs-page .fbs-carriage-table th:nth-child(8) { width: 230px; }
.fbs-page .fbs-carriage-actions { align-items: flex-start; flex-direction: column; }
.fbs-page .fbs-carriage-actions .btn { width: 100%; }

.fbs-page .fbs-carriage-link {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.fbs-page .fbs-carriage-link:hover { color: var(--primary); text-decoration: underline; }
.fbs-page .fbs-sort-pill {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 9px;
  background: #f1f4f8;
  font-size: 12px;
  font-weight: 700;
}
.fbs-page .fbs-carriage-status-created { background: #fff3da; color: #aa6200; }
.fbs-page .fbs-carriage-status-ready { background: #e7f0ff; color: #0754be; }
.fbs-page .fbs-carriage-status-accepted { background: #eeeaff; color: #6140d8; }
.fbs-page .fbs-carriage-status-finished { background: #e7f8ed; color: #13743a; }
.fbs-page .fbs-carriage-status-cancelled,
.fbs-page .fbs-carriage-status-error { background: #ffe8e8; color: #a42727; }
.fbs-page .fbs-carriage-status-deleting { background: #edf0f4; color: #596578; }

.fbs-page .fbs-warehouse-dialog { max-width: 1400px; }
.fbs-page .fbs-warehouse-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.8fr);
  gap: 22px;
  min-height: 550px;
}

.fbs-page .fbs-map-panel {
  position: relative;
  min-height: 550px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #edf3f8;
}

.fbs-page #fbsWarehouseMap { position: absolute; inset: 0; z-index: 1; }
.fbs-page .fbs-map-selection {
  position: absolute;
  z-index: 500;
  left: 18px;
  top: 18px;
  display: grid;
  gap: 6px;
  max-width: min(380px, calc(100% - 36px));
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 35px rgba(21, 43, 78, 0.18);
}
.fbs-page .fbs-map-selection span { color: var(--muted-dark); font-size: 13px; line-height: 1.5; }
.fbs-page .fbs-warehouse-picker { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 12px; min-height: 0; }
.fbs-page .fbs-warehouse-search input { width: 100%; }
.fbs-page .fbs-warehouse-list { display: grid; align-content: start; gap: 10px; max-height: 500px; overflow-y: auto; padding: 3px; }
.fbs-page .fbs-warehouse-option {
  display: grid;
  gap: 7px;
  width: 100%;
  padding: 14px 15px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.fbs-page .fbs-warehouse-option span { color: var(--muted-dark); font-size: 12px; line-height: 1.45; }
.fbs-page .fbs-warehouse-option:hover { border-color: #8bb7ff; background: #f7faff; }
.fbs-page .fbs-warehouse-option.active { border: 2px solid var(--primary); padding: 13px 14px; background: #f5f9ff; }

.fbs-page .fbs-create-carriage-dialog { max-width: 720px; }
.fbs-page .fbs-create-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.fbs-page .fbs-segmented { display: inline-flex; padding: 3px; border-radius: 11px; background: #eef2f7; }
.fbs-page .fbs-segmented button,
.fbs-page .fbs-edit-tabs button {
  border: 0;
  border-radius: 8px;
  padding: 9px 14px;
  background: transparent;
  color: var(--muted-dark);
  font-weight: 700;
  cursor: pointer;
}
.fbs-page .fbs-segmented button.active,
.fbs-page .fbs-edit-tabs button.active { background: #fff; color: var(--primary); box-shadow: 0 2px 10px rgba(25, 65, 120, 0.12); }
.fbs-page .fbs-create-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 18px; background: #f3f6fa; }
.fbs-page .fbs-create-option { display: grid; gap: 14px; padding: 20px; border-radius: 15px; background: #fff; }
.fbs-page .fbs-create-option small { padding: 4px 7px; border-radius: 7px; background: #eef1f5; font-size: 11px; }
.fbs-page .fbs-number-field { display: grid; grid-template-columns: 1fr 90px; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 12px; color: var(--muted-dark); font-size: 12px; }
.fbs-page .fbs-number-field input { width: 100%; border: 0; background: transparent; color: var(--text); font-size: 18px; text-align: right; }

.fbs-page .fbs-carriage-edit-dialog { max-width: 1100px; }
.fbs-page .fbs-discard-overlay { position: absolute; z-index: 1200; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(15, 27, 48, 0.58); }
.fbs-page .fbs-discard-card { width: min(100%, 510px); padding: 24px; border-radius: 18px; background: #fff; box-shadow: 0 22px 60px rgba(15, 27, 48, 0.28); }
.fbs-page .fbs-discard-card h3 { margin-bottom: 10px; font-size: 20px; }
.fbs-page .fbs-discard-card p { margin: 0; color: var(--muted-dark); line-height: 1.6; }
.fbs-page .fbs-discard-card .modal-actions { justify-content: flex-end; flex-wrap: wrap; margin: 22px 0 0; padding: 0; }
.fbs-page .fbs-dialog-title-line { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.fbs-page .fbs-dialog-title-line .fbs-badge { margin: 0; }
.fbs-page .fbs-edit-tabs { display: inline-flex; gap: 5px; margin-bottom: 16px; padding: 4px; border: 1px solid var(--border); border-radius: 13px; background: #f6f8fb; }
.fbs-page .fbs-scanner-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  padding: 20px 24px;
  border-radius: 18px;
  background: linear-gradient(135deg, #eaf7ff, #f3fbff);
}
.fbs-page .fbs-scanner-banner p { margin: 8px 0 0; color: var(--muted-dark); }
.fbs-page .fbs-modal-header-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 14px; }
.fbs-page .fbs-sound-toggle { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-size: 13px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.fbs-page .fbs-sound-toggle input { width: 17px; height: 17px; accent-color: var(--primary); }
.fbs-page .fbs-scanner-image { width: 150px; height: 115px; margin: -18px 0 -18px auto; object-fit: contain; }
.fbs-page .fbs-composition-section { margin-top: 16px; padding: 16px; border: 1px solid var(--border-soft); border-radius: 16px; background: #fff; }
.fbs-page .fbs-problem-section { border-color: #ffcaca; background: #fff4f4; }
.fbs-page .fbs-composition-section h3 { display: flex; justify-content: space-between; }
.fbs-page .fbs-composition-section h3 span { color: var(--muted-dark); }
.fbs-page .fbs-mini-table-wrap { overflow-x: auto; }
.fbs-page .fbs-mini-table { width: 100%; min-width: 720px; border-collapse: collapse; }
.fbs-page .fbs-mini-table th,
.fbs-page .fbs-mini-table td { padding: 12px 10px; border-bottom: 1px solid var(--border-soft); text-align: left; vertical-align: top; font-size: 13px; }
.fbs-page .fbs-mini-table th { background: #f6f9fd; color: var(--muted-dark); font-size: 12px; }
.fbs-page .fbs-composition-products { display: grid; gap: 8px; min-width: 230px; }
.fbs-page .fbs-composition-product { display: flex; align-items: center; gap: 9px; }
.fbs-page .fbs-composition-thumb { width: 34px; min-width: 34px; height: 38px; border: 1px solid var(--border-soft); border-radius: 7px; background: #fff; object-fit: contain; }
.fbs-page .fbs-composition-thumb-empty { display: inline-flex; align-items: center; justify-content: center; color: var(--muted-dark); }
.fbs-page .fbs-composition-product-info { display: grid; gap: 3px; min-width: 0; }
.fbs-page .fbs-composition-product-info strong { font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; }
.fbs-page .fbs-composition-product-info small { color: var(--muted-dark); font-size: 11px; line-height: 1.3; }
.fbs-page .fbs-composition-remove { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 1px solid #ffcaca; border-radius: 50%; background: #fff4f4; color: #a42727; font-size: 22px; line-height: 1; cursor: pointer; }
.fbs-page .fbs-composition-remove:hover:not(:disabled) { background: #ffe3e3; border-color: #f19b9b; }
.fbs-page .fbs-composition-remove:disabled { cursor: wait; opacity: 0.7; }
.fbs-page .fbs-composition-remove .fbs-spinner { width: 14px; height: 14px; }
.fbs-page .fbs-composition-empty { padding: 30px 16px; color: var(--muted-dark); text-align: center; }
.fbs-page .fbs-manual-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.fbs-page .leaflet-control-attribution { font-size: 9px; }
.fbs-page.fbs-paused .fbs-ozon-mark,
.fbs-page.fbs-paused .fbs-ozon-mark::after,
.fbs-page.fbs-paused .fbs-spinner { animation-play-state: paused; }

@keyframes fbs-spin { to { transform: rotate(360deg); } }
@keyframes fbs-pulse { 50% { opacity: 0.6; } }
@keyframes fbs-progress { 0%, 100% { transform: scaleX(0.25); } 50% { transform: scaleX(1); } }

@media (max-width: 1200px) {
  .fbs-page .fbs-search { max-width: none; width: 100%; }
  .fbs-page .fbs-toolbar-actions { justify-content: flex-start; }
}

@media (max-width: 860px) {
  .fbs-page .fbs-tabs { width: 100%; }
  .fbs-page .fbs-update-state { align-items: flex-start; text-align: left; margin-left: 0; }
  .fbs-page .fbs-toolbar-actions { gap: 12px; }
  .fbs-page .fbs-dialog { width: calc(100% - 20px); max-height: calc(100dvh - 20px); }
  .fbs-page .fbs-dialog .modal-header,
  .fbs-page .fbs-dialog-body,
  .fbs-page .fbs-job-actions { padding: 16px; }
  .fbs-page .fbs-dialog h2 { font-size: 18px; }
  .fbs-page .fbs-job-meta { grid-template-columns: 1fr; }
  .fbs-page .fbs-api-fields { grid-template-columns: 1fr; }
  .fbs-page .fbs-job-actions { flex-direction: row; }
  .fbs-page .fbs-job-actions .btn { flex: 1 1 180px; }
  .fbs-page .fbs-assembly-controls { width: 100%; margin-left: 0; justify-content: space-between; }
  .fbs-page .fbs-carriage-filters label { flex: 1 1 140px; }
  .fbs-page .fbs-carriage-filters select { width: 100%; min-width: 0; }
  .fbs-page .fbs-carriage-count { width: 100%; margin: 0; }
  .fbs-page .fbs-carriage-filters .btn { width: 100%; margin-left: 0; }
  .fbs-page .fbs-warehouse-layout { grid-template-columns: 1fr; min-height: auto; }
  .fbs-page .fbs-map-panel { min-height: 350px; }
  .fbs-page .fbs-warehouse-list { max-height: 320px; }
  .fbs-page .fbs-create-options { grid-template-columns: 1fr; }
  .fbs-page .fbs-create-heading { align-items: flex-start; flex-direction: column; }
  .fbs-page .fbs-scanner-banner { padding: 16px; }
  .fbs-page .fbs-modal-header-actions { width: 100%; justify-content: space-between; }
  .fbs-page .fbs-scanner-image { width: 105px; height: 90px; }
}

@media (prefers-reduced-motion: reduce) {
  .fbs-page *,
  .fbs-page *::before,
  .fbs-page *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .fbs-page .btn:hover { transform: none; }
}
