:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --ink: #1e2329;
  --muted: #667085;
  --line: #d9dee7;
  --accent: #198754;
  --accent-dark: #12663f;
  --warn: #b54708;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, sans-serif;
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: #fff9d8;
  border-right: 1px solid var(--line);
  height: 100vh;
  overflow-y: auto;
  padding: 18px 14px;
  position: sticky;
  top: 0;
}

.brand {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: block;
  object-fit: cover;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
  flex: 0 0 auto;
}

nav {
  display: grid;
  gap: 8px;
}

nav button,
.primary,
.ghost {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  min-height: 38px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

nav button {
  text-align: left;
  padding: 9px 12px;
}

nav button.active {
  border-color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}

.main-nav {
  align-content: start;
  gap: 9px;
}

.main-nav button {
  min-height: 32px;
}

.main-nav .nav-home,
.nav-subitems button {
  background: #fff;
  border-color: #dde3ee;
  font-size: 14px;
  line-height: 1.2;
}

.main-nav .nav-home {
  font-weight: 800;
}

.nav-group {
  border-top: 1px solid rgba(148, 163, 184, 0.32);
  padding-top: 7px;
}

.nav-group:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.nav-group summary {
  align-items: center;
  color: #667085;
  cursor: pointer;
  display: flex;
  font-size: 11px;
  font-weight: 800;
  justify-content: space-between;
  letter-spacing: 0;
  list-style: none;
  padding: 5px 4px 4px;
  text-transform: uppercase;
}

.nav-group summary::-webkit-details-marker {
  display: none;
}

.nav-group summary::after {
  color: #94a3b8;
  content: "▾";
  font-size: 12px;
  transition: transform 0.16s ease;
}

.nav-group:not([open]) summary::after {
  transform: rotate(-90deg);
}

.nav-group.has-active summary {
  color: #4f46e5;
}

.nav-subitems {
  display: grid;
  gap: 5px;
  margin-top: 3px;
}

.nav-subitems button {
  padding: 7px 10px 7px 18px;
}

.nav-subitems button::before {
  color: #94a3b8;
  content: "•";
  display: inline-block;
  margin-right: 7px;
}

.main-nav button.active {
  background: #eef2ff;
  border-color: #d8d2ff;
  box-shadow: inset 3px 0 0 #4f46e5;
  color: #3730a3;
  font-weight: 800;
}

.settings-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.settings-tile {
  background: #fff;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 6px;
  min-height: 96px;
  padding: 14px;
  text-align: left;
}

.settings-tile strong {
  color: #111827;
  font-size: 16px;
}

.settings-tile span {
  color: #64748b;
  font-size: 13px;
  line-height: 1.35;
}

.settings-tile:hover {
  border-color: #8b5cf6;
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.08);
}

.period-lock-panel {
  background: #f8fafc;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  margin: 16px 0;
  padding: 16px;
}

.period-lock-header,
.period-lock-body,
.period-lock-actions {
  display: flex;
  gap: 14px;
}

.period-lock-header {
  align-items: flex-start;
  justify-content: space-between;
}

.period-lock-header h3 {
  margin: 0 0 4px;
}

.period-lock-header p,
.period-lock-summary span,
.period-lock-summary small {
  color: #64748b;
}

.period-lock-body {
  align-items: stretch;
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(280px, 1.1fr);
  margin-top: 14px;
}

.period-lock-summary,
.period-lock-form {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  display: grid;
  gap: 8px;
  padding: 14px;
}

.period-lock-form label {
  display: grid;
  gap: 6px;
}

.period-lock-form input,
.period-lock-form textarea {
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  font: inherit;
  padding: 10px 12px;
}

.period-lock-actions {
  flex-wrap: wrap;
}

.accounting-health-panel {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  margin: 16px 0;
  padding: 16px;
}

.accounting-health-header {
  align-items: flex-start;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.accounting-health-header h3 {
  margin: 0 0 4px;
}

.accounting-health-header p,
.accounting-health-empty span,
.accounting-health-item span,
.accounting-health-item small {
  color: #64748b;
}

.accounting-health-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 14px 0;
}

.accounting-health-summary div,
.accounting-health-empty,
.accounting-health-item {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
}

.accounting-health-summary div {
  display: grid;
  gap: 4px;
}

.accounting-health-summary span {
  color: #64748b;
  font-size: 12px;
}

.accounting-health-summary strong {
  color: #111827;
  font-size: 22px;
}

.accounting-health-list {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.accounting-health-item {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 0.35fr);
}

.accounting-health-item > div {
  display: grid;
  gap: 4px;
}

.accounting-health-item > div:last-child {
  text-align: right;
}

.accounting-health-item > div:last-child strong {
  color: #15803d;
}

.accounting-health-empty {
  display: grid;
  gap: 4px;
}

.fiscal-toolbar,
.fiscal-bulk-bar {
  align-items: end;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0;
  padding: 12px;
}

.fiscal-toolbar label {
  color: #64748b;
  display: grid;
  font-size: 12px;
  gap: 5px;
}

.fiscal-toolbar input,
.fiscal-toolbar select {
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  font: inherit;
  min-height: 38px;
  padding: 8px 10px;
}

.fiscal-search-field {
  flex: 1 1 260px;
}

.fiscal-archive-note {
  background: #f8fafc;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  color: #475569;
  display: grid;
  gap: 4px;
  margin: 10px 0;
  padding: 12px 14px;
}

.fiscal-archive-note strong {
  color: #0f172a;
}

.fiscal-bulk-bar {
  align-items: center;
  justify-content: space-between;
}

.fiscal-bulk-bar .check-row {
  align-items: center;
  display: flex;
  gap: 8px;
  margin-right: auto;
}

.fiscal-receipt-table-wrap {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: auto;
}

.fiscal-receipt-table {
  margin: 0;
  min-width: 920px;
}

.fiscal-receipt-table td,
.fiscal-receipt-table th {
  vertical-align: middle;
}

.fiscal-receipt-table td strong,
.fiscal-receipt-table td small {
  display: block;
}

.fiscal-receipt-table .table-actions {
  text-align: right;
  white-space: nowrap;
}

.fiscal-duplicate-info {
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  color: #166534;
  margin-top: 5px;
  padding: 5px 7px;
}

.danger-text {
  color: #dc2626;
}

.module-workspace-intro {
  margin-bottom: 14px;
}

.module-workspace-intro h2 {
  margin: 4px 0 6px;
}

.module-workspace-intro p {
  color: var(--muted);
  margin: 0;
}

.customer-segment-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 14px;
}

.customer-segment-card {
  min-width: 0;
}

.customer-segment-card > .panel-head {
  align-items: flex-start;
}

.customer-segment-card > .panel-head > strong {
  align-items: center;
  background: #eef2ff;
  border-radius: 999px;
  color: #4f46e5;
  display: inline-flex;
  font-size: 18px;
  height: 38px;
  justify-content: center;
  min-width: 38px;
  padding: 0 10px;
}

.customer-segment-card.red > .panel-head > strong {
  background: #fee2e2;
  color: #b91c1c;
}

.customer-segment-card.green > .panel-head > strong {
  background: #dcfce7;
  color: #15803d;
}

.customer-segment-card.amber > .panel-head > strong {
  background: #fef3c7;
  color: #b45309;
}

.customer-segment-list {
  display: grid;
  gap: 8px;
}

.customer-segment-section {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

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

.customer-segment-card.violet > .panel-head > strong {
  background: #ede9fe;
  color: #6d28d9;
}

.customer-history-workspace {
  margin-bottom: 14px;
}

.crm-history-workspace {
  align-items: start;
}

.crm-entry-panel,
.crm-log-panel {
  min-width: 0;
}

.crm-interaction-form {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.crm-interaction-form label {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 6px;
}

.crm-interaction-form input,
.crm-interaction-form select,
.crm-interaction-form textarea {
  background: #fbfcff;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  font: inherit;
  min-height: 36px;
  padding: 7px 9px;
}

.crm-interaction-form .span-2 {
  grid-column: 1 / -1;
}

.crm-log-list {
  display: grid;
  gap: 10px;
  max-height: 520px;
  overflow: auto;
}

.crm-log-item {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-left: 4px solid #6366f1;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 10px;
}

.crm-log-item.call {
  border-left-color: #0ea5e9;
}

.crm-log-item.task,
.crm-log-item.reminder {
  border-left-color: #f59e0b;
}

.crm-log-item.comment {
  border-left-color: #22c55e;
}

.crm-log-item span,
.crm-log-item small,
.crm-log-item footer,
.crm-log-item em {
  color: var(--muted);
  font-size: 12px;
}

.crm-log-item strong {
  display: block;
  margin-top: 2px;
}

.crm-log-item p {
  margin: 0;
}

.crm-log-item footer {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.roles-matrix-panel {
  overflow-x: auto;
}

.roles-matrix-actions {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.roles-matrix-actions h2,
.roles-matrix-actions p {
  margin: 0;
}

.roles-matrix-actions p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.roles-matrix-actions > div:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.roles-matrix th,
.roles-matrix td {
  text-align: center;
}

.roles-matrix th:first-child,
.roles-matrix td:first-child {
  min-width: 220px;
  text-align: left;
}

.roles-matrix td:first-child small {
  color: var(--muted);
  display: block;
  font-size: 11px;
  margin-top: 2px;
}

.role-permission,
.role-permission-toggle span {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  justify-content: center;
  min-width: 44px;
  padding: 4px 9px;
}

.role-permission-toggle {
  align-items: center;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
}

.role-permission-toggle input {
  inline-size: 1px;
  opacity: 0;
  position: absolute;
}

.role-permission-toggle span {
  background: #f1f5f9;
  color: #64748b;
}

.role-permission-toggle input:checked + span {
  background: #dcfce7;
  color: #15803d;
}

.role-permission-toggle.is-locked {
  cursor: not-allowed;
  opacity: 0.72;
}

.role-permission.enabled {
  background: #dcfce7;
  color: #15803d;
}

.role-permission.disabled {
  background: #f1f5f9;
  color: #64748b;
}

.receipt-workspace-kpis {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  margin-bottom: 14px;
}

.receipt-workspace-kpis .toolbar-stat {
  min-height: 74px;
}

.receipt-workspace-kpis .toolbar-stat.attention {
  border-color: #f59e0b;
  box-shadow: inset 3px 0 0 #f59e0b;
}

.purchase-receipt-workspace,
.stock-reservation-workspace {
  display: grid;
  gap: 14px;
}

.reservation-workspace-grid {
  align-items: start;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
}

.reservation-orders-table td,
.reservation-products-table td,
.purchase-receipt-journal td {
  vertical-align: top;
}

.shell {
  min-width: 0;
  overflow-x: hidden;
  padding: 22px;
}

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

body[data-current-view="orders"] {
  background: #f7f8fc;
}

body[data-current-view="orders"] .sidebar {
  background: #ffffff;
  box-shadow: 8px 0 28px rgba(17, 24, 39, 0.04);
}

body[data-current-view="orders"] nav button.active {
  background: #eef2ff;
  border-color: #d8d2ff;
  box-shadow: inset 3px 0 0 #4f46e5;
  color: #3730a3;
  font-weight: 800;
}

body[data-current-view="orders"] .shell {
  padding: 16px;
}

body[data-current-view="orders"] .topbar {
  display: none;
}

body[data-current-view="onlineOrders"],
body[data-current-view="offlineOrders"] {
  background: #f7f8fc;
}

body[data-current-view="onlineOrders"] .sidebar,
body[data-current-view="offlineOrders"] .sidebar {
  background: #ffffff;
  box-shadow: 8px 0 28px rgba(17, 24, 39, 0.04);
}

body[data-current-view="onlineOrders"] nav button.active,
body[data-current-view="offlineOrders"] nav button.active {
  background: #eef2ff;
  border-color: #d8d2ff;
  box-shadow: inset 3px 0 0 #4f46e5;
  color: #3730a3;
  font-weight: 800;
}

body[data-current-view="onlineOrders"] .shell,
body[data-current-view="offlineOrders"] .shell {
  padding: 16px;
}

body[data-current-view="onlineOrders"] .topbar,
body[data-current-view="offlineOrders"] .topbar {
  display: none;
}

.order-channel-workspace {
  border-left: 4px solid #4f46e5;
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

.order-channel-workspace.offline {
  border-left-color: #198754;
}

.order-channel-head {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.order-channel-head h3 {
  margin: 3px 0 5px;
}

.order-channel-head p {
  color: var(--muted);
  margin: 0;
}

.order-channel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.order-channel-flow,
.order-channel-stats {
  display: grid;
  gap: 10px;
}

.order-channel-flow {
  grid-template-columns: repeat(4, minmax(120px, 1fr));
}

.order-channel-flow span {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #344054;
  display: flex;
  font-weight: 800;
  gap: 8px;
  min-height: 42px;
  padding: 8px 10px;
}

.order-channel-flow strong {
  align-items: center;
  background: #eef2ff;
  border-radius: 999px;
  color: #4f46e5;
  display: inline-flex;
  height: 24px;
  justify-content: center;
  min-width: 24px;
}

.order-channel-workspace.offline .order-channel-flow strong {
  background: #dcfce7;
  color: #15803d;
}

.order-channel-stats {
  grid-template-columns: repeat(4, minmax(130px, 1fr));
}

body[data-current-view="analytics"] {
  background: #f6f8fc;
  overflow-x: hidden;
}

body[data-current-view="analytics"] .sidebar {
  background: #ffffff;
  box-shadow: 8px 0 28px rgba(17, 24, 39, 0.04);
}

body[data-current-view="analytics"] nav button.active {
  background: #eef2ff;
  border-color: #d8d2ff;
  box-shadow: inset 3px 0 0 #4f46e5;
  color: #3730a3;
  font-weight: 800;
}

body[data-current-view="analytics"] .shell {
  padding: 16px;
}

body[data-current-view="analytics"] .topbar {
  display: none;
}

body[data-current-view="dashboard"] {
  background: #f6f8fc;
  overflow-x: hidden;
}

body[data-current-view="dashboard"] .sidebar {
  background: #ffffff;
  box-shadow: 8px 0 28px rgba(17, 24, 39, 0.04);
}

body[data-current-view="dashboard"] nav button.active {
  background: #eef2ff;
  border-color: #d8d2ff;
  box-shadow: inset 3px 0 0 #4f46e5;
  color: #3730a3;
  font-weight: 800;
}

body[data-current-view="dashboard"] .shell {
  padding: 16px;
}

body[data-current-view="dashboard"] .topbar {
  display: none;
}

body[data-current-view="cash"] {
  background: #f7f8fc;
  overflow-x: hidden;
}

body[data-current-view="cash"] .sidebar {
  background: #ffffff;
  box-shadow: 8px 0 28px rgba(17, 24, 39, 0.04);
}

body[data-current-view="cash"] nav button.active {
  background: #eef2ff;
  border-color: #d8d2ff;
  box-shadow: inset 3px 0 0 #4f46e5;
  color: #3730a3;
  font-weight: 800;
}

body[data-current-view="cash"] .shell {
  padding: 16px;
}

body[data-current-view="cash"] .topbar {
  display: none;
}

body[data-current-view="siteRequests"] {
  background: #f7f8fc;
  overflow-x: hidden;
}

body[data-current-view="siteRequests"] .sidebar {
  background: #ffffff;
  box-shadow: 8px 0 28px rgba(17, 24, 39, 0.04);
}

body[data-current-view="siteRequests"] nav button.active {
  background: #eef2ff;
  border-color: #d8d2ff;
  box-shadow: inset 3px 0 0 #4f46e5;
  color: #3730a3;
  font-weight: 800;
}

body[data-current-view="siteRequests"] .shell {
  padding: 16px;
}

body[data-current-view="siteRequests"] .topbar {
  display: none;
}

body[data-current-view="products"] {
  background: #f7f8fc;
  overflow-x: hidden;
}

body[data-current-view="products"] .sidebar {
  background: #ffffff;
  box-shadow: 8px 0 28px rgba(17, 24, 39, 0.04);
}

body[data-current-view="products"] nav button.active {
  background: #eef2ff;
  border-color: #d8d2ff;
  box-shadow: inset 3px 0 0 #4f46e5;
  color: #3730a3;
  font-weight: 800;
}

body[data-current-view="products"] .shell {
  padding: 16px;
}

body[data-current-view="products"] .topbar {
  display: none;
}

body[data-current-view="warehouseOrders"] {
  background: #f7f8fc;
  overflow-x: hidden;
}

body[data-current-view="warehouseOrders"] .sidebar {
  background: #ffffff;
  box-shadow: 8px 0 28px rgba(17, 24, 39, 0.04);
}

body[data-current-view="warehouseOrders"] nav button.active {
  background: #eef2ff;
  border-color: #d8d2ff;
  box-shadow: inset 3px 0 0 #4f46e5;
  color: #3730a3;
  font-weight: 800;
}

body[data-current-view="warehouseOrders"] .shell {
  padding: 16px;
}

body[data-current-view="warehouseOrders"] .topbar {
  display: none;
}

.topbar-actions {
  align-items: end;
  display: flex;
  gap: 10px;
}

.role-selector {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  min-width: 160px;
}

.role-selector select,
.role-selector input {
  margin-top: 4px;
}

.auth-login {
  min-width: 120px;
}

.auth-login input {
  max-width: 120px;
}

h1 {
  margin: 0;
  font-size: 26px;
  letter-spacing: 0;
}

p {
  margin: 6px 0 0;
  color: var(--muted);
}

.primary {
  background: var(--accent);
  border-color: var(--accent-dark);
  color: white;
  padding: 0 18px;
  font-weight: 700;
}

.small {
  min-height: 30px;
  padding: 0 10px;
}

.attention-button {
  background: #fff7d6;
  border-color: #e7c665;
  color: #775200;
  font-weight: 700;
}

.danger-button {
  border-color: #f0a8a8;
  color: #b42318;
  font-weight: 700;
}

.danger-button:hover {
  background: #ffe4e4;
}

.link-button {
  background: transparent;
  border: 0;
  color: var(--accent-dark);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 0;
  text-align: left;
}

.link-button:hover {
  text-decoration: underline;
}

.stacked-link {
  display: grid;
  gap: 2px;
}

.stacked-link span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.muted {
  color: var(--muted);
  font-size: 12px;
}

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

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr 140px 160px;
  gap: 12px;
  align-items: end;
}

.order-customer-search,
.order-product-search {
  display: grid;
  gap: 8px;
}

.customer-results,
.product-results {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  max-height: 278px;
  overflow: auto;
}

.customer-results.is-hidden {
  display: none;
}

.customer-result,
.product-result {
  align-items: center;
  background: var(--panel);
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 62px;
  padding: 9px 10px;
  text-align: left;
  width: 100%;
}

.customer-result:last-child,
.product-result:last-child {
  border-bottom: 0;
}

.customer-result:hover,
.customer-result.active,
.product-result:hover,
.product-result.active {
  background: #eef8f1;
}

.customer-result.active,
.product-result.active {
  box-shadow: inset 3px 0 0 var(--accent);
}

.customer-result small,
.customer-result-money small,
.product-result-main {
  min-width: 0;
}

.customer-result span:first-child,
.product-result-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.customer-result-money {
  min-width: 96px;
  text-align: right;
}

.order-create-head {
  align-items: start;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 14px;
}

.order-create-total {
  display: grid;
  gap: 2px;
  min-width: 160px;
  text-align: right;
}

.order-create-actions {
  align-items: end;
  display: flex;
  gap: 10px;
}

.order-create-total span {
  color: var(--muted);
  font-size: 12px;
}

.order-create-total strong {
  font-size: 24px;
}

.order-create-collapsed {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.order-create-collapsed h2 {
  margin: 2px 0 0;
}

.order-create-collapsed p {
  color: var(--muted);
  margin: 6px 0 0;
}

.order-create-collapsed-actions {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(130px, auto) minmax(150px, auto) auto;
}

.order-sale-layout {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(280px, 0.8fr) minmax(420px, 1.2fr);
}

.order-setup-grid {
  align-items: stretch;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(300px, 1fr) minmax(300px, 0.85fr);
  margin-bottom: 16px;
}

.order-step,
.order-context-card,
.order-draft-card {
  min-width: 0;
}

.order-context-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.order-step-head {
  align-items: center;
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.order-step-head > span {
  align-items: center;
  background: #eef8f1;
  border: 1px solid #b7dfc3;
  border-radius: 999px;
  color: var(--accent-dark);
  display: inline-flex;
  flex: 0 0 28px;
  font-size: 13px;
  font-weight: 700;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.order-step-head h3 {
  font-size: 16px;
  margin: 0;
}

.order-step-head p {
  color: var(--muted);
  font-size: 12px;
  margin: 2px 0 0;
}

.order-step-customer,
.order-step-products {
  display: grid;
  gap: 12px;
}

.customer-mini-card {
  background: #f8faf9;
  border-radius: 6px;
  display: grid;
  gap: 6px;
  padding: 10px;
}

.customer-mini-card span,
.customer-mini-card small {
  color: var(--muted);
  font-size: 12px;
}

.customer-mini-card div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.customer-mini-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.draft-business-type-control {
  background: linear-gradient(180deg, #fff7ed 0%, #ffffff 100%);
  border: 1px solid #fdba74;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(249, 115, 22, 0.08);
  display: grid;
  gap: 6px;
  padding: 10px;
}

.draft-business-type-control label {
  color: #7c2d12;
  display: grid;
  gap: 5px;
  font-size: 12px;
  font-weight: 800;
}

.draft-business-type-control select {
  border-color: #fb923c;
  font-weight: 800;
  min-height: 36px;
}

.draft-business-type-control small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.quick-customer-details {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.quick-customer-details summary {
  color: var(--accent-dark);
  cursor: pointer;
  font-weight: 700;
  list-style-position: outside;
}

.quick-customer-form {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  margin-top: 10px;
}

.order-product-add {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.32fr);
  align-items: start;
}

.order-product-add-unified {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.32fr);
}

.order-product-add-catalog {
  grid-template-columns: minmax(210px, 0.34fr) minmax(320px, 1fr) minmax(150px, 0.22fr) minmax(112px, 0.2fr);
}

.order-product-category-panel,
.order-product-search {
  min-width: 0;
}

.order-product-category-panel {
  background: #f7faf8;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 8px;
  padding: 10px;
}

.order-product-category-head,
.order-product-picker-summary {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.order-product-category-head strong {
  font-size: 13px;
}

.order-product-category-tree {
  border: 1px solid var(--line);
  border-radius: 6px;
  max-height: 228px;
  overflow: auto;
}

.order-product-category-tree button {
  align-items: center;
  background: var(--panel);
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  display: flex;
  font: inherit;
  gap: 8px;
  justify-content: space-between;
  min-height: 34px;
  padding: 6px 8px 6px calc(8px + var(--indent, 0px));
  text-align: left;
  width: 100%;
}

.order-product-category-tree button:last-child {
  border-bottom: 0;
}

.order-product-category-tree button:hover,
.order-product-category-tree button.active {
  background: #eef8f1;
}

.order-product-category-tree button.active {
  box-shadow: inset 3px 0 0 var(--accent);
  color: var(--accent-dark);
  font-weight: 800;
}

.order-product-category-tree span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-product-category-tree strong {
  color: var(--muted);
  font-size: 11px;
}

.order-product-category-empty,
.order-product-empty-state {
  color: var(--muted);
  display: grid;
  gap: 4px;
  line-height: 1.35;
  padding: 12px;
}

.order-product-category-empty strong,
.order-product-empty-state strong {
  color: var(--ink);
  font-size: 13px;
}

.order-product-picker-summary {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  padding: 6px 8px;
}

.order-product-picker-summary strong {
  color: var(--ink);
}

.price-type-panel {
  background: #f7faf8;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 8px;
  padding: 10px;
}

.order-add-price-type {
  background: transparent;
  border: 0;
  padding: 0;
}

.sales-source-card {
  background: #f7faf8;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 9px;
  padding: 12px;
}

.sales-source-card > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.sales-source-card small {
  color: var(--accent-dark);
  font-weight: 700;
}

.price-type-panel > span {
  color: var(--muted);
  font-size: 12px;
}

.price-type-panel small {
  color: var(--muted);
  line-height: 1.35;
}

.price-type-switch {
  display: grid;
  gap: 6px;
  grid-template-columns: 1fr 1fr;
}

.price-type-switch-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.price-type-switch button {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  min-height: 34px;
}

.price-type-switch button.active {
  background: #eef8f1;
  border-color: var(--accent);
  color: var(--accent-dark);
  font-weight: 700;
}

.order-add-controls {
  align-content: start;
  display: grid;
  gap: 10px;
}

.order-add-controls button {
  padding: 0 14px;
}

.order-draft-card {
  background: #fbfdfc;
  border: 2px solid var(--accent);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px;
  box-shadow: 0 16px 34px rgba(25, 135, 84, 0.12);
}

.invoice-head {
  align-items: center;
  background: #f2fbf6;
  border-bottom: 1px solid #b7dfc3;
  border-radius: 6px 6px 0 0;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin: -14px -14px 0;
  padding: 14px;
}

.invoice-stage-pill {
  background: #fff7d6;
  border-color: #e2bf52;
  color: #775200;
  font-weight: 800;
}

.invoice-head .order-step-head {
  margin-bottom: 0;
}

.invoice-meta-grid {
  align-items: stretch;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.invoice-meta-grid .draft-customer-line {
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 3px;
  justify-content: start;
  min-width: 126px;
  padding: 8px 10px;
}

.invoice-meta-grid .draft-customer-line:first-child {
  min-width: 220px;
  max-width: 360px;
}

.invoice-meta-grid .draft-customer-line span {
  font-size: 11px;
  font-weight: 700;
}

.invoice-meta-grid .draft-customer-line strong {
  max-width: 100%;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invoice-add-panel {
  background: var(--panel);
  border: 1px solid #b7dfc3;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.invoice-add-head {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.invoice-add-head h4 {
  font-size: 15px;
  margin: 0;
}

.invoice-add-head p {
  font-size: 12px;
  margin-top: 3px;
}

.invoice-add-head > strong {
  color: var(--accent-dark);
  white-space: nowrap;
}

.compact-results {
  max-height: 220px;
}

.compact-results .product-result {
  min-height: 52px;
  padding-bottom: 7px;
  padding-top: 7px;
}

.draft-customer-line,
.draft-total {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.draft-customer-line span,
.draft-total span {
  color: var(--muted);
  font-size: 12px;
}

.draft-customer-line strong {
  font-size: 14px;
  text-align: right;
}

.draft-lines {
  overflow: hidden;
}

.draft-lines-workspace {
  background: var(--panel);
  border: 2px solid #26323f;
  border-radius: 8px;
}

.draft-lines-head {
  align-items: center;
  background: #fff7d6;
  border-bottom: 1px solid #e2bf52;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 12px 14px;
}

.draft-lines-head h4 {
  font-size: 16px;
  margin: 2px 0 0;
}

.draft-lines-summary {
  align-items: center;
  display: grid;
  gap: 2px 10px;
  grid-template-columns: auto auto auto auto;
}

.draft-lines-summary span {
  color: #775200;
  font-size: 12px;
  font-weight: 700;
}

.draft-lines-summary strong {
  font-size: 18px;
}

.draft-table-wrap {
  overflow: auto;
}

.draft-table {
  min-width: 1040px;
}

.draft-table th:nth-child(2),
.draft-table th:nth-child(3),
.draft-table th:nth-child(4),
.draft-table th:nth-child(5),
.draft-table th:nth-child(6),
.draft-table td:nth-child(2),
.draft-table td:nth-child(3),
.draft-table td:nth-child(4),
.draft-table td:nth-child(5),
.draft-table td:nth-child(6) {
  width: 140px;
}

.draft-table th:nth-child(2),
.draft-table td:nth-child(2) {
  width: 160px;
}

.draft-table th:nth-child(3),
.draft-table td:nth-child(3) {
  width: 130px;
}

.draft-stock-cell strong,
.draft-stock-cell span {
  display: block;
}

.draft-stock-cell span {
  font-size: 12px;
}

.draft-stock-row-zero td {
  background: #fffaf0;
}

.draft-stock-row-negative td,
.draft-stock-row-missing td {
  background: #fff4f4;
}

.draft-table tbody tr:hover {
  background: #f7faf8;
}

.draft-table th:last-child,
.draft-table td:last-child {
  width: 90px;
  text-align: right;
}

.draft-empty-cell {
  background: #fbfdfc;
  color: var(--muted);
  font-weight: 700;
  text-align: center;
}

.line-price-type {
  display: grid;
  gap: 4px;
  max-width: 150px;
}

.line-price-type-select {
  background: #f8faf9;
  border-color: #b7dfc3;
  font-weight: 700;
  min-height: 34px;
  padding-bottom: 5px;
  padding-top: 5px;
}

.line-price-type-select.is-promo {
  background: #fff7d6;
  border-color: #e2bf52;
  color: #775200;
}

.price-type-note {
  color: #775200;
  font-size: 11px;
  font-weight: 700;
}

.price-input {
  max-width: 130px;
}

.empty-draft {
  color: var(--muted);
  font-size: 12px;
}

.empty-draft {
  margin: 0;
  padding: 18px 0;
}

.draft-total strong {
  font-size: 22px;
}

.draft-total > div {
  display: grid;
  gap: 3px;
}

.draft-total > div:last-child {
  justify-items: end;
}

.draft-total small {
  color: #167255;
  font-size: 12px;
  font-weight: 700;
}

.draft-total em {
  color: #167255;
  font-size: 14px;
  font-style: normal;
  font-weight: 800;
}

.draft-footer {
  align-items: end;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.draft-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.draft-actions button {
  padding: 0 14px;
}

.product-result-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-result-meta,
.product-result-stock span {
  color: var(--muted);
  font-size: 12px;
}

.product-result-stock {
  min-width: 96px;
  text-align: right;
}

.empty-search {
  margin: 0;
  padding: 12px;
}

.form-head,
.actions {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
}

label {
  color: var(--muted);
  display: grid;
  font-size: 13px;
  gap: 5px;
}

select,
input,
textarea {
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
  min-height: 38px;
  padding: 7px 9px;
  width: 100%;
}

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

h2 {
  font-size: 18px;
  letter-spacing: 0;
  margin: 0;
}

.order-form {
  margin-bottom: 16px;
}

.order-edit-panel,
.order-return-panel,
.order-return-history {
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  margin: 16px 0;
  padding: 14px;
}

.order-edit-head {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 1fr) minmax(140px, 0.45fr) minmax(140px, 0.45fr);
}

.order-lines-edit-form {
  display: grid;
  gap: 12px;
}

.order-lines-edit-meta {
  align-items: end;
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 0.45fr) minmax(220px, 1fr) minmax(120px, 0.35fr) minmax(120px, 0.35fr);
  padding: 10px;
}

.order-lines-save-actions {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.order-edit-add {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(360px, 1fr) minmax(110px, 0.25fr) auto;
}

.order-edit-add-unified {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.32fr);
}

.order-edit-actions {
  flex-wrap: wrap;
  margin-bottom: 0;
}

.order-edit-primary-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.order-edit-ship-button {
  background: #eef6ff;
  border-color: #b7d7ff;
  color: #175cd3;
}

.order-return-actions {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(240px, 1fr) auto;
}

.table-input {
  min-height: 34px;
  max-width: 110px;
}

.site-status-select {
  max-width: 160px;
  min-width: 140px;
}

.site-status-inline-editor {
  cursor: pointer;
  display: inline-grid;
  position: relative;
  width: fit-content;
}

.compact-status-control {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.compact-status-control > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.site-status-inline-editor .site-request-state-badge,
.site-status-inline-editor .erp-status-badge {
  padding-right: 18px;
}

.site-status-inline-editor::after {
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  content: "";
  opacity: 0.72;
  pointer-events: none;
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-40%);
}

.site-status-inline-select {
  border: 0;
  cursor: pointer;
  height: 100%;
  inset: 0;
  opacity: 0;
  position: absolute;
  width: 100%;
}

.site-status-inline-select:disabled {
  cursor: not-allowed;
}

.site-status-inline-editor:has(.site-status-inline-select:focus-visible) .site-request-state-badge,
.site-status-inline-editor:has(.site-status-inline-select:focus-visible) .erp-status-badge {
  outline: 2px solid #4f46e5;
  outline-offset: 2px;
}

.compact {
  margin-top: 14px;
}

.notice {
  background: #eef8f1;
  border: 1px solid #b7dfc3;
  border-radius: 6px;
  color: var(--accent-dark);
  margin-bottom: 12px;
  padding: 10px 12px;
}

.notice.danger {
  background: #fef3f2;
  border-color: #fda29b;
  color: #b42318;
}

.notice.success {
  background: #ecfdf3;
  border-color: #abefc6;
  color: #067647;
}

.floating-message {
  animation: toast-in 0.16s ease-out;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(185, 28, 28, 0.28);
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(30, 35, 41, 0.22);
  color: #7f1d1d;
  font-size: 15px;
  font-weight: 700;
  left: 50%;
  line-height: 1.35;
  max-width: min(760px, calc(100vw - 32px));
  padding: 14px 18px;
  pointer-events: none;
  position: fixed;
  top: 22px;
  transform: translateX(-50%);
  width: max-content;
  z-index: 1000;
}

.floating-message.danger {
  background: rgba(254, 226, 226, 0.94);
  border-color: rgba(220, 38, 38, 0.42);
  color: #7f1d1d;
}

.floating-message.success {
  background: rgba(236, 253, 245, 0.94);
  border-color: rgba(22, 163, 74, 0.34);
  color: #14532d;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, -10px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
  align-items: end;
}

.toolbar button {
  padding: 0 14px;
}

.payment-field {
  min-width: 160px;
}

.payment-summary {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(150px, 0.8fr) minmax(150px, 0.8fr) minmax(160px, 0.8fr) auto;
  gap: 12px;
  align-items: end;
}

.active-soft {
  background: #eef8f1;
  border-color: var(--accent);
  color: var(--accent-dark);
  font-weight: 700;
}

.orders-smart-page {
  background: #f7f8fc;
  border: 1px solid #e4e8f0;
  border-radius: 8px;
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 12px;
}

.orders-smart-head {
  align-items: end;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.orders-smart-head h2 {
  color: #111827;
  font-size: 24px;
  margin-top: 3px;
}

.orders-smart-head h2 span {
  background: #eef3ff;
  border: 1px solid #cfd8ff;
  border-radius: 999px;
  color: #4f46e5;
  font-size: 12px;
  margin-left: 8px;
  padding: 3px 8px;
  vertical-align: middle;
}

.orders-smart-actions,
.orders-smart-toolbar {
  align-items: center;
  display: flex;
  gap: 10px;
}

.orders-smart-actions button,
.orders-smart-toolbar button {
  padding: 0 14px;
}

.orders-smart-toolbar {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.05);
  padding: 7px;
}

.orders-smart-search {
  flex: 1 1 420px;
}

.orders-smart-search input {
  background: #f9fafb;
  border-color: #d7deea;
  min-height: 36px;
}

.orders-smart-ai {
  background: #f3f0ff;
  border-color: #d8d2ff;
  color: #4f46e5;
  font-weight: 800;
  opacity: 1;
}

.orders-smart-count {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin-left: auto;
  padding: 6px 10px;
  white-space: nowrap;
}

.orders-smart-filters {
  align-items: end;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.04);
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(120px, 0.7fr) minmax(150px, 0.8fr) minmax(130px, 0.7fr) minmax(130px, 0.7fr) minmax(130px, 0.7fr) minmax(150px, 0.85fr) minmax(190px, 1fr) minmax(120px, 0.65fr);
  padding: 8px 10px;
}

.orders-smart-filters label {
  font-size: 12px;
}

.orders-smart-filters select,
.orders-smart-filters input {
  min-height: 30px;
  padding: 4px 7px;
}

.orders-smart-layout {
  align-items: start;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 340px);
  min-width: 0;
}

.orders-smart-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}

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

.orders-section-head h3 {
  font-size: 17px;
  margin: 0;
}

.orders-section-head p {
  font-size: 12px;
  margin-top: 2px;
}

.orders-section-head .order-pager {
  min-width: min(100%, 430px);
}

.orders-table-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(17, 24, 39, 0.06);
  max-height: calc(100vh - 360px);
  min-height: 392px;
  overflow: auto;
}

.orders-smart-table {
  border: 0;
  min-width: 860px;
  table-layout: fixed;
  width: 100%;
}

.orders-smart-table th,
.orders-smart-table td {
  font-size: 12px;
  line-height: 1.18;
  padding: 4px 7px;
  vertical-align: middle;
}

.orders-smart-table th {
  background: #f8fafc;
  color: #4b5563;
  font-size: 12px;
  position: sticky;
  top: 0;
  z-index: 2;
}

.orders-smart-table th:first-child,
.orders-smart-table td:first-child {
  text-align: center;
  width: 34px;
}

.orders-smart-table th:nth-child(2) {
  width: 112px;
}

.orders-smart-table th:nth-child(3) {
  width: 230px;
}

.orders-smart-table th:nth-child(4) {
  width: 145px;
}

.orders-smart-table th:nth-child(5) {
  width: 132px;
}

.orders-smart-table th:nth-child(6) {
  width: 230px;
}

.orders-smart-table th:nth-child(7) {
  width: 118px;
}

.orders-smart-table input[type="checkbox"] {
  min-height: 14px;
  padding: 0;
  width: 14px;
}

.orders-smart-table .order-work-row {
  cursor: pointer;
  height: 38px;
}

.orders-smart-table td > strong,
.orders-smart-table td > span:not(.status):not(.channel-pill):not(.priority-pill):not(.customer-business-type-badge) {
  display: block;
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.orders-smart-table .order-tags {
  display: none !important;
}

.order-row-meta-line {
  align-items: center;
  display: flex !important;
  gap: 5px;
  margin-top: 3px;
  max-width: 220px;
  overflow: hidden;
}

.order-row-manager {
  color: #667085;
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.orders-smart-table .order-delivery-cell {
  display: block;
  max-width: 218px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-row-actions {
  display: grid;
  gap: 4px;
  min-width: 132px;
}

.order-row-action-select {
  background: #ffffff;
  border: 1px solid #d7deea;
  border-radius: 7px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  min-height: 30px;
  padding: 4px 7px;
  width: 132px;
}

.order-main-action {
  border: 1px solid #d7deea;
  border-radius: 7px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  min-height: 28px;
  padding: 4px 8px;
  text-align: center;
  width: 132px;
}

.order-main-action.action-danger {
  background: #fff1f2;
  border-color: #fecaca;
  color: #b42318;
}

.order-main-action.action-warning {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.order-main-action.action-info,
.order-main-action.action-neutral {
  background: #f8fafc;
  color: #334155;
}

.order-main-action.action-success {
  background: #ecfdf3;
  border-color: #bbf7d0;
  color: #027a48;
}

.order-client-phone {
  color: #475467;
  font-weight: 800;
}

.orders-smart-table .order-work-row.is-selected td {
  background: #eef2ff;
  box-shadow: inset 3px 0 0 #4f46e5;
}

.orders-smart-table .order-work-row.is-selected:hover td {
  background: #e8edff;
}

.orders-smart-table .order-work-row.needs-action td {
  box-shadow: inset 3px 0 0 #f97316;
}

.strong-sub {
  color: var(--ink);
  font-weight: 700;
}

.channel-pill,
.priority-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  white-space: nowrap;
}

.channel-pill {
  background: #f6f8fb;
  color: #344054;
}

.priority-high {
  background: #ffe4e4;
  border-color: #f0a8a8;
  color: #b42318;
}

.priority-medium {
  background: #fff7d6;
  border-color: #e7c665;
  color: #775200;
}

.priority-low {
  background: #e9f7ef;
  border-color: #b7dfc3;
  color: var(--accent-dark);
}

.priority-text-high {
  color: #b42318;
}

.priority-text-medium {
  color: #b54708;
}

.priority-text-low {
  color: var(--accent-dark);
}

.order-delivery-cell {
  color: #344054;
  display: block;
  font-size: 12px;
  max-width: 154px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.orders-preview-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(17, 24, 39, 0.08);
  display: grid;
  gap: 12px;
  max-height: calc(100vh - 118px);
  overflow: auto;
  padding: 12px;
  position: sticky;
  top: 12px;
}

.orders-preview-close {
  justify-self: end;
  min-height: 28px;
  width: 32px;
}

.orders-preview-head {
  align-items: start;
  display: flex;
  gap: 6px;
  justify-content: space-between;
}

.orders-preview-head h3 {
  font-size: 22px;
  margin: 0;
}

.orders-preview-client {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 4px;
  padding: 12px 0;
}

.orders-preview-client strong {
  font-size: 17px;
}

.orders-preview-client span {
  color: var(--muted);
  font-size: 13px;
}

.orders-preview-client .customer-business-type-badge {
  color: #1d4ed8;
  font-size: 11px;
  justify-self: start;
  margin-left: 0;
}

.orders-preview-facts {
  display: grid;
  gap: 8px;
}

.orders-preview-facts div,
.payment-progress-row {
  align-items: baseline;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.orders-preview-facts span,
.payment-progress-row span {
  color: var(--muted);
  font-size: 12px;
}

.orders-preview-facts strong {
  color: var(--ink);
  font-size: 13px;
  text-align: right;
}

.orders-preview-money {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 12px;
}

.orders-preview-money > strong {
  font-size: 24px;
}

.payment-progress {
  background: #e9edf5;
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.payment-progress span {
  background: var(--accent);
  display: block;
  height: 100%;
}

.orders-preview-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

.orders-preview-actions button:first-child,
.orders-preview-actions button:last-child {
  grid-column: 1 / -1;
}

.orders-preview-hint {
  background: #f2f0ff;
  border: 1px solid #d8d2ff;
  border-radius: 8px;
  color: #42307d;
  display: grid;
  gap: 6px;
  padding: 12px;
}

.orders-preview-hint span {
  color: #42307d;
  font-size: 13px;
  line-height: 1.45;
}

.orders-smart-insights {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.orders-smart-insight {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: inset 3px 0 0 #98a2b3;
  display: grid;
  gap: 4px;
  min-height: 74px;
  padding: 11px;
}

.orders-smart-insight span,
.orders-smart-insight small {
  color: var(--muted);
  font-size: 12px;
}

.orders-smart-insight strong {
  font-size: 20px;
}

.orders-smart-insight.insight-success {
  box-shadow: inset 3px 0 0 var(--accent);
}

.orders-smart-insight.insight-warning {
  box-shadow: inset 3px 0 0 #d99a00;
}

.orders-smart-insight.insight-danger {
  box-shadow: inset 3px 0 0 #d92d20;
}

.orders-smart-insight.insight-accent {
  box-shadow: inset 3px 0 0 #635bff;
}

.order-journal {
  display: grid;
  gap: 14px;
  min-width: 0;
  overflow: auto;
}

.order-work-tab-groups {
  display: grid;
  gap: 7px;
}

.order-work-tabs {
  display: grid;
  gap: 5px;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
}

.order-work-tabs-workflow {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.order-work-workflow-tabs {
  display: grid;
  gap: 5px;
}

.order-work-workflow-tabs > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.order-work-tabs button {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  font: inherit;
  justify-content: space-between;
  min-height: 32px;
  padding: 4px 9px;
}

.order-work-tabs button[style] {
  box-shadow: inset 3px 0 0 var(--tab-color);
}

.order-work-tabs button.active {
  background: #eef2ff;
  border-color: #cfd8ff;
  box-shadow: inset 3px 0 0 var(--tab-color, #4f46e5);
  color: #3730a3;
}

.order-work-tabs strong {
  font-size: 16px;
}

.order-filter-grid {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 1.2fr) minmax(150px, 0.75fr) minmax(160px, 0.75fr) minmax(220px, 1fr) minmax(140px, 0.65fr) minmax(140px, 0.65fr) auto;
}

.order-filter-grid button {
  padding: 0 14px;
}

.order-summary {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
}

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

.order-work-table {
  border-collapse: separate;
  border-spacing: 0;
}

.order-work-table th:nth-child(1) {
  width: 210px;
}

.order-work-table th:nth-child(2) {
  width: 280px;
}

.order-work-table th:nth-child(3) {
  width: 170px;
}

.order-work-table th:nth-child(4) {
  width: 150px;
}

.order-work-row td {
  background: var(--panel);
  vertical-align: middle;
}

.order-work-row:hover td {
  background: #f8faf9;
}

.order-work-row-reserved td {
  box-shadow: inset 3px 0 0 #198754;
}

.order-work-row-completed td {
  box-shadow: inset 3px 0 0 #12b76a;
}

.order-work-row.has-debt td {
  box-shadow: inset 3px 0 0 #b54708;
}

.order-work-row.is-overdue td {
  background: #fff5f5;
  box-shadow: inset 3px 0 0 #d92d20;
}

.order-work-row.is-overdue:hover td {
  background: #ffefef;
}

.order-work-row.payment-due-attention td {
  background: #fffaf0;
  box-shadow: inset 3px 0 0 #e0a000;
}

.order-work-row.payment-due-attention:hover td {
  background: #fff4d6;
}

.order-number-link {
  font-size: 13px;
}

.order-row-sub,
.order-row-debt {
  color: var(--muted);
  display: block;
  font-size: 11px;
  margin-top: 1px;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-payment-marker {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex !important;
  font-size: 10px;
  font-weight: 800;
  gap: 4px;
  line-height: 1;
  margin-top: 3px;
  max-width: 118px;
  padding: 3px 6px;
  position: relative;
  white-space: nowrap;
}

.order-payment-marker::after {
  background: #111827;
  border-radius: 7px;
  box-shadow: 0 12px 24px rgba(17, 24, 39, 0.22);
  color: #fff;
  content: attr(data-tooltip);
  font-size: 11px;
  font-weight: 700;
  left: 0;
  line-height: 1.3;
  max-width: 260px;
  min-width: 210px;
  opacity: 0;
  padding: 8px 10px;
  pointer-events: none;
  position: absolute;
  top: calc(100% + 7px);
  transform: translateY(-3px);
  transition: opacity 0.12s ease, transform 0.12s ease;
  white-space: normal;
  z-index: 30;
}

.order-payment-marker:hover::after,
.order-payment-marker:focus-within::after {
  opacity: 1;
  transform: translateY(0);
}

.order-payment-icon {
  align-items: center;
  border: 1.5px solid currentColor;
  border-radius: 4px;
  display: inline-flex;
  flex: 0 0 auto;
  height: 13px;
  justify-content: center;
  position: relative;
  width: 13px;
}

.order-payment-icon-ok {
  background: #12b76a;
  border-color: #12b76a;
}

.order-payment-icon-ok::before {
  border-bottom: 2px solid #fff;
  border-right: 2px solid #fff;
  content: "";
  height: 7px;
  margin-top: -2px;
  transform: rotate(45deg);
  width: 4px;
}

.order-payment-icon-half {
  background: #f59e0b;
  border-color: #f59e0b;
}

.order-payment-icon-half::before {
  background: #fff;
  border-radius: 99px;
  content: "";
  height: 2px;
  width: 7px;
}

.order-payment-icon-empty {
  background: #fff;
  border-color: #ef4444;
}

.order-payment-icon-empty::before,
.order-payment-icon-empty::after {
  background: #ef4444;
  border-radius: 99px;
  content: "";
  height: 2px;
  position: absolute;
  width: 8px;
}

.order-payment-icon-empty::before {
  transform: rotate(45deg);
}

.order-payment-icon-empty::after {
  transform: rotate(-45deg);
}

.order-payment-icon-clock {
  background: #fff7ed;
  border-color: #f59e0b;
}

.order-payment-icon-clock::before {
  background: #f59e0b;
  border-radius: 99px;
  content: "";
  height: 7px;
  width: 2px;
}

.order-payment-icon-clock::after {
  background: #f59e0b;
  border-radius: 99px;
  content: "";
  height: 2px;
  position: absolute;
  transform: translate(2px, 2px);
  width: 5px;
}

.order-payment-icon-error {
  background: #fef2f2;
  border-color: #dc2626;
}

.order-payment-icon-error::before,
.order-payment-icon-error::after {
  background: #dc2626;
  border-radius: 99px;
  content: "";
  height: 2px;
  position: absolute;
  width: 8px;
}

.order-payment-icon-error::before {
  transform: rotate(45deg);
}

.order-payment-icon-error::after {
  transform: rotate(-45deg);
}

.order-payment-marker.payment-paid {
  background: #ecfdf3;
  border-color: #abefc6;
  color: #067647;
}

.order-payment-marker.payment-partial {
  background: #fffaeb;
  border-color: #fedf89;
  color: #b54708;
}

.order-payment-marker.payment-unpaid {
  background: #fff5f5;
  border-color: #fecaca;
  color: #b42318;
}

.order-payment-marker.payment-awaiting {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #c2410c;
}

.order-payment-marker.payment-error {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #b91c1c;
}

.payment-due-badge {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  margin-top: 4px;
  padding: 3px 7px;
  width: fit-content;
}

.payment-due-text {
  font-weight: 900;
}

.payment-due-muted {
  background: #f2f4f7;
  border-color: #d9dee5;
  color: #667085;
}

.payment-due-info {
  background: #eef4ff;
  border-color: #b8cdfc;
  color: #3155b7;
}

.payment-due-warning {
  background: #fff6db;
  border-color: #e8c766;
  color: #946200;
}

.payment-due-danger {
  background: #ffe8e8;
  border-color: #f0a4a4;
  color: #b42318;
}

.payment-due-form {
  border: 1px solid #eceff5;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
}

.payment-due-form label {
  display: grid;
  gap: 5px;
}

.payment-due-actions {
  display: flex;
  gap: 8px;
}

.order-tags {
  display: flex;
  flex-wrap: nowrap;
  gap: 3px;
  margin-top: 3px;
  max-width: 190px;
  overflow: hidden;
}

.order-tags span {
  background: #f1f4f8;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  white-space: nowrap;
}

.order-tags span.warning {
  background: #fff7d6;
  border-color: #e2bf52;
  color: #775200;
}

.order-tags span.danger {
  background: #ffe4e4;
  border-color: #f0a8a8;
  color: #b42318;
}

.order-tags span.accent {
  background: #eef8f1;
  border-color: #b7dfc3;
  color: var(--accent-dark);
}

.orders-smart-table .order-tags {
  display: none !important;
}

.status.order-status-reserved {
  background: #f2ecff;
  border: 1px solid #c8b6ff;
  color: #5b21b6;
}

.status.order-status-shipped {
  background: #e7f0ff;
  border: 1px solid #aecbfa;
  color: #1d4ed8;
}

.status.order-status-paid {
  background: #dcfce7;
  border: 1px solid #86efac;
  color: #14532d;
}

.status.order-status-completed {
  background: #e7f8ef;
  border: 1px solid #58d68d;
  color: #116329;
}

.status.order-status-cancelled {
  background: #ffe4e4;
  border: 1px solid #f0a8a8;
  color: #b42318;
}

.status.order-status-dynamic,
.order-workflow-badge {
  border: 1px solid;
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  padding: 5px 8px;
  white-space: nowrap;
}

.order-status-stack {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.orders-smart-table .order-status-stack {
  max-width: 130px;
}

.order-needs-action-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 4px;
}

.order-need-chip {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  color: #475467;
  display: inline-flex;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  max-width: 128px;
  overflow: hidden;
  padding: 4px 6px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-need-danger {
  background: #fff1f2;
  border-color: #fecaca;
  color: #b42318;
}

.order-need-warning {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.order-need-info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.orders-preview-head .order-status-stack,
.order-detail-title .order-status-stack {
  justify-content: flex-end;
}

.order-workflow-badge {
  font-size: 10px;
  padding: 4px 7px;
}

.order-workflow-empty {
  background: #f8fafc;
  border-color: #d0d5dd;
  color: #667085;
}

.order-workflow-row strong {
  display: block;
}

.order-workflow-inline-editor {
  cursor: pointer;
  display: inline-grid;
  max-width: 100%;
  position: relative;
}

.order-workflow-inline-editor .order-workflow-badge,
.order-workflow-inline-editor .warehouse-work-status {
  padding-right: 18px;
}

.order-workflow-inline-editor::after {
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  content: "";
  opacity: 0.72;
  pointer-events: none;
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-40%);
}

.order-workflow-select {
  border: 0;
  cursor: pointer;
  height: 100%;
  inset: 0;
  opacity: 0;
  position: absolute;
  width: 100%;
}

.order-workflow-select:disabled {
  cursor: not-allowed;
}

.order-workflow-inline-editor:has(.order-workflow-select:focus-visible) .order-workflow-badge,
.order-workflow-inline-editor:has(.order-workflow-select:focus-visible) .warehouse-work-status {
  outline: 2px solid #4f46e5;
  outline-offset: 2px;
}

.order-status-settings {
  display: grid;
  gap: 12px;
}

.order-status-settings-head {
  align-items: start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.order-status-settings-head h3 {
  margin: 2px 0 4px;
}

.order-status-create {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(240px, 1fr) 110px 110px auto;
}

.order-status-settings-table {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  overflow: hidden;
}

.order-status-settings-row {
  align-items: end;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(150px, 0.8fr) minmax(200px, 1fr) 90px 90px 110px minmax(160px, auto);
  padding: 10px;
}

.order-status-settings-row:last-child {
  border-bottom: 0;
}

.order-status-settings-badge {
  display: grid;
  gap: 5px;
  justify-items: start;
}

.order-status-settings-badge small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.order-status-active-toggle {
  align-items: center;
  display: flex;
  gap: 6px;
  min-height: 32px;
}

.order-status-active-toggle input {
  min-height: auto;
  width: auto;
}

.order-status-row-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.order-row-actions {
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(104px, 1fr);
}

.orders-smart-table.order-work-table th:first-child,
.orders-smart-table.order-work-table td:first-child {
  text-align: center;
  width: 34px;
}

.orders-smart-table.order-work-table th:nth-child(2) {
  width: 112px;
}

.orders-smart-table.order-work-table th:nth-child(3) {
  width: 230px;
}

.orders-smart-table.order-work-table th:nth-child(4) {
  width: 145px;
}

.orders-smart-table.order-work-table th:nth-child(5) {
  width: 132px;
}

.orders-smart-table.order-work-table th:nth-child(6) {
  width: 230px;
}

.orders-smart-table.order-work-table th:nth-child(7) {
  width: 118px;
}

.order-stock-alert {
  background: #fff4f4;
  border: 1px solid #f0a8a8;
  border-radius: 8px;
  box-shadow: inset 4px 0 0 #d92d20;
  display: grid;
  gap: 4px;
  margin: 12px 0;
  padding: 10px 12px;
}

.order-stock-alert strong {
  color: #b42318;
  font-size: 14px;
}

.order-stock-alert span {
  color: #7a271a;
  font-size: 13px;
  font-weight: 700;
}

.order-manager-revision-alert {
  background: #fff1f2;
  border-color: #fecaca;
  color: #7f1d1d;
}

.order-manager-revision-alert strong {
  display: block;
  margin-bottom: 6px;
}

.order-manager-revision-alert p {
  margin: 0;
  white-space: pre-line;
}

.order-warehouse-pick-facts.has-shortage {
  border-color: #fed7aa;
  background: #fff7ed;
}

.order-warehouse-pick-facts .panel-head {
  margin-bottom: 10px;
}

.warehouse-pick-shortage-row td {
  background: #fff1f2;
  box-shadow: inset 3px 0 0 #dc2626;
}

.warehouse-pick-shortage-row strong {
  color: #b42318;
}

.order-lines-table {
  min-width: 920px;
}

.order-line-stock-row-zero td {
  background: #fffaf0;
  box-shadow: inset 3px 0 0 #d99a00;
}

.order-line-stock-row-negative td,
.order-line-stock-row-missing td {
  background: #fff4f4;
  box-shadow: inset 3px 0 0 #d92d20;
}

.order-line-stock-cell {
  min-width: 124px;
}

.order-line-stock-cell strong,
.order-line-stock-cell span {
  display: block;
}

.order-line-stock-cell span {
  font-size: 12px;
  font-weight: 800;
  margin-top: 2px;
}

.order-line-stock-cell.success strong,
.order-line-stock-cell.success span {
  color: var(--accent-dark);
}

.order-line-stock-cell.warning strong,
.order-line-stock-cell.warning span {
  color: #b54708;
}

.order-line-stock-cell.danger strong,
.order-line-stock-cell.danger span {
  color: #b42318;
}

.order-line-stock-cell span.order-line-reserved {
  color: var(--muted);
  font-weight: 700;
}

.modal-backdrop {
  align-items: center;
  background: rgba(30, 35, 41, 0.42);
  display: grid;
  inset: 0;
  justify-items: center;
  padding: 20px;
  position: fixed;
  z-index: 50;
}

.journal-payment-dialog {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(30, 35, 41, 0.28);
  display: grid;
  gap: 14px;
  max-width: 560px;
  padding: 16px;
  width: min(560px, 100%);
}

.confirm-dialog {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(30, 35, 41, 0.28);
  display: grid;
  gap: 14px;
  max-width: 520px;
  padding: 16px;
  width: min(520px, 100%);
}

.confirm-dialog-head,
.confirm-dialog-actions {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.confirm-dialog h2 {
  font-size: 22px;
  margin: 3px 0 0;
}

.confirm-dialog p {
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
  margin: 0;
}

.confirm-dialog-details {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #9a3412;
  font-size: 13px;
  line-height: 1.45;
  padding: 10px 12px;
}

.invoice-add-actions {
  align-items: flex-end;
  display: grid;
  gap: 8px;
  justify-items: end;
  min-width: 190px;
}

.invoice-add-actions strong {
  color: var(--accent-dark);
  font-size: 13px;
  text-align: right;
}

.order-edit-catalog-entry {
  align-items: center;
  background: #f7f8ff;
  border: 1px solid #ddd6fe;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 12px;
  padding: 10px 12px;
  position: relative;
  z-index: 3;
}

.order-edit-catalog-entry div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.order-edit-catalog-entry span {
  color: var(--muted);
  font-size: 12px;
}

.order-edit-add,
.order-edit-add-unified {
  display: none !important;
}

.invoice-add-panel .order-product-add-unified {
  display: none !important;
}

.order-catalog-backdrop {
  align-items: center;
  background: rgba(15, 23, 42, 0.42);
  display: grid;
  inset: 0;
  justify-items: center;
  padding: 14px;
  position: fixed;
  z-index: 70;
}

.order-catalog-dialog {
  background: #ffffff;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.22);
  display: grid;
  gap: 12px;
  grid-template-rows: auto auto minmax(0, 1fr);
  height: min(900px, calc(100vh - 28px));
  max-width: 1660px;
  min-width: 0;
  overflow: hidden;
  padding: 14px;
  width: min(1660px, calc(100vw - 28px));
}

.order-catalog-header,
.order-catalog-header-actions,
.order-catalog-toolbar,
.order-catalog-section-head,
.order-catalog-cart-head,
.order-catalog-pagination,
.order-catalog-pagination > div {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-width: 0;
}

.order-catalog-header {
  border-bottom: 1px solid #eef0f5;
  padding-bottom: 10px;
}

.order-catalog-header h2 {
  font-size: 23px;
  letter-spacing: 0;
  margin: 2px 0 3px;
}

.order-catalog-header p,
.order-catalog-cart-head p {
  color: var(--muted);
  margin: 0;
}

.order-catalog-message-slot:empty {
  display: block;
  min-height: 0;
}

.order-catalog-layout {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 260px) minmax(520px, 1fr) minmax(310px, 360px);
  min-height: 0;
  min-width: 0;
}

.order-catalog-sidebar,
.order-catalog-main,
.order-catalog-cart-panel {
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  min-height: 0;
  min-width: 0;
}

.order-catalog-sidebar,
.order-catalog-cart-panel {
  display: grid;
  gap: 12px;
  overflow: auto;
  padding: 12px;
}

.order-catalog-main {
  display: grid;
  gap: 12px;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
  padding: 12px;
}

.order-catalog-main > .order-catalog-toolbar {
  grid-row: 1;
}

.order-catalog-main > .order-catalog-recommendations-panel {
  grid-row: 2;
}

.order-catalog-main > .order-catalog-grid {
  grid-row: 3;
}

.order-catalog-main > .order-catalog-pagination {
  grid-row: 4;
}

.order-recommendations-panel {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #dbe5ff;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
}

.order-recommendations-panel.compact {
  background: linear-gradient(180deg, #fff7ed 0%, #ffffff 100%);
  border-color: #fb923c;
  box-shadow: inset 4px 0 0 #f97316, 0 12px 28px rgba(249, 115, 22, 0.08);
  margin: 12px 14px 0;
  padding: 14px;
}

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

.order-recommendations-head h3 {
  font-size: 16px;
  margin: 2px 0 3px;
}

.order-recommendations-head p,
.order-recommendations-empty {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}

.order-recommendations-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  min-width: 0;
}

.order-recommendations-panel.compact .order-recommendations-grid {
  grid-auto-columns: minmax(230px, calc((100% - 24px) / 4));
  grid-auto-flow: column;
  grid-template-columns: none;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 2px 2px 8px;
  scroll-snap-type: x proximity;
}

.order-recommendations-panel.compact .order-recommendation-card {
  scroll-snap-align: start;
}

.order-catalog-recommendations-panel .order-recommendations-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  max-height: 188px;
  overflow: auto;
  padding-right: 2px;
}

.order-recommendation-card {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  display: grid;
  gap: 9px;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  min-height: 84px;
  min-width: 0;
  padding: 9px;
  position: relative;
}

.order-recommendation-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.1);
}

.order-recommendation-card .product-corner-link {
  left: 34px;
  right: auto;
  top: 6px;
}

.order-recommendation-thumb {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  border-radius: 7px;
  display: inline-flex;
  height: 46px;
  justify-content: center;
  overflow: hidden;
  width: 46px;
}

.order-recommendation-thumb img {
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.order-recommendation-thumb > span {
  color: #667085;
  font-size: 12px;
  font-weight: 900;
}

.order-recommendation-body {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding-right: 16px;
}

.order-recommendation-body strong,
.order-recommendation-body small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-recommendation-body small {
  color: var(--muted);
  font-size: 11px;
}

.order-recommendation-meta,
.order-recommendation-reasons {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.order-recommendation-meta > span:first-child {
  font-weight: 800;
}

.order-recommendation-reasons span {
  background: #eef2ff;
  border: 1px solid #dbe5ff;
  border-radius: 999px;
  color: #3730a3;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  padding: 4px 6px;
}

.order-recommendation-card .primary.small {
  min-height: 32px;
  padding: 0 10px;
  white-space: nowrap;
}

.order-catalog-search input {
  margin-top: 6px;
}

.order-catalog-filter-section {
  border-top: 1px solid #eef0f5;
  display: grid;
  gap: 10px;
  padding-top: 12px;
}

.order-catalog-category-list {
  display: grid;
  gap: 6px;
  max-height: 390px;
  overflow: auto;
}

.order-catalog-category-list button {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e4e7ec;
  border-radius: 6px;
  color: #101828;
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 34px;
  padding: 7px 8px 7px calc(8px + var(--category-level, 0) * 12px);
  text-align: left;
}

.order-catalog-category-list button.active {
  background: #f4f3ff;
  border-color: #a78bfa;
  box-shadow: inset 3px 0 0 #6d5dfc;
  color: #4338ca;
  font-weight: 800;
}

.order-catalog-category-list span,
.order-catalog-card h3,
.order-catalog-cart-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
}

.order-catalog-category-list span,
.order-catalog-cart-info strong {
  white-space: nowrap;
}

.order-catalog-category-list strong {
  color: #667085;
  font-size: 11px;
}

.order-catalog-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.order-catalog-tabs button {
  background: #ffffff;
  border: 1px solid #e4e7ec;
  border-radius: 6px;
  color: #344054;
  cursor: pointer;
  font: inherit;
  min-height: 34px;
  padding: 0 11px;
}

.order-catalog-tabs button.active,
.order-catalog-pagination button.active {
  background: #f4f3ff;
  border-color: #a78bfa;
  color: #4f46e5;
  font-weight: 800;
}

.order-catalog-grid {
  align-content: start;
  display: grid;
  gap: 10px;
  grid-auto-rows: minmax(300px, auto);
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  min-height: 0;
  overflow: auto;
  padding-right: 3px;
}

.order-catalog-card {
  background: #ffffff;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  grid-template-rows: 84px minmax(148px, 1fr) auto;
  min-height: 300px;
  min-width: 0;
  overflow: hidden;
  position: relative;
}

.order-catalog-card:hover {
  border-color: #a78bfa;
  box-shadow: 0 12px 30px rgba(79, 70, 229, 0.12);
}

.order-catalog-card.in-cart {
  border-color: #4f46e5;
  box-shadow: inset 0 0 0 1px #4f46e5, 0 12px 28px rgba(79, 70, 229, 0.12);
}

.order-catalog-card.stock-problem {
  border-color: #fbbf24;
}

.order-catalog-card.stock-problem:hover {
  border-color: #f59e0b;
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.16);
}

.order-catalog-quick-add {
  align-items: center;
  background: #4f46e5;
  border: 1px solid #4338ca;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.25);
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font-size: 20px;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  line-height: 1;
  position: absolute;
  right: 8px;
  top: 8px;
  width: 34px;
  z-index: 2;
}

.order-catalog-card.in-cart .order-catalog-quick-add {
  background: #16a34a;
  border-color: #12823d;
}

.product-corner-link {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d7def0;
  border-radius: 999px;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
  color: #4f46e5;
  cursor: pointer;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  height: 24px;
  justify-content: center;
  line-height: 1;
  opacity: 0.88;
  position: absolute;
  right: 6px;
  top: 6px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease, transform 0.16s ease;
  width: 24px;
  z-index: 3;
}

.product-corner-link:hover,
.product-corner-link:focus-visible {
  border-color: #4f46e5;
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.18);
  opacity: 1;
  outline: none;
  transform: translateY(-1px);
}

.order-catalog-card .product-corner-link {
  right: 46px;
  top: 9px;
}

.order-catalog-card-media {
  align-items: center;
  background: #f8fafc;
  color: #667085;
  display: flex;
  font-size: 34px;
  font-weight: 800;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
}

.order-catalog-card-media img {
  height: 100%;
  object-fit: contain;
  padding: 6px;
  width: 100%;
}

.order-catalog-card-body {
  align-content: start;
  display: grid;
  gap: 5px;
  min-height: 0;
  padding: 8px 10px 9px;
}

.order-catalog-card h3 {
  display: -webkit-box;
  font-size: 13px;
  line-height: 1.3;
  margin: 0 0 2px;
  min-height: 34px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.order-catalog-card p,
.order-catalog-card-meta,
.order-catalog-price-row span,
.order-catalog-cart-info small {
  color: #667085;
  font-size: 12px;
  line-height: 1.35;
  margin: 0;
}

.order-catalog-card-meta,
.order-catalog-price-row {
  display: grid;
  gap: 3px;
}

.order-catalog-card-meta {
  align-content: start;
  min-height: 43px;
}

.order-catalog-card-meta > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-catalog-stock {
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  padding: 4px 7px;
  width: fit-content;
}

.order-catalog-stock.success {
  background: #ecfdf3;
  color: #067647;
}

.order-catalog-stock.warning {
  background: #fffaeb;
  color: #b54708;
}

.order-catalog-stock.danger {
  background: #fef3f2;
  color: #b42318;
}

.order-catalog-price-row strong {
  color: #0f172a;
  display: block;
  font-size: 18px;
  line-height: 1.15;
  overflow-wrap: anywhere;
  white-space: normal;
}

.order-catalog-price-row span {
  font-weight: 700;
}

.order-catalog-cart-badge {
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  color: #3730a3;
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  justify-self: start;
  padding: 4px 8px;
}

.order-catalog-card-actions {
  align-items: center;
  align-self: end;
  background: #ffffff;
  border-top: 1px solid #eef0f5;
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(86px, 0.85fr) minmax(88px, 1fr);
  padding: 7px 9px;
}

.order-catalog-card-actions .primary.small {
  font-size: 12px;
  line-height: 1.15;
  min-height: 32px;
  padding: 5px 8px;
  white-space: normal;
  width: 100%;
}

.order-catalog-stepper {
  align-items: center;
  border: 1px solid #e4e7ec;
  border-radius: 6px;
  display: grid;
  grid-template-columns: 24px minmax(34px, 1fr) 24px;
  min-height: 32px;
  overflow: hidden;
}

.order-catalog-stepper button {
  background: #ffffff;
  border: 0;
  color: #4f46e5;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  min-height: 30px;
}

.order-catalog-stepper input {
  appearance: textfield;
  border: 0;
  border-left: 1px solid #e4e7ec;
  border-right: 1px solid #e4e7ec;
  height: 30px;
  min-width: 0;
  padding: 0 4px;
  text-align: center;
}

.order-catalog-stepper input::-webkit-outer-spin-button,
.order-catalog-stepper input::-webkit-inner-spin-button,
.order-catalog-cart-controls input[type="number"]::-webkit-outer-spin-button,
.order-catalog-cart-controls input[type="number"]::-webkit-inner-spin-button {
  appearance: none;
  margin: 0;
}

.order-catalog-cart-controls input[type="number"] {
  appearance: textfield;
}

.order-catalog-cart-panel {
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
}

.order-catalog-cart-list {
  align-content: start;
  display: grid;
  gap: 6px;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.order-catalog-cart-row {
  align-items: start;
  align-self: start;
  border: 1px solid #e4e7ec;
  border-radius: 7px;
  display: grid;
  gap: 6px 8px;
  grid-template-columns: 34px minmax(0, 1fr) max-content;
  height: max-content;
  padding: 7px;
  padding-right: 30px;
  position: relative;
}

.order-catalog-cart-thumb {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  border-radius: 6px;
  color: #667085;
  display: inline-flex;
  font-size: 10px;
  font-weight: 800;
  height: 34px;
  justify-content: center;
  overflow: hidden;
  width: 34px;
}

.order-catalog-cart-thumb img {
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.order-catalog-cart-info,
.order-catalog-cart-controls,
.order-catalog-cart-sum {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.order-catalog-cart-info {
  align-self: start;
}

.order-catalog-cart-info strong {
  display: -webkit-box;
  font-size: 12px;
  line-height: 1.22;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.order-catalog-cart-info small {
  font-size: 10.5px;
}

.order-catalog-cart-info .order-catalog-stock {
  font-size: 10px;
  padding: 2px 6px;
}

.order-catalog-cart-controls {
  align-items: end;
  grid-column: 2 / 4;
  grid-row: 2;
  grid-template-columns: 82px 92px;
  justify-content: start;
  justify-self: start;
  max-width: 184px;
  width: max-content;
}

.order-catalog-cart-controls label {
  color: #667085;
  display: grid;
  font-size: 11px;
  gap: 3px;
  min-width: 0;
}

.order-catalog-cart-row .order-catalog-stepper {
  grid-template-columns: 24px 34px 24px;
  min-height: 28px;
  width: 82px;
}

.order-catalog-cart-row .order-catalog-stepper button {
  min-height: 26px;
}

.order-catalog-cart-row .order-catalog-stepper input {
  height: 26px;
}

.order-catalog-cart-controls input[data-order-catalog-cart-price] {
  font-size: 12px;
  min-height: 28px;
  padding: 3px 5px;
  text-align: right;
  width: 92px;
}

.order-catalog-cart-sum {
  align-self: start;
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  justify-items: end;
  min-width: 76px;
  text-align: right;
}

.order-catalog-cart-sum strong {
  font-size: 12px;
  white-space: nowrap;
}

.order-catalog-cart-sum .link-button {
  font-size: 11px;
  padding: 0;
}

.order-catalog-summary {
  border-top: 1px solid #eef0f5;
  display: grid;
  gap: 8px;
  padding-top: 10px;
}

.order-catalog-summary > div:not(.order-catalog-warning) {
  display: flex;
  justify-content: space-between;
}

.order-catalog-summary .total {
  color: #4f46e5;
  font-size: 17px;
  font-weight: 800;
}

.order-catalog-warning {
  background: #fef3f2;
  border: 1px solid #fecdca;
  border-radius: 8px;
  color: #b42318;
  font-size: 12px;
  line-height: 1.35;
  padding: 8px;
}

.order-catalog-empty,
.order-catalog-no-results {
  align-self: start;
  background: #f8fafc;
  border: 1px dashed #d0d5dd;
  border-radius: 8px;
  color: #667085;
  margin: 0;
  padding: 14px;
}

.order-catalog-no-results {
  grid-column: 1 / -1;
}

.order-catalog-commit {
  width: 100%;
}

.order-catalog-pagination {
  border-top: 1px solid #eef0f5;
  color: #667085;
  flex-wrap: wrap;
  font-size: 12px;
  padding-top: 10px;
}

.order-catalog-page-gap {
  color: #667085;
  padding: 0 4px;
}

.confirm-dialog-actions {
  border-top: 1px solid var(--line);
  justify-content: flex-end;
  padding-top: 12px;
}

.journal-payment-head {
  align-items: start;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding-bottom: 12px;
}

.journal-payment-head h2 {
  margin-top: 2px;
}

.journal-payment-stats {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.journal-payment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.compact-notice {
  margin: 0;
}

.audit-panel {
  display: grid;
  gap: 14px;
  overflow: auto;
}

.audit-filter-grid {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 1.2fr) minmax(150px, 0.7fr) minmax(150px, 0.7fr) minmax(130px, 0.55fr) minmax(130px, 0.55fr) auto;
}

.audit-filter-grid button {
  padding: 0 14px;
}

.audit-table {
  min-width: 920px;
}

.audit-table th:nth-child(1),
.audit-table td:nth-child(1) {
  width: 150px;
}

.audit-table th:nth-child(2),
.audit-table td:nth-child(2) {
  width: 130px;
}

.audit-table th:nth-child(3),
.audit-table td:nth-child(3) {
  width: 130px;
}

.customer-layout {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(280px, 360px) minmax(620px, 1fr);
}

.customer-list,
.customer-card {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.customer-list {
  position: sticky;
  top: 16px;
}

.customer-list-items {
  display: grid;
  gap: 8px;
  max-height: calc(100vh - 210px);
  overflow: auto;
}

.customer-group-filter-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.customer-group-filter-row::-webkit-scrollbar {
  display: none;
}

.customer-group-chip {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font: inherit;
  gap: 6px;
  min-height: 34px;
  padding: 6px 10px;
}

.customer-group-chip small {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: 11px;
  line-height: 1;
  padding: 3px 6px;
}

.customer-group-chip.is-active {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.group-manager {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 10px;
}

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

.group-manager-head span {
  color: var(--muted);
  font-size: 12px;
}

.group-manager-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(120px, 0.8fr) minmax(0, 1.2fr);
}

.group-manager-grid label {
  display: grid;
  gap: 4px;
}

.group-manager-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.group-manager-create-action {
  align-items: end;
  display: flex;
}

.group-manager-note {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}

.customer-group-admin-list {
  display: grid;
  gap: 8px;
}

.customer-group-admin-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 8px;
}

.customer-group-admin-head {
  align-items: start;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr);
}

.customer-group-admin-title {
  all: unset;
  cursor: pointer;
  display: grid;
  gap: 2px;
  min-width: 0;
}

.customer-group-admin-title strong {
  color: var(--ink);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-group-admin-title span {
  color: var(--muted);
  font-size: 12px;
}

.customer-group-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.customer-group-member-list {
  display: grid;
  gap: 5px;
}

.customer-group-member {
  align-items: center;
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.customer-group-member .link-button {
  min-width: 0;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-row {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 58px;
  padding: 9px 10px;
  text-align: left;
  width: 100%;
}

.customer-row-main {
  all: unset;
  cursor: pointer;
  min-width: 0;
}

.customer-row-main span {
  display: block;
  min-width: 0;
}

.customer-row:hover,
.customer-row.active {
  background: #eef8f1;
}

.customer-row.active {
  border-color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}

.customer-row small,
.customer-row-money small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-unified-documents {
  grid-column: 1 / -1;
}

.unified-document-list {
  display: grid;
  gap: 8px;
}

.unified-document-row {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(128px, 0.55fr) minmax(0, 1.4fr) minmax(130px, 0.55fr);
  padding: 10px;
}

.unified-document-row:hover {
  border-color: #bfdbfe;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.unified-document-type,
.unified-document-main,
.unified-document-side {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.unified-document-main strong,
.unified-document-main span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.unified-document-type small,
.unified-document-main span,
.unified-document-side small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.unified-document-side {
  justify-items: end;
  text-align: right;
}

.unified-document-side small.warning {
  color: #a15c00;
}

.unified-document-side small.success {
  color: #047857;
}

.unified-document-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.customer-row-group {
  color: #1d4ed8 !important;
}

.customer-row-money {
  align-items: end;
  display: grid;
  gap: 4px;
  text-align: right;
}

.tiny-button {
  min-height: 28px;
  padding: 4px 8px;
  font-size: 11px;
}

.customer-stats {
  grid-template-columns: repeat(4, minmax(130px, 1fr));
}

.customer-pay-form {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 0.7fr) minmax(260px, 1fr) auto;
}

.customer-pay-main {
  display: grid;
  gap: 8px;
}

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

.draft-note-line {
  grid-column: 1 / -1;
}

.order-note-box,
.document-note {
  background: #fffdf5;
  border: 1px solid #ead79a;
  border-radius: 8px;
  color: #5f4600;
  padding: 10px 12px;
}

.order-note-box {
  display: grid;
  gap: 4px;
}

.order-note-box span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.document-note {
  margin: 10px 0;
}

.bundle-editor,
.bundle-info {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-column: 1 / -1;
  padding: 12px;
}

.bundle-component-picker {
  display: grid;
  gap: 6px;
  min-width: 320px;
}

.bundle-component-results {
  max-height: 260px;
  overflow: auto;
}

.bundle-breakdown {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  gap: 2px;
  margin-top: 6px;
}

.sku-fix-dialog {
  max-width: 880px;
}

.sku-fix-product-card {
  align-items: center;
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 12px;
  padding: 10px;
}

.sku-fix-product-card img {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  height: 72px;
  object-fit: contain;
  width: 72px;
}

.sku-fix-create-form {
  margin-top: 0;
}

.suggest-chip {
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  min-height: 28px;
  padding: 4px 9px;
}

.suggest-chip:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.suggest-chip.active {
  background: #e7f0ff;
  border-color: #7da7f7;
  color: #1d4ed8;
  box-shadow: inset 0 0 0 1px #7da7f7;
}

.suggest-chip.total {
  background: #fff2d6;
  border-color: #f4c45f;
  color: #8a4b00;
}

.suggest-chip.total.active {
  background: #ffe8a8;
  border-color: #d89a00;
  color: #7a3f00;
}

.selected-payment-sum {
  align-items: center;
  color: var(--accent-dark);
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  min-height: 28px;
}

.customer-edit-form {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(180px, 0.8fr) minmax(420px, 1.5fr) minmax(220px, 0.9fr) auto auto auto;
  margin: 14px 0;
}

.customer-internal-note-field {
  grid-column: 1 / -1;
}

.customer-internal-note-field textarea {
  min-height: 78px;
  resize: vertical;
}

.customer-internal-note-field small {
  color: var(--muted);
  font-size: 12px;
}

.customer-internal-note-badge {
  align-items: center;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  color: #9a3412;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  gap: 4px;
  margin-left: 6px;
  padding: 2px 7px;
  vertical-align: middle;
  white-space: nowrap;
}

.customer-business-type-badge {
  align-items: center;
  background: #eef4ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  margin-top: 4px;
  max-width: 190px;
  min-height: 20px;
  overflow: hidden;
  padding: 2px 7px;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.customer-internal-note-alert {
  align-items: start;
  background: #fff7ed;
  border: 1px solid #fdba74;
  border-left: 4px solid #f97316;
  border-radius: 8px;
  color: #7c2d12;
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 12px 14px;
}

.customer-internal-note-alert.compact {
  margin: 10px 0;
  padding: 10px 12px;
}

.customer-internal-note-alert span,
.customer-internal-note-alert small {
  color: #9a3412;
  display: block;
  font-size: 12px;
}

.customer-internal-note-alert strong {
  color: #431407;
  display: block;
  font-size: 15px;
  line-height: 1.35;
  margin-top: 3px;
  white-space: pre-wrap;
}

.customer-internal-note-icon {
  align-items: center;
  background: #f97316;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-weight: 900;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.customer-phone-editor {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
}

.customer-phone-editor > * {
  min-width: 0;
}

.customer-phone-editor-head {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
  width: 100%;
}

.customer-phone-editor-head > div {
  min-width: 0;
}

.customer-phone-editor-head strong,
.customer-phone-editor-head span {
  display: block;
}

.customer-phone-editor-head span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.customer-phone-rows {
  display: grid;
  gap: 7px;
}

.customer-phone-row {
  align-items: center;
  display: grid;
  gap: 5px;
  grid-template-columns: 82px minmax(112px, 1fr) minmax(86px, 0.55fr) auto;
  min-width: 0;
  width: 100%;
}

.customer-phone-row input,
.customer-phone-row button,
.customer-phone-primary {
  font-size: 12px;
  min-width: 0;
}

.customer-phone-row input {
  padding-left: 7px;
  padding-right: 7px;
}

.customer-phone-row input[data-customer-phone-value] {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.customer-phone-row .danger-button {
  padding-left: 7px;
  padding-right: 7px;
}

.customer-phone-primary {
  align-items: center;
  display: inline-flex;
  gap: 6px;
  margin: 0;
  min-width: 0;
}

.customer-phone-primary input {
  width: auto;
}

.customer-phone-primary span {
  border-radius: 999px;
  padding: 2px 6px;
}

.customer-phone-primary.is-primary span {
  background: #ecfdf3;
  color: #067647;
  font-weight: 800;
}

.customer-phone-primary.is-extra span {
  background: #f2f4f7;
  color: #475467;
  font-weight: 700;
}

.customer-sections {
  display: grid;
  gap: 18px;
}

.customer-payment-allocation {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}

.customer-payment-allocation strong {
  color: var(--accent-dark);
}

.customer-payment-advance {
  background: #fff2d6;
  border: 1px solid #f4c45f;
  color: #8a4b00;
  font-weight: 700;
  white-space: nowrap;
}

.customer-payment-editor-row td {
  background: #f8fafc;
  padding: 0;
}

.customer-payment-editor {
  background: #f8fafc;
  border: 1px solid #d0d5dd;
  border-radius: 14px;
  display: grid;
  gap: 14px;
  margin: 8px;
  padding: 14px;
}

.customer-payment-editor-head,
.customer-payment-editor-actions {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.customer-payment-editor-head strong {
  display: block;
  font-size: 16px;
}

.customer-payment-editor-head span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  margin-top: 3px;
}

.customer-payment-editor-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
}

.customer-payment-editor-note {
  grid-column: 1 / -1;
}

.customer-payment-editor-list {
  display: grid;
  gap: 10px;
}

.customer-payment-editor-doc {
  align-items: center;
  background: #fff;
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) 150px;
  padding: 12px;
}

.customer-payment-editor-doc.active {
  background: #ecfdf3;
  border-color: #86efac;
}

.customer-payment-editor-doc-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.customer-payment-editor-doc-main strong,
.customer-payment-editor-doc-main span,
.customer-payment-editor-doc-main small {
  min-width: 0;
}

.customer-payment-editor-doc-main span,
.customer-payment-editor-doc-main small {
  color: var(--muted);
}

.customer-payment-editor-doc label {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  gap: 5px;
}

.customer-payment-editor-doc input {
  font-size: 15px;
  font-weight: 800;
  text-align: right;
}

.customer-payment-editor-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
}

.customer-payment-editor-summary span {
  background: #fff;
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  display: grid;
  gap: 4px;
  padding: 12px;
}

.customer-payment-editor-summary small {
  color: var(--muted);
}

.customer-payment-editor-summary strong {
  color: var(--accent-dark);
  font-size: 18px;
}

.customer-payment-editor-warning {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  color: #9a3412;
  font-weight: 800;
  padding: 10px 12px;
}

.danger-link {
  color: #b42318;
}

.purchase-layout {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(280px, 360px) minmax(540px, 1fr);
  margin-bottom: 16px;
}

.purchase-layout.single {
  grid-template-columns: minmax(0, 1fr);
}

.purchase-history {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(320px, 1fr);
}

.purchase-history.has-selection {
  grid-template-columns: minmax(320px, 0.8fr) minmax(520px, 1.2fr);
}

.purchase-stage {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.supplier-form,
.purchase-form {
  display: grid;
  gap: 12px;
}

.purchase-head {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(160px, 1fr) minmax(120px, 0.55fr) minmax(160px, 1fr);
}

.purchase-line-form {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(180px, 1fr) minmax(90px, 0.35fr) minmax(100px, 0.4fr) auto;
}

.purchase-catalog-launcher {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 14px;
}

.purchase-catalog-launcher div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.purchase-catalog-launcher strong {
  color: var(--ink);
  font-size: 15px;
}

.purchase-catalog-launcher span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

#purchase-form .purchase-line-form,
#purchase-edit-form .purchase-line-form {
  display: none;
}

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

.purchase-product-picker button {
  min-height: 38px;
}

.section-head {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.section-head p {
  color: var(--muted);
  margin: 4px 0 0;
}

.purchase-price-hint {
  background: #f7faf8;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 10px 12px;
}

.purchase-price-hint span {
  color: var(--muted);
  font-size: 12px;
}

.purchase-price-hint strong {
  color: var(--ink);
}

.supplier-row,
[data-select-purchase-receipt] {
  cursor: pointer;
}

.supplier-row:hover td,
[data-select-purchase-receipt]:hover td {
  background: #f4fbf6;
}

.purchase-receipt-detail {
  min-width: 0;
}

.supplier-finance-card {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.supplier-stats {
  grid-template-columns: repeat(4, minmax(130px, 1fr));
}

.supplier-sections {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.supplier-ledger {
  min-width: 0;
  overflow: auto;
}

.supplier-ledger table {
  min-width: 780px;
}

.supplier-directory {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
}

.supplier-directory-main {
  display: grid;
  gap: 14px;
  min-width: 0;
}

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

.supplier-directory-head h2 {
  font-size: 28px;
  margin: 0;
}

.supplier-directory-head p {
  color: var(--muted);
  margin: 4px 0 0;
}

.supplier-directory-toolbar {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(260px, 1fr) minmax(160px, 220px);
  padding: 12px;
}

.supplier-list-panel {
  overflow: hidden;
  padding: 0;
}

.supplier-directory-table {
  border: 0;
}

.supplier-directory-table th,
.supplier-directory-table td {
  padding: 12px 14px;
}

.supplier-directory-table td:first-child {
  min-width: 180px;
}

.supplier-table-footer {
  color: var(--muted);
  font-size: 12px;
  padding: 12px 14px;
}

.supplier-directory-card {
  display: grid;
  gap: 16px;
  max-height: calc(100vh - 120px);
  overflow: auto;
  position: sticky;
  top: 12px;
}

.supplier-directory-card.empty {
  min-height: 220px;
}

.supplier-card-head {
  align-items: start;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding-bottom: 12px;
}

.supplier-card-head h2 {
  font-size: 20px;
  margin: 4px 0 0;
}

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

.supplier-card-fields div {
  display: grid;
  gap: 4px;
  grid-template-columns: minmax(120px, 0.6fr) minmax(0, 1fr);
}

.supplier-card-fields span {
  color: var(--muted);
}

.supplier-card-fields strong {
  font-weight: 700;
  min-width: 0;
  overflow-wrap: anywhere;
}

.supplier-card-tabs {
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 8px;
  overflow: auto;
}

.supplier-card-tabs button {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: var(--muted);
  padding: 10px 6px;
  white-space: nowrap;
}

.supplier-card-tabs button.active {
  border-bottom-color: var(--accent);
  color: var(--accent-dark);
}

.supplier-card-tab-body {
  min-width: 0;
  overflow: auto;
}

.supplier-card-receipts {
  min-width: 520px;
}

.supplier-card-document {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 10px 0;
}

.supplier-card-document span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-top: 3px;
}

.supplier-card-summary {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.supplier-card-summary div {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.supplier-card-summary span {
  color: var(--muted);
  display: block;
  font-size: 12px;
}

.supplier-card-summary strong {
  display: block;
  font-size: 14px;
  margin-top: 4px;
}

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

.supplier-edit-form,
.supplier-create-panel {
  display: grid;
  gap: 12px;
}

.supplier-edit-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.supplier-edit-grid.single {
  grid-template-columns: minmax(0, 1fr);
}

.supplier-documents-workspace {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
}

.supplier-documents-main {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.supplier-order-toolbar {
  grid-template-columns: minmax(260px, 1fr) minmax(150px, 190px) minmax(180px, 240px);
}

.purchase-receipt-toolbar {
  grid-template-columns: minmax(280px, 1fr) minmax(150px, 190px) minmax(190px, 260px);
}

.purchase-receipt-v2-kpis {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
}

.purchase-receipts-workspace-v2 .supplier-order-editor-panel {
  overflow: visible;
}

.purchase-receipt-card-v2 .print-document {
  display: none;
}

.supplier-document-row {
  cursor: pointer;
}

.supplier-document-row:hover td {
  background: #f4fbf6;
}

.supplier-document-card {
  display: grid;
  gap: 16px;
  max-height: calc(100vh - 120px);
  overflow: auto;
  position: sticky;
  top: 12px;
}

.supplier-document-card h3 {
  font-size: 14px;
  margin: 0 0 8px;
}

.supplier-document-card.empty {
  min-height: 220px;
}

.supplier-document-note {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  line-height: 1.4;
  padding: 10px;
}

.supplier-document-actions {
  display: grid;
  gap: 10px;
}

.as-button {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  text-decoration: none;
}

.supplier-order-editor-panel .product-purchase-history {
  display: none;
}

.supplier-order-editor-toolbar {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 10px 12px;
}

.supplier-order-editor-toolbar span {
  color: var(--ink);
  font-weight: 800;
}

.mini-stats,
.product-finance-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.mini-stats div,
.product-finance-grid div {
  background: #f7faf8;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 10px;
}

.mini-stats span,
.product-finance-grid span {
  color: var(--muted);
  font-size: 12px;
}

.mini-stats strong,
.product-finance-grid strong {
  font-size: 15px;
}

.product-purchase-history {
  display: grid;
  gap: 8px;
}

.product-purchase-history h3 {
  margin: 2px 0 0;
}

.catalog-command {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 16px;
}

.catalog-command h2 {
  margin-top: 2px;
}

.catalog-command p {
  color: var(--muted);
  margin: 6px 0 0;
}

.catalog-cart {
  align-items: center;
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  grid-template-columns: auto auto;
  min-width: 210px;
  padding: 10px;
}

.catalog-cart span {
  color: var(--muted);
  font-size: 12px;
}

.catalog-cart strong {
  font-size: 24px;
  text-align: right;
}

.catalog-cart button {
  grid-column: 1 / -1;
}

.catalog-workspace {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(200px, 240px) minmax(360px, 1fr) minmax(250px, 300px);
  min-width: 0;
}

.catalog-sidebar,
.catalog-products-panel,
.catalog-preview {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
}

.catalog-sidebar,
.catalog-preview {
  display: grid;
  gap: 12px;
  padding: 12px;
  position: sticky;
  top: 16px;
}

.catalog-products-panel {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.catalog-products-head {
  align-items: start;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding-bottom: 10px;
}

.catalog-products-head h3,
.catalog-sidebar h3 {
  margin: 0;
}

.catalog-products-head p {
  margin-top: 3px;
}

.catalog-search-box input {
  margin-top: 6px;
}

.catalog-sidebar-section {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  padding-top: 12px;
}

.catalog-category-list {
  display: grid;
  gap: 6px;
  max-height: 360px;
  overflow: auto;
  padding-right: 2px;
}

.catalog-category-list button {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 34px;
  padding: 7px 9px;
  text-align: left;
}

.catalog-category-list button.active {
  border-color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
  color: var(--accent-dark);
  font-weight: 700;
}

.catalog-category-list span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-category-list strong {
  color: var(--muted);
  font-size: 12px;
}

.order-catalog-category-list .category-tree-row,
.catalog-category-list .category-tree-row {
  align-items: center;
  display: grid;
  gap: 4px;
  grid-template-columns: 26px minmax(0, 1fr);
  padding-left: calc(var(--category-level, 0) * 14px);
}

.order-catalog-category-list .category-tree-toggle,
.catalog-category-list .category-tree-toggle {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  font-size: 17px;
  font-weight: 800;
  height: 34px;
  justify-content: center;
  min-height: 34px;
  padding: 0;
  width: 26px;
}

.order-catalog-category-list .category-tree-toggle.empty,
.catalog-category-list .category-tree-toggle.empty {
  background: transparent;
  border-color: transparent;
  cursor: default;
}

.order-catalog-category-list .category-tree-select,
.catalog-category-list .category-tree-select {
  padding: 7px 8px;
}

.order-catalog-category-list .category-tree-select span,
.catalog-category-list .category-tree-select span {
  min-width: 0;
}

.catalog-admin-tools {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.catalog-admin-tools summary {
  cursor: pointer;
  font-weight: 700;
}

.catalog-admin-tools .category-create,
.catalog-admin-tools .category-manager {
  margin: 10px 0 0;
}

.catalog-admin-tools .category-create {
  grid-template-columns: 1fr;
}

.catalog-admin-tools .category-manager-list {
  grid-template-columns: 1fr;
}

.catalog-toolbar {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(260px, 1.3fr) minmax(180px, 0.8fr) minmax(160px, 0.7fr) minmax(150px, 0.65fr);
  margin-bottom: 12px;
}

.catalog-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.catalog-chips button {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  min-height: 34px;
  padding: 0 12px;
}

.catalog-chips button.active {
  border-color: var(--accent);
  color: var(--accent-dark);
  font-weight: 700;
}

.category-create {
  align-items: end;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 1fr) auto;
  margin-bottom: 14px;
  padding: 12px;
}

.category-manager {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
}

.category-manager-list {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.category-manager-row {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-width: 0;
  padding: 8px 10px;
}

.category-manager-row span {
  display: grid;
  min-width: 0;
}

.category-manager-row strong,
.category-manager-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-manager-row small {
  color: var(--muted);
  font-size: 12px;
}

.catalog-grid {
  align-items: stretch;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
}

.catalog-pagination,
.catalog-pagination > div {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  min-width: 0;
}

.catalog-pagination {
  border-top: 1px solid var(--line);
  color: var(--muted);
  flex-wrap: wrap;
  font-size: 12px;
  padding-top: 10px;
}

.catalog-pagination select {
  min-height: 34px;
  width: auto;
}

.catalog-pagination button.active {
  border-color: var(--accent);
  color: var(--accent);
}

.catalog-page-gap {
  color: var(--muted);
  padding: 0 4px;
}

.catalog-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  grid-template-rows: 118px 1fr auto;
  min-width: 0;
  overflow: hidden;
}

.catalog-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(25, 135, 84, 0.12);
}

.catalog-media {
  align-items: center;
  background: #eef3f8;
  color: #344054;
  display: flex;
  font-size: 34px;
  font-weight: 700;
  justify-content: center;
}

.catalog-media img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.catalog-card-body {
  display: grid;
  gap: 6px;
  padding: 9px;
}

.catalog-card-head,
.catalog-card-actions {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.catalog-card-head span,
.catalog-meta,
.catalog-card-body p {
  color: var(--muted);
  font-size: 12px;
}

.catalog-card-body h3 {
  font-size: 13px;
  line-height: 1.25;
  margin: 0;
}

.catalog-card-body p {
  margin: 0;
  min-height: 28px;
  overflow: hidden;
}

.catalog-stock-badge {
  border-radius: 999px;
  justify-self: start;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 700;
}

.catalog-stock-badge.success {
  background: #eef8f1;
  color: var(--accent-dark);
}

.catalog-stock-badge.warning {
  background: #fff7d6;
  color: #775200;
}

.catalog-stock-badge.danger {
  background: #fee2e2;
  color: #7f1d1d;
}

.catalog-stock-badge.info {
  background: #eff6ff;
  color: #1d4ed8;
}

.catalog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.catalog-meta span {
  background: #f6f7f9;
  border-radius: 999px;
  padding: 3px 7px;
}

.catalog-card-actions {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 7px;
  padding: 8px 9px;
}

.catalog-card-actions button {
  padding: 0 10px;
}

.catalog-card-actions strong {
  font-size: 13px;
}

.catalog-preview-head h2 {
  font-size: 18px;
  line-height: 1.2;
  margin: 4px 0 0;
}

.catalog-preview-media {
  align-items: center;
  background: #eef3f8;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #344054;
  display: flex;
  font-size: 42px;
  font-weight: 800;
  justify-content: center;
  min-height: 230px;
  overflow: hidden;
}

.catalog-preview-media img {
  height: 100%;
  object-fit: contain;
  width: 100%;
}

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

.catalog-preview-stats > div,
.catalog-preview-info > div {
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 9px;
}

.catalog-preview-stats span,
.catalog-preview-info span {
  color: var(--muted);
  font-size: 12px;
}

.catalog-preview-stats strong,
.catalog-preview-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.catalog-preview-note {
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0;
  padding: 10px;
}

.catalog-preview-actions {
  display: grid;
  gap: 8px;
}

.catalog-empty {
  grid-column: 1 / -1;
}

.price-list-builder {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
}

.price-list-controls,
.price-list-preview {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
  padding: 14px;
}

.price-list-controls {
  display: grid;
  gap: 12px;
}

.price-list-grid {
  display: grid;
  gap: 10px;
}

.price-list-switches {
  display: grid;
  gap: 6px;
}

.price-list-category-head,
.price-list-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
}

.price-list-category-head > div,
.price-list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.price-list-categories {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  max-height: 420px;
  overflow: auto;
}

.price-list-category {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 8px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 8px 10px;
}

.price-list-category:last-child {
  border-bottom: 0;
}

.price-list-category span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.price-list-category strong {
  color: var(--muted);
  font-size: 12px;
}

.price-list-preview {
  display: grid;
  gap: 12px;
}

.price-list-table-shell {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
}

.price-list-table {
  min-width: 820px;
}

.price-list-table th:nth-child(1),
.price-list-table td:nth-child(1) {
  width: 150px;
}

.price-list-table th:nth-child(2),
.price-list-table td:nth-child(2) {
  min-width: 360px;
}

.price-list-group-row td {
  background: #ddefe7;
  color: #143b2d;
  font-weight: 800;
}

.warehouse-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1.2fr) minmax(160px, 0.5fr) minmax(110px, 0.35fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

.toolbar-stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 34px;
  padding: 5px 9px;
}

.toolbar-stat span {
  color: var(--muted);
  display: block;
  font-size: 12px;
}

.toolbar-stat strong {
  font-size: 16px;
}

.button-link {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  text-decoration: none;
}

.ghost.button-link {
  padding: 0 12px;
}

.product-thumb,
.product-detail-thumb {
  align-items: center;
  background: #eef1f5;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  height: 36px;
  justify-content: center;
  margin-right: 8px;
  overflow: hidden;
  vertical-align: middle;
  width: 36px;
}

.product-thumb img,
.product-detail-thumb img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.product-detail-thumb {
  height: 58px;
  margin-right: 10px;
  width: 58px;
}

.supplier-order-workarea {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.supplier-order-summary-cards {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(108px, 1fr));
  min-width: min(420px, 100%);
}

.supplier-order-head-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 0.45fr) minmax(260px, 1fr);
}

.supplier-order-layout {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(340px, 0.95fr) minmax(420px, 1.05fr);
  min-width: 0;
}

.inventory-document-bar {
  align-items: end;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(150px, 0.8fr) minmax(130px, 0.55fr) minmax(170px, 0.75fr) minmax(220px, 1fr) auto;
  padding: 12px;
}

.inventory-layout {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(320px, 0.82fr) minmax(520px, 1.18fr);
  min-width: 0;
}

.inventory-summary-cards {
  grid-template-columns: repeat(3, minmax(120px, 1fr));
}

.inventory-product-list {
  max-height: 560px;
}

.inventory-product {
  text-align: left;
}

.inventory-lines {
  border-color: #26323f;
}

.inventory-lines-head .check-line {
  white-space: nowrap;
}

.inventory-table-shell {
  border: 1px solid var(--line);
  border-radius: 8px;
  max-height: 560px;
  overflow: auto;
}

.inventory-table {
  border: 0;
  margin: 0;
  min-width: 980px;
}

.inventory-product-cell {
  align-items: center;
  display: flex;
  gap: 8px;
  min-width: 260px;
}

.inventory-product-cell strong,
.inventory-product-cell span {
  display: block;
}

.inventory-product-cell span {
  color: var(--muted);
  font-size: 12px;
}

.inventory-actions,
.inventory-journal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.inventory-journal {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  overflow: hidden;
  padding: 12px;
}

.supplier-order-catalog,
.supplier-order-lines {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  min-width: 0;
  overflow: hidden;
  padding: 12px;
}

.supplier-order-lines {
  border-color: #26323f;
}

.supplier-panel-head {
  align-items: start;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 10px 12px;
}

.supplier-panel-head h3 {
  margin: 0;
}

.supplier-order-product-list {
  display: grid;
  gap: 8px;
  max-height: 520px;
  min-width: 0;
  overflow: auto;
  overflow-x: hidden;
}

.supplier-order-catalog .catalog-toolbar {
  grid-template-columns: minmax(0, 1fr) minmax(120px, 0.45fr);
  margin-bottom: 0;
  min-width: 0;
}

.supplier-order-catalog label {
  min-width: 0;
}

.supplier-order-catalog-cta {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 14px;
}

.supplier-order-catalog-cta div {
  display: grid;
  gap: 5px;
}

.supplier-order-catalog-cta strong {
  color: var(--ink);
  font-size: 15px;
}

.supplier-order-catalog-cta span,
.supplier-order-catalog-hints span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.supplier-order-catalog-hints {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.supplier-order-catalog-hints span {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
}

.supplier-order-product {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr) max-content;
  justify-self: stretch;
  max-width: 100%;
  min-width: 0;
  padding: 8px;
  width: 100%;
}

.supplier-order-product > div {
  min-width: 0;
}

.supplier-order-product strong,
.supplier-order-product span,
.supplier-order-product small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supplier-order-product span,
.supplier-order-product small {
  color: var(--muted);
}

.supplier-order-line-table td:first-child {
  min-width: 260px;
}

.negative-stock-summary {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
}

.negative-stock-batch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.reorder-summary {
  align-items: stretch;
}

.negative-stock-table td:nth-child(2) {
  min-width: 240px;
}

.negative-stock-table td:nth-child(2) .product-thumb {
  vertical-align: middle;
}

.negative-stock-include {
  text-align: center;
  width: 72px;
}

.negative-stock-quantity {
  max-width: 96px;
}

.negative-stock-table small {
  color: var(--muted);
  display: block;
  margin-top: 3px;
}

.negative-stock-row-skipped {
  opacity: 0.55;
}

.negative-stock-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.reorder-table th:nth-child(3),
.reorder-table td:nth-child(3),
.reorder-table th:nth-child(4),
.reorder-table td:nth-child(4) {
  width: 110px;
}

.reorder-table th:nth-child(5),
.reorder-table td:nth-child(5) {
  width: 150px;
}

.reorder-actions {
  min-width: 220px;
}

.reorder-workarea {
  gap: 14px;
}

.reorder-hero {
  align-items: stretch;
  background: #ffffff;
  border: 1px solid var(--line);
  border-left: 5px solid #b42318;
  border-radius: 8px;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.82fr);
  padding: 14px 16px;
}

.reorder-hero h2 {
  margin: 4px 0 0;
}

.reorder-kicker {
  color: #b42318;
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.reorder-stat-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(112px, 1fr));
}

.reorder-stat.attention {
  background: #fff1f1;
  border-color: #efb3b3;
}

.reorder-stat.attention strong {
  color: #b42318;
}

.reorder-action-bar {
  align-items: center;
  background: #fff7d6;
  border: 1px solid #e7c665;
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px;
}

.reorder-action-bar strong,
.reorder-action-bar span {
  display: block;
}

.reorder-action-bar span {
  color: #775200;
  font-size: 13px;
  margin-top: 2px;
}

.reorder-main-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.reorder-table-shell {
  border: 1px solid var(--line);
  border-radius: 8px;
  max-height: 66vh;
  overflow: auto;
}

.reorder-table {
  margin-top: 0;
  min-width: 1080px;
  table-layout: fixed;
}

.reorder-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.reorder-table th:nth-child(1),
.reorder-table td:nth-child(1) {
  width: 72px;
}

.reorder-table th:nth-child(2),
.reorder-table td:nth-child(2) {
  width: 34%;
}

.reorder-table th:nth-child(3),
.reorder-table td:nth-child(3),
.reorder-table th:nth-child(4),
.reorder-table td:nth-child(4),
.reorder-table th:nth-child(5),
.reorder-table td:nth-child(5),
.reorder-table th:nth-child(6),
.reorder-table td:nth-child(6) {
  width: 120px;
}

.reorder-table th:nth-child(7),
.reorder-table td:nth-child(7) {
  width: 250px;
}

.reorder-product-cell {
  min-width: 0;
}

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

.reorder-product-wrap .product-thumb {
  flex: 0 0 auto;
  margin-right: 0;
}

.reorder-product-wrap > div {
  min-width: 0;
}

.reorder-product-wrap strong,
.reorder-product-wrap span,
.reorder-product-wrap small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reorder-product-wrap span,
.reorder-product-wrap small {
  color: var(--muted);
}

.reorder-shortage {
  background: #fff1f1;
  border: 1px solid #efb3b3;
  border-radius: 999px;
  color: #b42318;
  display: inline-block;
  font-weight: 800;
  padding: 4px 8px;
  white-space: nowrap;
}

.reorder-money {
  white-space: nowrap;
}

.reorder-empty {
  background: #eef8f1;
  border: 1px solid #b7dfc3;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 16px;
}

.reorder-empty span {
  color: var(--muted);
}

.toolbar-stat.delivery-risk-stat.attention {
  background: #fff7d6;
  border-color: #e7c665;
}

.toolbar-stat.delivery-risk-stat.attention strong {
  color: #775200;
}

.toolbar-stat.sku-risk-stat.attention {
  background: #ffe4e4;
  border-color: #f0a8a8;
}

.toolbar-stat.sku-risk-stat.attention strong {
  color: #b42318;
}

.warehouse-admin {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 460px);
  min-width: 0;
}

.warehouse-admin.reorder-mode,
.warehouse-admin.supplier-order-mode {
  grid-template-columns: minmax(0, 1fr);
}

.warehouse-admin.reorder-mode .warehouse-list,
.warehouse-admin.supplier-order-mode .warehouse-list {
  display: none;
}

.warehouse-admin.reorder-mode .warehouse-detail,
.warehouse-admin.supplier-order-mode .warehouse-detail {
  max-width: none;
  position: static;
}

.warehouse-list,
.warehouse-detail {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.warehouse-list {
  min-width: 0;
  overflow: auto;
}

.warehouse-list table {
  border: 0;
  min-width: 1040px;
}

.warehouse-detail {
  display: grid;
  gap: 10px;
  min-width: 0;
  overflow: visible;
  padding: 12px;
  position: sticky;
  top: 16px;
}

.detail-head {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.detail-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.purchase-receipt-edit {
  display: grid;
  gap: 12px;
}

.tabs {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(3, 1fr);
}

.tabs button {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  min-height: 34px;
}

.tabs button.active {
  border-color: var(--accent);
  color: var(--accent-dark);
  font-weight: 700;
}

.detail-form {
  display: grid;
  gap: 10px;
}

#product-edit-form {
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#product-edit-form > label:first-child,
#product-edit-form > .check-line,
#product-edit-form > .bundle-editor {
  grid-column: 1 / -1;
}

#product-edit-form button {
  min-height: 36px;
}

.warehouse-detail #product-edit-form label {
  gap: 3px;
}

.warehouse-detail #product-edit-form input,
.warehouse-detail #product-edit-form select {
  min-height: 32px;
  padding: 5px 8px;
}

.product-extra-section {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  padding-top: 8px;
}

.product-extra-section summary {
  color: var(--accent-dark);
  cursor: pointer;
  font-weight: 700;
}

.compact-product-stats {
  gap: 6px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-product-stats div {
  border-radius: 6px;
  padding: 7px;
}

.compact-product-stats strong {
  font-size: 13px;
}

.order-back-button {
  justify-self: start;
}

.check-line {
  align-items: center;
  display: flex;
  flex-direction: row;
  gap: 8px;
}

.check-line input {
  min-height: auto;
  width: auto;
}

.movement-table-shell {
  border: 1px solid var(--line);
  border-radius: 8px;
  max-height: 420px;
  max-width: 100%;
  overflow: auto;
}

.movement-table {
  border: 0;
  margin: 0;
  min-width: 820px;
  table-layout: fixed;
}

.movement-table th,
.movement-table td {
  padding: 8px;
}

.movement-table th {
  white-space: nowrap;
}

.movement-date {
  width: 132px;
}

.movement-product {
  width: 190px;
}

.movement-warehouse {
  width: 120px;
}

.movement-type {
  width: 92px;
}

.movement-qty {
  width: 78px;
}

.movement-source {
  width: 150px;
}

.movement-price {
  width: 78px;
}

.movement-table .stacked-link span {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.product-location-panel {
  display: grid;
  gap: 12px;
}

.location-create-form {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(90px, 0.6fr) minmax(150px, 1fr) minmax(150px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.location-create-form button {
  min-height: 38px;
}

.empty-detail {
  display: grid;
  gap: 6px;
  min-height: 160px;
  place-content: center;
  text-align: center;
}

.warehouse-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}

.warehouse-grid .panel {
  display: grid;
  gap: 10px;
  align-content: start;
}

.warehouse-dashboard-page {
  background: #f7f8fc;
  border: 1px solid #e4e8f0;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
}

.warehouse-dashboard-head {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.warehouse-dashboard-head h1 {
  color: #111827;
  font-size: 24px;
}

.warehouse-head-actions,
.warehouse-stock-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.warehouse-tabs {
  border-bottom: 1px solid #dfe5ef;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  overflow: visible;
  padding-bottom: 6px;
}

.warehouse-tabs button {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 8px 8px 0 0;
  color: #475467;
  flex: 0 1 auto;
  font-size: 13px;
  font-weight: 700;
  min-height: 38px;
  padding: 0 10px;
  white-space: nowrap;
}

.warehouse-tabs button.active,
.warehouse-tabs button.active-soft {
  border-bottom-color: #635bff;
  color: #4f46e5;
}

.warehouse-kpi-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.warehouse-kpi-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.05);
  display: grid;
  gap: 7px;
  min-height: 112px;
  padding: 14px;
  position: relative;
}

.warehouse-kpi-card::after {
  border-radius: 999px;
  content: "";
  height: 34px;
  position: absolute;
  right: 14px;
  top: 14px;
  width: 34px;
}

.warehouse-kpi-card span,
.warehouse-kpi-card small {
  color: var(--muted);
  font-size: 12px;
}

.warehouse-kpi-card strong {
  color: #111827;
  font-size: 25px;
}

.warehouse-kpi-card.kpi-purple::after {
  background: #f0edff;
}

.warehouse-kpi-card.kpi-blue::after {
  background: #e8f1ff;
}

.warehouse-kpi-card.kpi-amber::after {
  background: #fff3db;
}

.warehouse-kpi-card.kpi-red::after {
  background: #ffe9ec;
}

.warehouse-assembly-page {
  background: #f5f7fb;
}

.warehouse-assembly-workspace {
  background: #f5f7fb;
  border: 0;
  box-shadow: none;
  display: grid;
  gap: 20px;
  padding: 0;
}

.warehouse-assembly-workspace .warehouse-work-head {
  align-items: center;
  background: transparent;
  border: 0;
  box-shadow: none;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 0;
}

.warehouse-assembly-workspace .warehouse-work-head h2 {
  color: #101828;
  font-size: 32px;
  letter-spacing: 0;
  line-height: 1.15;
  margin: 0;
}

.warehouse-assembly-workspace .warehouse-work-head p {
  color: #667085;
  font-size: 15px;
  margin: 6px 0 0;
}

.warehouse-work-search {
  flex: 0 1 420px;
}

.warehouse-work-search input {
  background: #ffffff;
  border: 1px solid #d8e0ec;
  border-radius: 14px;
  color: #101828;
  font-size: 15px;
  min-height: 54px;
  padding: 0 20px;
  width: 100%;
}

.warehouse-channel-tabs {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.warehouse-channel-tabs button {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d8e0ec;
  border-radius: 999px;
  color: #475467;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
}

.warehouse-channel-tabs button.active {
  background: #eff6ff;
  border-color: #2563eb;
  box-shadow: inset 0 0 0 1px #2563eb;
  color: #1d4ed8;
}

.warehouse-channel-tabs strong {
  background: #f2f4f7;
  border-radius: 999px;
  color: #344054;
  min-width: 28px;
  padding: 2px 8px;
  text-align: center;
}

.warehouse-channel-tabs button.active strong {
  background: #dbeafe;
  color: #1d4ed8;
}

.warehouse-route-card {
  background: #ffffff;
  border: 1px solid #d8e0ec;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(16, 24, 40, 0.04);
  display: grid;
  gap: 16px;
  padding: 20px 24px;
}

.warehouse-route-card-head,
.warehouse-route-subhead,
.warehouse-route-select-row,
.warehouse-route-actions,
.warehouse-route-archive-tools,
.warehouse-route-period-shift {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.warehouse-route-card-head h3 {
  color: #101828;
  font-size: 22px;
  line-height: 1.2;
  margin: 0 0 4px;
}

.warehouse-route-card-head p,
.warehouse-route-subhead span,
.warehouse-route-select-row span,
.warehouse-route-history-row small,
.warehouse-route-order small {
  color: #667085;
}

.warehouse-route-summary,
.warehouse-route-form,
.warehouse-route-archive-stats {
  display: grid;
  gap: 12px;
}

.warehouse-route-summary {
  grid-template-columns: repeat(2, minmax(180px, 1fr));
}

.warehouse-route-summary button,
.warehouse-route-order,
.warehouse-route-history-row {
  background: #f8fafc;
  border: 1px solid #d8e0ec;
  border-radius: 14px;
  color: #101828;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.warehouse-route-summary button {
  display: grid;
  gap: 6px;
  min-height: 92px;
  padding: 16px;
}

.warehouse-route-summary button:disabled {
  cursor: default;
  opacity: 0.58;
}

.warehouse-route-summary strong {
  color: #2563eb;
  font-size: 28px;
  line-height: 1;
}

.warehouse-route-builder,
.warehouse-route-archive {
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  border-radius: 16px;
  display: grid;
  gap: 14px;
  padding: 16px;
}

.warehouse-route-form {
  grid-template-columns: minmax(180px, 0.8fr) minmax(220px, 1.2fr);
}

.warehouse-route-form label {
  color: #344054;
  display: grid;
  font-size: 13px;
  font-weight: 800;
  gap: 6px;
}

.warehouse-route-form input,
.warehouse-route-archive-tools input {
  background: #ffffff;
  border: 1px solid #d8e0ec;
  border-radius: 10px;
  color: #101828;
  font: inherit;
  min-height: 42px;
  padding: 0 12px;
}

.warehouse-route-orders,
.warehouse-route-history {
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow: auto;
}

.warehouse-route-order,
.warehouse-route-history-row {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 12px;
}

.warehouse-route-order.selected {
  background: #ecfdf3;
  border-color: #86efac;
}

.warehouse-route-check {
  align-items: center;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #15803d;
  display: inline-flex;
  font-weight: 900;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.warehouse-route-archive-tools {
  align-items: stretch;
  flex-wrap: wrap;
}

.warehouse-route-periods {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.warehouse-route-periods button {
  background: #ffffff;
  border: 1px solid #d8e0ec;
  border-radius: 999px;
  color: #475467;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  min-height: 36px;
  padding: 0 13px;
}

.warehouse-route-periods button.active {
  background: #eff6ff;
  border-color: #2563eb;
  color: #1d4ed8;
}

.warehouse-route-archive-tools input {
  flex: 1 1 260px;
}

.warehouse-route-archive-stats {
  grid-template-columns: repeat(3, minmax(120px, 1fr));
}

.warehouse-route-archive-stats span {
  background: #ffffff;
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  display: grid;
  gap: 4px;
  padding: 12px;
}

.warehouse-route-history-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.warehouse-route-empty {
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  color: #667085;
  padding: 18px;
  text-align: center;
}

.warehouse-assembly-kpis {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(9, minmax(112px, 1fr));
}

.warehouse-kpi-filter {
  background: #ffffff;
  border: 1px solid #d8e0ec;
  border-radius: 16px;
  color: #475467;
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 8px;
  min-height: 92px;
  padding: 16px 18px;
  text-align: left;
}

.warehouse-kpi-filter span {
  font-size: 14px;
  font-weight: 700;
}

.warehouse-kpi-filter strong {
  color: #344054;
  font-size: 30px;
  line-height: 1;
}

.warehouse-kpi-filter.active {
  border-color: #2563eb;
  box-shadow: inset 0 0 0 1px #2563eb;
}

.warehouse-kpi-filter.tone-blue {
  background: #eef2ff;
}

.warehouse-kpi-filter.tone-cyan {
  background: #e6fffb;
}

.warehouse-kpi-filter.tone-green {
  background: #ecfdf3;
}

.warehouse-kpi-filter.tone-orange {
  background: #fff7ed;
}

.warehouse-kpi-filter.tone-urgent {
  background: #fff1f2;
  border-color: #fecdd3;
}

.warehouse-kpi-filter.tone-yellow {
  background: #fffbeb;
}

.warehouse-kpi-filter.tone-sky {
  background: #eff6ff;
}

.warehouse-kpi-filter.tone-gray {
  background: #f2f4f7;
}

.warehouse-kpi-filter.tone-red {
  background: #fef3f2;
}

.warehouse-kpi-filter.tone-blue strong,
.warehouse-kpi-filter.tone-sky strong {
  color: #2563eb;
}

.warehouse-kpi-filter.tone-cyan strong {
  color: #0e7490;
}

.warehouse-kpi-filter.tone-green strong {
  color: #15803d;
}

.warehouse-kpi-filter.tone-orange strong {
  color: #c2410c;
}

.warehouse-kpi-filter.tone-yellow strong {
  color: #a16207;
}

.warehouse-kpi-filter.tone-red strong {
  color: #b42318;
}

.warehouse-kpi-filter.tone-urgent strong {
  color: #be123c;
}

.warehouse-kpi-overview {
  background: #ffffff;
  border: 1px solid #d8e0ec;
  border-radius: 18px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
  display: grid;
  gap: 18px;
  padding: 20px;
}

.warehouse-kpi-overview-head {
  align-items: start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.warehouse-kpi-overview-head h3 {
  margin: 0;
}

.warehouse-kpi-overview-head p {
  color: #667085;
  margin: 4px 0 0;
}

.warehouse-kpi-overview-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
}

.warehouse-kpi-overview-card {
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  border-radius: 14px;
  display: grid;
  gap: 8px;
  min-height: 108px;
  padding: 14px;
}

.warehouse-kpi-overview-card span {
  color: #667085;
  font-size: 13px;
  font-weight: 800;
}

.warehouse-kpi-overview-card strong {
  color: #2563eb;
  font-size: 24px;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.warehouse-kpi-overview-card small {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.warehouse-kpi-overview-card.tone-green strong {
  color: #15803d;
}

.warehouse-kpi-overview-card.tone-cyan strong {
  color: #0e7490;
}

.warehouse-kpi-overview-card.tone-purple strong {
  color: #7c3aed;
}

.warehouse-kpi-overview-card.tone-orange strong {
  color: #c2410c;
}

.warehouse-kpi-overview-card.tone-red strong {
  color: #b42318;
}

.warehouse-lifecycle-card,
.warehouse-work-table-card {
  background: #ffffff;
  border: 1px solid #d8e0ec;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(16, 24, 40, 0.04);
}

.warehouse-lifecycle-card {
  display: grid;
  gap: 22px;
  padding: 24px 28px;
}

.warehouse-lifecycle-card h3 {
  color: #101828;
  font-size: 22px;
  margin: 0 0 6px;
}

.warehouse-lifecycle-card p {
  color: #667085;
  margin: 0;
}

.warehouse-lifecycle-flow {
  align-items: center;
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(8, minmax(132px, 1fr));
  overflow-x: auto;
  padding: 2px 0 4px;
}

.warehouse-lifecycle-step {
  align-items: center;
  border: 1px solid #cfd6e4;
  border-radius: 14px;
  color: #344054;
  display: grid;
  gap: 8px;
  min-height: 86px;
  padding: 14px 12px;
  position: relative;
  text-align: center;
}

.warehouse-lifecycle-step:not(:last-child)::after {
  background: #98a2b3;
  content: "";
  height: 2px;
  left: calc(100% + 4px);
  position: absolute;
  top: 50%;
  width: 16px;
}

.warehouse-lifecycle-step.active {
  background: #eef2ff;
  border-color: #4f46e5;
  color: #312e81;
}

.warehouse-lifecycle-step strong {
  font-size: 14px;
}

.warehouse-lifecycle-step small {
  color: #667085;
  font-size: 12px;
}

.warehouse-work-table-card {
  display: grid;
  gap: 14px;
  padding: 20px 24px;
}

.warehouse-assembly-tabs {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.warehouse-assembly-tabs button {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d8e0ec;
  border-radius: 999px;
  color: #475467;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  gap: 8px;
  min-height: 38px;
  padding: 0 16px;
}

.warehouse-assembly-tabs button.active {
  border-color: #2563eb;
  box-shadow: inset 0 0 0 1px #2563eb;
  color: #1d4ed8;
}

.warehouse-assembly-tabs strong {
  background: #eef2ff;
  border-radius: 999px;
  color: #2563eb;
  min-width: 26px;
  padding: 2px 7px;
  text-align: center;
}

.warehouse-work-table-shell {
  overflow-x: auto;
}

.warehouse-assembly-table {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 1160px;
  table-layout: fixed;
  width: 100%;
}

.warehouse-assembly-table th {
  background: #ffffff;
  border-bottom: 1px solid #e4e7ec;
  color: #667085;
  font-size: 13px;
  font-weight: 800;
  padding: 12px 10px;
  text-align: left;
}

.warehouse-assembly-table td {
  border-bottom: 1px solid #eef2f6;
  color: #101828;
  padding: 14px 10px;
  vertical-align: middle;
}

.warehouse-assembly-table th:nth-child(1),
.warehouse-assembly-table td:nth-child(1) {
  width: 150px;
}

.warehouse-assembly-table th:nth-child(2),
.warehouse-assembly-table td:nth-child(2) {
  width: 220px;
}

.warehouse-assembly-table th:nth-child(3),
.warehouse-assembly-table td:nth-child(3) {
  width: 170px;
}

.warehouse-assembly-table th:nth-child(4),
.warehouse-assembly-table td:nth-child(4) {
  width: 250px;
}

.warehouse-assembly-table th:nth-child(5),
.warehouse-assembly-table td:nth-child(5) {
  width: 340px;
}

.warehouse-assembly-table th:nth-child(6),
.warehouse-assembly-table td:nth-child(6) {
  width: 190px;
}

.warehouse-assembly-row small,
.warehouse-assembly-table td small {
  color: #667085;
  display: block;
  font-size: 13px;
  margin-top: 4px;
}

.warehouse-assembly-row .strong-link {
  color: #101828;
  font-size: 15px;
  font-weight: 900;
  padding: 0;
  text-decoration: none;
}

.warehouse-source-pill {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  margin-top: 7px;
  padding: 6px 8px;
  width: fit-content;
}

.warehouse-source-pill.uman {
  background: #ecfdf3;
  color: #15803d;
}

.warehouse-source-pill.online {
  background: #eff6ff;
  color: #1d4ed8;
}

.warehouse-work-row-routed {
  background: #f8fafc;
}

.warehouse-work-warning-row {
  background: #fffbeb;
}

.warehouse-quote-urgent-row {
  background: #fff1f2;
  box-shadow: inset 4px 0 0 #e11d48;
}

.warehouse-quote-urgent-row td {
  border-bottom-color: #fecdd3;
}

.warehouse-quote-urgent-badge {
  background: #be123c;
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  margin-top: 6px;
  padding: 6px 9px;
  width: fit-content;
}

.warehouse-work-row-expanded {
  box-shadow: inset 4px 0 0 #2563eb;
}

.warehouse-work-row-closed {
  opacity: 0.78;
}

.warehouse-progress-strip {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.warehouse-progress-chip {
  background: #e5e7eb;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #667085;
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  padding: 5px 7px;
  white-space: nowrap;
}

.warehouse-progress-chip.done {
  background: #dcfce7;
  color: #15803d;
}

.warehouse-progress-chip.active {
  background: #dbeafe;
  border-color: #2563eb;
  color: #1d4ed8;
}

.warehouse-progress-chip.blocked {
  background: #fef3f2;
  border-color: #fecdca;
  color: #b42318;
}

.warehouse-progress-note {
  color: #667085;
  display: block;
  font-size: 12px;
  margin-top: 6px;
}

.warehouse-pick-shortage-note,
.warehouse-problem-reasons {
  color: #b42318;
  font-size: 12px;
  font-weight: 800;
  margin-top: 6px;
}

.warehouse-problem-reasons {
  display: grid;
  gap: 5px;
}

.warehouse-problem-reason {
  background: #fef3f2;
  border: 1px solid #fecdca;
  border-radius: 8px;
  color: #b42318;
  display: grid;
  gap: 3px;
  padding: 6px 8px;
}

.warehouse-problem-reason.warning {
  background: #fffbeb;
  border-color: #fedf89;
  color: #b54708;
}

.warehouse-problem-reason.info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.warehouse-next-action {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: flex-start;
}

.warehouse-next-button,
.warehouse-next-muted,
.warehouse-next-danger {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 12px;
  display: inline-flex;
  font: inherit;
  font-size: 15px;
  font-weight: 900;
  justify-content: center;
  min-height: 44px;
  min-width: 148px;
  padding: 0 16px;
  text-align: center;
}

.warehouse-next-button {
  background: #2563eb;
  color: #ffffff;
  cursor: pointer;
}

.warehouse-next-button:hover {
  background: #1d4ed8;
}

.warehouse-next-button:disabled {
  background: #f2f4f7;
  border-color: #d0d5dd;
  color: #667085;
  cursor: not-allowed;
}

.warehouse-next-muted {
  background: #f2f4f7;
  border-color: #d0d5dd;
  color: #667085;
}

.warehouse-next-danger {
  background: #fef3f2;
  border-color: #fecdca;
  color: #b42318;
}

.warehouse-more-actions {
  position: relative;
}

.warehouse-more-actions summary {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: #667085;
  cursor: pointer;
  display: inline-flex;
  font-size: 22px;
  font-weight: 900;
  height: 38px;
  justify-content: center;
  list-style: none;
  width: 38px;
}

.warehouse-more-actions summary::-webkit-details-marker {
  display: none;
}

.warehouse-more-actions[open] summary,
.warehouse-more-actions summary:hover {
  background: #eef2ff;
  color: #1d4ed8;
}

.warehouse-more-actions > div {
  background: #ffffff;
  border: 1px solid #d8e0ec;
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(16, 24, 40, 0.14);
  display: grid;
  min-width: 190px;
  padding: 6px;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 40;
}

.warehouse-more-actions button {
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: #344054;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  min-height: 34px;
  padding: 0 10px;
  text-align: left;
}

.warehouse-more-actions button:hover {
  background: #f2f4f7;
}

.warehouse-interface-rule {
  background: #101828;
  border-radius: 14px;
  color: #f9fafb;
  font-size: 15px;
  padding: 18px 24px;
}

.warehouse-interface-rule strong {
  color: #ffffff;
}

.warehouse-picking-inline-row td,
.warehouse-work-inline-row td {
  background: #f8fafc;
  border-bottom: 1px solid #d8e0ec;
  padding: 0 10px 16px;
}

.warehouse-work-inline-form {
  align-items: end;
  background: #ffffff;
  border: 1px solid #d8e0ec;
  border-radius: 14px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  margin-top: 10px;
  padding: 14px;
}

.warehouse-work-inline-form > div:first-child {
  display: grid;
  gap: 4px;
  grid-column: 1 / -1;
}

.warehouse-work-inline-form > div:first-child span {
  color: #667085;
  font-size: 13px;
}

.warehouse-work-inline-form label {
  color: #475467;
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 5px;
}

.warehouse-work-inline-form input,
.warehouse-work-inline-form select,
.warehouse-work-inline-form textarea {
  border: 1px solid #d8e0ec;
  border-radius: 9px;
  font: inherit;
  min-height: 36px;
  padding: 8px 10px;
}

.warehouse-work-inline-form textarea {
  min-height: 76px;
  resize: vertical;
}

.warehouse-work-wide {
  grid-column: span 2;
}

.warehouse-work-inline-actions {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.warehouse-delivery-inline-form {
  align-items: stretch;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.warehouse-delivery-inline-form .delivery-wide {
  grid-column: span 2;
}

.warehouse-delivery-inline-form .delivery-full {
  grid-column: 1 / -1;
}

.warehouse-work-inline-form > .warehouse-delivery-inline-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.warehouse-delivery-payment-hint {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.warehouse-delivery-inline-actions {
  grid-column: 1 / -1;
}

.warehouse-analytics-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(320px, 1.25fr) minmax(260px, 0.85fr) minmax(260px, 0.85fr);
}

.warehouse-chart-card,
.warehouse-stock-card,
.warehouse-side-card,
.warehouse-full-detail,
.warehouse-wide-workarea {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.05);
  min-width: 0;
  padding: 12px;
}

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

.prom-export-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.prom-export-toolbar {
  align-items: end;
}

.prom-export-table td {
  vertical-align: middle;
}

.prom-export-row-warning {
  background: #fffaf0;
}

.prom-export-row-published {
  background: #f8fafc;
  color: #475467;
}

.prom-export-status {
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
  padding: 5px 8px;
}

.prom-export-status.success {
  background: #ecfdf3;
  border-color: #bbf7d0;
  color: #15803d;
}

.prom-export-status.warning {
  background: #fffbeb;
  border-color: #fed7aa;
  color: #b54708;
}

.prom-export-status.danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b42318;
}

.prom-export-status.info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.prom-export-status.muted {
  background: #f8fafc;
  color: #64748b;
}

.prom-export-message {
  color: var(--muted);
  display: block;
  font-size: 11px;
  margin-top: 5px;
  max-width: 260px;
}

.prom-export-result {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}

.prom-export-result span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.prom-card-editor {
  border-color: rgba(37, 99, 235, 0.18);
}

.prom-card-form {
  margin-top: 10px;
}

.prom-card-form .wide-field,
.prom-card-form .prom-card-meta {
  grid-column: 1 / -1;
}

.prom-card-form textarea {
  min-height: 120px;
  line-height: 1.35;
  resize: vertical;
}

.prom-card-form textarea[name="promDescription"] {
  min-height: 220px;
}

.prom-card-meta {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  font-weight: 700;
  gap: 8px;
}

.warehouse-card-head,
.warehouse-stock-head {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.warehouse-card-head h3,
.warehouse-stock-head h3 {
  font-size: 15px;
  margin: 0;
}

.warehouse-card-head p,
.warehouse-stock-head p {
  font-size: 12px;
  margin-top: 3px;
}

.warehouse-chip,
.warehouse-filter-pill {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #475467;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 9px;
  white-space: nowrap;
}

.warehouse-trend {
  align-items: end;
  background: linear-gradient(180deg, #fbfcff 0, #f5f7fb 100%);
  border: 1px solid #eef1f5;
  border-radius: 8px;
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(12, 1fr);
  height: 150px;
  margin-top: 12px;
  padding: 16px;
}

.warehouse-trend span {
  background: linear-gradient(180deg, #6d5dfc, #47b7f5);
  border-radius: 999px 999px 2px 2px;
  min-height: 12px;
}

.warehouse-chart-legend {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}

.warehouse-chart-legend span {
  color: var(--muted);
  font-size: 12px;
}

.warehouse-bars {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.warehouse-bar-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(90px, 1fr) minmax(80px, 1fr) max-content;
}

.warehouse-bar-row span,
.warehouse-bar-row strong {
  font-size: 12px;
}

.warehouse-bar-row span {
  color: #475467;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.warehouse-bar-row div {
  background: #edf1f7;
  border-radius: 999px;
  height: 7px;
  overflow: hidden;
}

.warehouse-bar-row i {
  background: #635bff;
  border-radius: inherit;
  display: block;
  height: 100%;
}

.warehouse-dashboard-layout {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 340px);
  min-width: 0;
}

.warehouse-main-column,
.warehouse-side-column {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.warehouse-side-column {
  position: sticky;
  top: 12px;
}

.warehouse-full-detail {
  display: grid;
  gap: 12px;
}

.warehouse-focused-layout {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  min-width: 0;
}

.warehouse-focused-picker .warehouse-stock-table-shell {
  max-height: calc(100vh - 330px);
  min-height: 420px;
}

.warehouse-focused-action {
  align-self: start;
  display: grid;
  gap: 12px;
}

.warehouse-focused-action > .detail-form,
.warehouse-focused-action > .supplier-order-workarea {
  margin: 0;
}

.write-off-journal {
  overflow: hidden;
}

.write-off-journal .section-head {
  align-items: start;
  gap: 14px;
}

.write-off-journal .compact-kpis {
  margin: 0;
  min-width: 420px;
}

.write-off-table {
  min-width: 980px;
}

.write-off-table th,
.write-off-table td {
  vertical-align: top;
}

.warehouse-stock-card {
  display: grid;
  gap: 12px;
}

.warehouse-dashboard-page .warehouse-toolbar {
  align-items: end;
  background: #fbfcff;
  border: 1px solid #e6ebf4;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(240px, 1fr) minmax(150px, 0.35fr) minmax(130px, 0.28fr) auto;
  margin-bottom: 0;
  padding: 8px;
}

.warehouse-dashboard-page .warehouse-toolbar label {
  font-size: 12px;
}

.warehouse-dashboard-page .warehouse-toolbar input,
.warehouse-dashboard-page .warehouse-toolbar select {
  min-height: 32px;
  padding: 5px 8px;
}

.warehouse-stock-table-shell {
  border: 1px solid var(--line);
  border-radius: 8px;
  max-height: calc(100vh - 470px);
  min-height: 360px;
  overflow: auto;
}

.warehouse-table-footer {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 12px;
  gap: 10px;
  justify-content: space-between;
}

.warehouse-table-footer strong {
  color: #4f46e5;
}

.warehouse-stock-table {
  border: 0;
  min-width: 1160px;
}

.warehouse-stock-table th,
.warehouse-stock-table td {
  font-size: 12px;
  line-height: 1.18;
  padding: 6px 8px;
  vertical-align: middle;
}

.warehouse-stock-table th {
  background: #f8fafc;
  color: #4b5563;
  position: sticky;
  top: 0;
  z-index: 2;
}

.warehouse-product-cell {
  align-items: center;
  display: flex;
  gap: 8px;
  min-width: 250px;
}

.warehouse-product-cell .product-thumb {
  flex: 0 0 auto;
  margin-right: 0;
}

.warehouse-product-cell strong,
.warehouse-product-cell span,
.warehouse-row-sub {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.warehouse-product-cell span,
.warehouse-row-sub {
  color: var(--muted);
  font-size: 11px;
}

.warehouse-status {
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  padding: 3px 7px;
  white-space: nowrap;
}

.warehouse-status.status-success {
  background: #eaf8f0;
  border-color: #b7dfc3;
  color: #127446;
}

.warehouse-status.status-warning {
  background: #fff7d6;
  border-color: #e7c665;
  color: #775200;
}

.warehouse-status.status-danger {
  background: #ffe4e4;
  border-color: #f0a8a8;
  color: #b42318;
}

.warehouse-status.status-info {
  background: #eef3ff;
  border-color: #cfd8ff;
  color: #344054;
}

.warehouse-status.status-muted {
  background: #f2f4f7;
  color: #667085;
}

.warehouse-stock-row.selected-row td {
  background: #eef2ff;
  box-shadow: inset 3px 0 0 #4f46e5;
}

.warehouse-stock-row:hover td {
  background: #f6f8ff;
}

.warehouse-alert-list,
.warehouse-operation-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.warehouse-alert {
  background: #fbfcff;
  border: 1px solid #e6ebf4;
  border-radius: 8px;
  display: grid;
  gap: 2px;
  grid-template-columns: 34px minmax(0, 1fr);
  min-height: 58px;
  padding: 8px;
  text-align: left;
}

.warehouse-alert span {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-weight: 900;
  grid-row: span 2;
  justify-content: center;
  min-height: 34px;
}

.warehouse-alert strong,
.warehouse-alert small {
  display: block;
}

.warehouse-alert small {
  color: var(--muted);
  font-size: 12px;
}

.warehouse-alert.alert-danger span {
  background: #ffe4e4;
  color: #b42318;
}

.warehouse-alert.alert-warning span {
  background: #fff7d6;
  color: #775200;
}

.warehouse-alert.alert-info span {
  background: #eef3ff;
  color: #4f46e5;
}

.warehouse-alert.alert-success span {
  background: #eaf8f0;
  color: #127446;
}

.warehouse-operation {
  border-bottom: 1px solid #eef1f5;
  display: grid;
  gap: 3px;
  padding-bottom: 8px;
}

.warehouse-operation:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.warehouse-operation span,
.warehouse-operation small {
  color: var(--muted);
  font-size: 11px;
}

.warehouse-operation strong {
  font-size: 12px;
  line-height: 1.3;
}

.warehouse-usage {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.warehouse-usage > div {
  background: #edf1f7;
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.warehouse-usage > div span {
  background: #635bff;
  display: block;
  height: 100%;
}

.warehouse-usage strong {
  font-size: 18px;
}

.warehouse-usage small {
  color: var(--muted);
}

.warehouse-dashboard-detail {
  max-height: calc(100vh - 120px);
  overflow: auto;
  position: static;
}

.warehouse-wide-workarea {
  overflow: auto;
}

.selected-row td {
  background: #eef8f1;
}

.product-row {
  cursor: pointer;
}

.product-row:hover td {
  background: #f4fbf6;
}

.movement-panel {
  margin-top: 16px;
}

.order-card {
  margin-bottom: 16px;
}

.order-detail-page {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.order-detail-top {
  align-items: start;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 16px 18px;
}

.order-detail-title {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.order-detail-title h2 {
  font-size: 24px;
}

.order-detail-actions,
.order-lines-actions,
.order-side-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.order-detail-actions button {
  padding: 0 14px;
}

.order-detail-tabs {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 0 12px;
}

.order-detail-tabs a {
  border-bottom: 2px solid transparent;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
  padding: 13px 10px 11px;
  text-decoration: none;
  white-space: nowrap;
}

.order-detail-tabs a:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.order-detail-layout {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 330px);
  min-width: 0;
}

.order-detail-main,
.order-detail-side {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.order-detail-main > *,
.order-detail-side > * {
  max-width: 100%;
  min-width: 0;
  width: 100%;
}

.order-detail-side {
  position: sticky;
  top: 12px;
}

.order-detail-panel,
.order-side-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
  padding: 14px;
}

.order-detail-panel h3,
.order-side-card h3 {
  font-size: 16px;
  margin: 0;
}

.order-info-panel {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 0;
  overflow: hidden;
  width: 100%;
}

.order-info-column {
  border-right: 1px solid var(--line);
  display: grid;
  gap: 10px;
  min-width: 0;
  padding-right: 14px;
}

.order-info-column:last-child {
  border-right: 0;
  padding-right: 0;
}

.order-field-row {
  align-items: start;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(88px, 0.5fr) minmax(0, 1fr);
  min-width: 0;
}

.order-field-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.order-field-row strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
  min-width: 0;
  overflow-wrap: anywhere;
}

.order-field-row .link-button {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.order-finance-card {
  gap: 10px;
}

.order-finance-card,
.order-documents-card {
  display: grid;
  gap: 12px;
}

.order-finance-total {
  display: grid;
  gap: 4px;
  padding-top: 4px;
  text-align: right;
}

.order-finance-total span,
.order-finance-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.order-finance-total strong {
  font-size: 24px;
}

.order-finance-row {
  align-items: baseline;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.order-finance-row strong {
  font-size: 15px;
}

.order-timeline {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.order-timeline-step {
  display: grid;
  gap: 10px;
  grid-template-columns: 24px minmax(0, 1fr);
  position: relative;
}

.order-timeline-step::after {
  background: #d9dee7;
  content: "";
  height: calc(100% + 8px);
  left: 10px;
  position: absolute;
  top: 22px;
  width: 2px;
}

.order-timeline-step:last-child::after {
  display: none;
}

.order-timeline-step > span {
  background: #e9edf5;
  border: 2px solid #cfd6e2;
  border-radius: 50%;
  height: 22px;
  margin-top: 2px;
  width: 22px;
  z-index: 1;
}

.order-timeline-step.done > span {
  background: var(--accent);
  border-color: var(--accent);
}

.order-timeline-step.active > span {
  background: #635bff;
  border-color: #635bff;
}

.order-timeline-step.payment-unpaid > span,
.order-timeline-step.payment-unpaid.done > span,
.order-timeline-step.payment-unpaid.active > span {
  background: #e9edf5;
  border-color: #cfd6e2;
  box-shadow: none;
}

.order-timeline-step.payment-partial > span,
.order-timeline-step.payment-partial.done > span,
.order-timeline-step.payment-partial.active > span {
  background: #f59e0b;
  border-color: #f59e0b;
}

.order-timeline-step.payment-paid > span,
.order-timeline-step.payment-paid.done > span,
.order-timeline-step.payment-paid.active > span {
  background: #16a34a;
  border-color: #16a34a;
}

.order-timeline-step strong,
.order-timeline-step small {
  display: block;
}

.order-timeline-step small {
  color: var(--muted);
  margin-top: 3px;
}

.order-document-list {
  display: grid;
  gap: 8px;
  margin: 10px 0;
}

.order-document-row {
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 3px;
  min-height: 54px;
  padding: 9px 10px;
  text-align: left;
  width: 100%;
}

.order-document-row.is-static {
  cursor: default;
}

.order-document-row span,
.order-document-row small {
  color: var(--muted);
  font-size: 12px;
}

.order-document-row strong {
  color: #344054;
  font-size: 13px;
}

.official-doc-form {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 12px;
}

.official-doc-form-head {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.official-doc-form-head div {
  display: grid;
  gap: 2px;
}

.official-doc-form-head strong {
  color: var(--ink);
  font-size: 14px;
}

.official-doc-form-head span,
.official-doc-section-title {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.official-doc-section {
  display: grid;
  gap: 8px;
}

.official-doc-section label {
  color: var(--muted);
  display: grid;
  font-size: 11px;
  font-weight: 700;
  gap: 4px;
}

.official-doc-section input,
.official-doc-section select {
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
  min-width: 0;
  padding: 8px 9px;
  width: 100%;
}

.official-doc-inline-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

.official-doc-inline-actions span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.official-doc-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
}

.official-doc-actions button {
  width: 100%;
}

.official-doc-modal-backdrop {
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.official-doc-dialog {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.22);
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 48px);
  max-width: 920px;
  overflow: auto;
  padding: 16px;
  width: min(920px, 96vw);
}

.official-doc-dialog-head {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.official-doc-dialog-head h2 {
  font-size: 22px;
  margin: 2px 0 0;
}

.order-lines-workspace {
  padding: 0;
  overflow: hidden;
}

.order-lines-head {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 14px;
}

.order-lines-head h3 {
  font-size: 20px;
  margin-top: 2px;
}

.order-card-table-wrap {
  overflow: auto;
}

.order-card-lines-table {
  border: 0;
  min-width: 1040px;
}

.order-card-lines-table th,
.order-card-lines-table td {
  padding: 9px 10px;
}

.order-card-lines-table th:nth-child(1),
.order-card-lines-table td:nth-child(1) {
  text-align: center;
  width: 54px;
}

.order-card-lines-table th:nth-child(2),
.order-card-lines-table td:nth-child(2) {
  min-width: 280px;
}

.order-product-cell {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr);
  padding-right: 30px;
  position: relative;
}

.order-product-cell strong,
.order-product-cell span {
  display: block;
  min-width: 0;
}

.order-product-cell span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.order-card-lines-table tfoot td {
  background: #f8faf9;
  font-weight: 800;
}

.order-lines-total-row td {
  vertical-align: middle;
}

.order-lines-upsell-total {
  display: grid;
  gap: 2px;
}

.order-lines-upsell-total span {
  color: #667085;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.order-lines-upsell-total strong {
  font-size: 14px;
  white-space: nowrap;
}

.order-activity-panel {
  display: grid;
  gap: 12px;
}

.order-activity-list {
  border-top: 1px solid var(--line);
  display: grid;
}

.order-activity-row {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 3px;
  padding: 10px 0;
}

.order-activity-row:last-child {
  border-bottom: 0;
}

.order-activity-row strong {
  font-size: 13px;
}

.order-activity-row span,
.order-activity-row p {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}

.order-detail-page .order-delivery-panel,
.order-detail-page .order-edit-panel,
.order-detail-page .order-return-panel,
.order-detail-page .order-return-history {
  margin: 0;
}

.invoice {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 16px;
  padding: 24px;
}

.print-document.invoice,
.print-document.payment-receipt,
.print-document.official-document,
.print-document.purchase-receipt-print,
.print-document.daily-report-print,
.print-document.picking-sheet {
  display: none;
}

.print-document.print-active {
  display: block;
}

.print-root {
  display: none;
}

.document-title-row,
.signatures {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.document-brand {
  display: grid;
  gap: 4px;
  justify-items: end;
  text-align: right;
}

.document-brand strong {
  font-size: 20px;
}

.document-brand span,
.document-brand p,
.document-parties p {
  color: var(--muted);
  margin: 0;
}

.document-parties {
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
  padding: 12px;
}

.picking-sheet {
  background: white;
  color: #111827;
  font-size: 12px;
  line-height: 1.32;
}

.picking-sheet-head h2 {
  font-size: 24px;
  margin: 0 0 4px;
}

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

.picking-sheet-note {
  border: 1px solid #f59e0b;
  border-radius: 8px;
  background: #fffbeb;
  margin: 0 0 12px;
  padding: 10px 12px;
}

.picking-sheet-table th,
.picking-sheet-table td {
  vertical-align: top;
}

.picking-sheet-table th:nth-child(1),
.picking-sheet-table td:nth-child(1),
.picking-sheet-table th:nth-child(8),
.picking-sheet-table td:nth-child(8) {
  text-align: center;
  width: 44px;
}

.picking-sheet-table th:nth-child(2),
.picking-sheet-table td:nth-child(2) {
  width: 58px;
}

.picking-sheet-table th:nth-child(3),
.picking-sheet-table td:nth-child(3) {
  width: 92px;
}

.picking-stock-zero td,
.picking-stock-negative td,
.picking-stock-missing td {
  background: #fff7ed;
}

.picking-check-cell {
  font-size: 24px;
  line-height: 1;
}

.picking-sheet-footer {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 22px;
}

.official-document {
  background: white;
  color: #111827;
  font-size: 13px;
  line-height: 1.45;
}

.official-document h2 {
  color: #111827;
  font-size: 22px;
  margin: 0 0 6px;
}

.official-document h4 {
  color: #111827;
  font-size: 13px;
  margin: 0 0 6px;
}

.official-payment-invoice {
  color: #111;
  font-size: 12px;
  line-height: 1.28;
}

.official-payment-warning {
  margin-bottom: 12px;
}

.official-payment-warning p {
  margin: 0 0 3px;
}

.payment-order-sample {
  margin: 10px 0 18px;
}

.payment-order-title {
  font-weight: 700;
  margin-bottom: 4px;
}

.payment-order-sample table,
.official-invoice-table {
  border-collapse: collapse;
  width: 100%;
}

.payment-order-sample th,
.payment-order-sample td {
  border: 1px solid #111;
  padding: 4px 6px;
  text-align: left;
  vertical-align: top;
}

.payment-order-sample th {
  background: #f3f4f6;
  font-weight: 700;
  width: 18%;
}

.official-invoice-title {
  border-bottom: 2px solid #111;
  color: #111;
  font-size: 20px;
  margin: 14px 0 12px;
  padding-bottom: 8px;
  text-align: center;
}

.official-invoice-parties {
  display: grid;
  gap: 5px;
  margin-bottom: 12px;
}

.official-invoice-parties p {
  margin: 0;
}

.official-invoice-table {
  font-size: 12px;
  margin-top: 10px;
}

.official-invoice-table th,
.official-invoice-table td {
  border-bottom: 1px solid #111;
  padding: 5px 6px;
  text-align: left;
  vertical-align: top;
}

.official-invoice-table thead th {
  border-top: 1px solid #111;
  font-weight: 700;
}

.official-invoice-table th:first-child,
.official-invoice-table td:first-child {
  text-align: center;
  width: 34px;
}

.official-invoice-table .numeric {
  text-align: right;
  white-space: nowrap;
}

.official-invoice-table small {
  color: #444;
  font-size: 11px;
}

.official-invoice-totals {
  display: grid;
  gap: 4px;
  margin: 10px 0 0 auto;
  width: 240px;
}

.official-invoice-totals p {
  display: flex;
  justify-content: space-between;
  margin: 0;
}

.official-invoice-amount {
  margin-top: 10px;
}

.official-invoice-amount p {
  margin: 0 0 5px;
}

.official-invoice-signature {
  align-items: end;
  display: flex;
  gap: 18px;
  margin-top: 44px;
}

.official-invoice-signature strong {
  border-bottom: 1px solid #111;
  display: block;
  flex: 0 0 220px;
  height: 18px;
}

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

.official-requisites p {
  color: #344054;
  overflow-wrap: anywhere;
}

.official-document-meta {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  margin: 12px 0;
  padding: 10px 12px;
}

.official-document-table th,
.official-document-table td {
  vertical-align: top;
}

.official-document-table td small {
  color: var(--muted);
  display: block;
  font-size: 11px;
  margin-top: 3px;
}

.official-document-summary {
  break-inside: avoid;
}

.document-table {
  margin-top: 12px;
}

.invoice-photo-cell {
  text-align: center;
  width: 54px;
}

.invoice-product-photo {
  align-items: center;
  background: #eef1f5;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  display: inline-flex;
  font-size: 10px;
  font-weight: 800;
  height: 44px;
  justify-content: center;
  overflow: hidden;
  width: 44px;
}

.invoice-product-photo img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.receipt-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  margin: 16px 0;
}

.receipt-summary div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.receipt-summary span {
  color: var(--muted);
  display: block;
  font-size: 12px;
}

.receipt-summary strong {
  display: block;
  font-size: 18px;
  margin-top: 4px;
}

.report-summary-grid {
  grid-template-columns: repeat(3, minmax(130px, 1fr));
}

.invoice-total {
  display: grid;
  gap: 4px;
  font-size: 18px;
  font-weight: 700;
  margin-top: 16px;
  text-align: right;
}

.invoice-total span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.document-picking-list {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 14px;
}

.signatures {
  margin-top: 48px;
}

.link-button {
  background: transparent;
  border: 0;
  color: var(--warn);
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.stats {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.dashboard-command {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.dashboard-command h2 {
  font-size: 22px;
  margin-top: 4px;
}

.analytics-command {
  align-items: end;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(280px, 0.9fr) auto minmax(520px, 1.1fr);
  margin-bottom: 14px;
}

.analytics-command h2 {
  font-size: 22px;
  margin-top: 4px;
}

.analytics-filters {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(130px, 1fr));
}

.analytics-period-buttons {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.analytics-config {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  margin-bottom: 14px;
}

.analytics-toggle-group {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.analytics-toggle-group h3 {
  font-size: 15px;
  margin: 0;
}

.analytics-toggle-list {
  align-items: stretch;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.analytics-toggle-chip {
  align-items: flex-start;
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: inline-flex;
  gap: 10px;
  justify-content: flex-start;
  min-height: 64px;
  min-width: 0;
  padding: 10px 12px;
  width: 100%;
}

.analytics-toggle-chip input {
  flex: 0 0 auto;
  height: 16px;
  margin: 3px 0 0;
  width: 16px;
}

.analytics-toggle-text {
  display: grid;
  gap: 2px;
  line-height: 1.2;
  min-width: 0;
}

.analytics-toggle-text strong {
  color: var(--ink);
  font-size: 14px;
}

.analytics-toggle-text small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.analytics-metric-card {
  display: grid;
  gap: 5px;
  grid-template-rows: auto 1fr auto;
  min-height: 116px;
}

.analytics-metric-card strong {
  align-self: end;
  font-size: 22px;
  line-height: 1.15;
  margin-top: 0;
}

.analytics-stats {
  grid-auto-rows: 1fr;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  margin-bottom: 14px;
}

.analytics-layout {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr);
}

.analytics-panel {
  align-content: start;
  display: grid;
  gap: 12px;
  min-width: 0;
  overflow-x: auto;
  width: 100%;
}

.analytics-wide-panel,
.analytics-panel:first-child {
  grid-row: auto;
}

.analytics-mini-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
}

.analytics-table th,
.analytics-table td {
  white-space: nowrap;
}

.analytics-table td:first-child,
.analytics-table th:first-child {
  white-space: normal;
}

.analytics-delta {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  justify-self: start;
  padding: 3px 7px;
}

.analytics-delta.positive {
  background: #eef8f1;
  color: var(--accent-dark);
}

.analytics-delta.negative {
  background: #ffe4e4;
  color: #b42318;
}

.analytics-delta.neutral {
  background: #eef1f5;
  color: var(--muted);
}

.analytics-report-page {
  color: #182033;
  display: grid;
  gap: 14px;
}

.analytics-report-head {
  align-items: center;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(300px, 1fr) minmax(320px, 0.8fr) max-content;
}

.analytics-report-head h1 {
  font-size: 28px;
  letter-spacing: 0;
  margin: 4px 0 2px;
}

.analytics-report-head p {
  color: #667085;
  margin: 0;
}

.analytics-global-search {
  background: #ffffff;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 8px 12px;
}

.analytics-global-search span,
.analytics-filter-field span {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.analytics-global-search input {
  border: 0;
  min-height: 24px;
  padding: 0;
}

.analytics-global-search input:focus {
  outline: none;
}

.analytics-user-card {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  display: grid;
  gap: 2px 10px;
  grid-template-columns: 36px max-content;
  min-width: 170px;
  padding: 8px 12px;
}

.analytics-user-card span {
  align-items: center;
  background: #eef2ff;
  border-radius: 999px;
  color: #3730a3;
  display: inline-flex;
  font-weight: 900;
  grid-row: span 2;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.analytics-user-card strong {
  font-size: 13px;
}

.analytics-user-card small {
  color: #667085;
}

.analytics-filter-panel {
  align-items: end;
  background: #ffffff;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  box-shadow: 0 12px 35px rgba(29, 41, 57, 0.04);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(250px, 1.35fr) repeat(5, minmax(135px, 1fr)) minmax(260px, auto);
  padding: 12px;
}

.analytics-filter-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.analytics-filter-field select,
.analytics-filter-field input {
  background: #fbfcff;
  border: 1px solid #dfe5ef;
  border-radius: 6px;
  color: #182033;
  min-height: 36px;
}

.analytics-filter-period div {
  display: grid;
  gap: 6px;
  grid-template-columns: 1fr 1fr;
}

.analytics-filter-actions {
  align-items: end;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.analytics-customizer {
  background: #ffffff;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  color: #344054;
  overflow: hidden;
}

.analytics-customizer summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  padding: 10px 12px;
}

.analytics-customizer-grid {
  border-top: 1px solid #eef1f5;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  padding: 12px;
}

.analytics-customizer .analytics-toggle-list {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.analytics-customizer .analytics-toggle-chip {
  min-height: 52px;
  padding: 8px 10px;
}

.analytics-kpi-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
}

.analytics-channel-breakdown {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 14px;
}

.analytics-channel-card {
  background: #ffffff;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  box-shadow: 0 12px 35px rgba(29, 41, 57, 0.04);
  color: inherit;
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 14px;
  text-align: left;
}

.analytics-channel-card:hover,
.analytics-channel-card.active {
  border-color: rgba(79, 70, 229, 0.35);
  background: #f5f7ff;
}

.analytics-channel-card span {
  color: #475467;
  font-size: 13px;
  font-weight: 900;
}

.analytics-channel-card strong {
  color: #1d4ed8;
  font-size: 24px;
  line-height: 1.1;
}

.analytics-channel-card small {
  color: #667085;
  font-size: 12px;
  line-height: 1.35;
}

.analytics-kpi-card {
  background: #ffffff;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  box-shadow: 0 12px 35px rgba(29, 41, 57, 0.04);
  display: grid;
  gap: 8px;
  min-height: 112px;
  min-width: 0;
  padding: 13px;
}

.analytics-kpi-head {
  align-items: center;
  color: #475467;
  display: flex;
  font-size: 13px;
  font-weight: 800;
  gap: 8px;
  min-width: 0;
}

.analytics-kpi-mark {
  align-items: center;
  background: #eef2ff;
  border-radius: 7px;
  color: #4f46e5;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 900;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.analytics-kpi-card.green .analytics-kpi-mark {
  background: #eaf8f0;
  color: #138050;
}

.analytics-kpi-card.red .analytics-kpi-mark {
  background: #ffe8ea;
  color: #c33131;
}

.analytics-kpi-card.violet .analytics-kpi-mark {
  background: #f0ecff;
  color: #6d4aff;
}

.analytics-kpi-card strong {
  font-size: 22px;
  line-height: 1.1;
}

.analytics-kpi-foot {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: max-content 1fr;
  min-width: 0;
}

.analytics-sparkline {
  height: 34px;
  width: 100%;
}

.analytics-sparkline polyline {
  fill: none;
  stroke: #5b5ff4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.analytics-sparkline.green polyline {
  stroke: #2fad72;
}

.analytics-sparkline.red polyline {
  stroke: #ef6f6c;
}

.analytics-sparkline.violet polyline {
  stroke: #7c65f6;
}

.analytics-dashboard-layout {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 320px);
}

.analytics-main-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  min-width: 0;
}

.analytics-report-card {
  background: #ffffff;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  box-shadow: 0 12px 35px rgba(29, 41, 57, 0.04);
  display: grid;
  gap: 12px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 14px;
}

.analytics-report-card.span-4 {
  grid-column: span 4;
}

.analytics-report-card.span-5 {
  grid-column: span 5;
}

.analytics-report-card.span-6 {
  grid-column: span 6;
}

.analytics-report-card.span-7 {
  grid-column: span 7;
}

.analytics-report-card.span-12 {
  grid-column: 1 / -1;
}

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

.analytics-card-head h2 {
  font-size: 15px;
  margin: 0;
}

.analytics-card-head span {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.analytics-chart-shell {
  min-height: 220px;
  overflow: hidden;
}

.analytics-line-chart,
.analytics-profit-chart {
  display: block;
  height: 100%;
  min-height: 220px;
  width: 100%;
}

.analytics-chart-gridline {
  stroke: #e7ebf3;
  stroke-width: 1;
}

.analytics-chart-axis,
.analytics-chart-label {
  fill: #667085;
  font-size: 11px;
  font-weight: 700;
}

.analytics-chart-label {
  text-anchor: middle;
}

.analytics-chart-area {
  fill: rgba(91, 95, 244, 0.12);
}

.analytics-chart-line {
  fill: none;
  stroke: #5b5ff4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.analytics-chart-dot {
  fill: #5b5ff4;
  stroke: #ffffff;
  stroke-width: 2;
}

.analytics-profit-bar {
  fill: rgba(91, 95, 244, 0.55);
}

.analytics-margin-line {
  fill: none;
  stroke: #31a66f;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.analytics-bar-list {
  display: grid;
  gap: 11px;
}

.analytics-bar-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(110px, 0.9fr) minmax(90px, 1fr) max-content;
}

.analytics-bar-row span {
  color: #344054;
  font-size: 12px;
  font-weight: 800;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-bar-row strong {
  font-size: 12px;
  text-align: right;
  white-space: nowrap;
}

.analytics-bar-track {
  background: #eef1f6;
  border-radius: 999px;
  height: 9px;
  overflow: hidden;
}

.analytics-bar-track i {
  background: linear-gradient(90deg, #5b5ff4, #7f8cff);
  border-radius: inherit;
  display: block;
  height: 100%;
}

.analytics-channel-layout {
  align-items: center;
  display: grid;
  gap: 16px;
  grid-template-columns: 140px minmax(0, 1fr);
}

.analytics-donut {
  align-items: center;
  border-radius: 50%;
  display: inline-flex;
  height: 132px;
  justify-content: center;
  position: relative;
  width: 132px;
}

.analytics-donut::after {
  background: #ffffff;
  border-radius: 50%;
  content: "";
  height: 76px;
  position: absolute;
  width: 76px;
}

.analytics-donut span {
  font-size: 12px;
  font-weight: 900;
  max-width: 70px;
  position: relative;
  text-align: center;
  z-index: 1;
}

.analytics-channel-list {
  display: grid;
  gap: 9px;
}

.analytics-channel-row {
  align-items: center;
  display: grid;
  gap: 6px;
  grid-template-columns: 10px minmax(0, 1fr) max-content;
}

.analytics-channel-row i {
  border-radius: 999px;
  display: block;
  height: 10px;
  width: 10px;
}

.analytics-channel-row span {
  font-size: 12px;
  font-weight: 800;
}

.analytics-channel-row strong {
  font-size: 12px;
}

.analytics-channel-row small {
  color: #667085;
  grid-column: 2 / -1;
}

.analytics-report-table {
  border-collapse: collapse;
  font-size: 12px;
  width: 100%;
}

.analytics-report-table th,
.analytics-report-table td {
  border-bottom: 1px solid #eef1f5;
  padding: 8px 9px;
  text-align: left;
  vertical-align: middle;
}

.analytics-report-table th {
  color: #667085;
  font-size: 11px;
  font-weight: 900;
}

.analytics-report-table td {
  color: #344054;
}

.analytics-report-table td strong {
  color: #182033;
}

.analytics-report-table small {
  color: #667085;
  display: block;
  margin-top: 2px;
}

.analytics-rank,
.analytics-avatar {
  align-items: center;
  background: #eef2ff;
  border-radius: 999px;
  color: #4f46e5;
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  height: 24px;
  justify-content: center;
  margin-right: 8px;
  width: 24px;
}

.analytics-avatar {
  background: #f2f4f7;
  color: #344054;
}

.analytics-share-bar {
  background: #eef1f6;
  border-radius: 999px;
  display: inline-flex;
  height: 7px;
  margin-right: 8px;
  overflow: hidden;
  vertical-align: middle;
  width: 88px;
}

.analytics-share-bar i {
  background: #7c65f6;
  border-radius: inherit;
  display: block;
}

.analytics-ops-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.analytics-ops-column {
  border-right: 1px solid #eef1f5;
  display: grid;
  gap: 9px;
  padding-right: 12px;
}

.analytics-ops-column:last-child {
  border-right: 0;
  padding-right: 0;
}

.analytics-ops-column h3 {
  font-size: 13px;
  margin: 0 0 2px;
}

.analytics-ops-row {
  align-items: center;
  display: grid;
  gap: 2px 8px;
  grid-template-columns: minmax(0, 1fr) max-content;
  padding-left: 12px;
  position: relative;
}

.analytics-ops-row::before {
  background: #5b5ff4;
  border-radius: 999px;
  content: "";
  height: 8px;
  left: 0;
  position: absolute;
  top: 9px;
  width: 8px;
}

.analytics-ops-row.green::before {
  background: #31a66f;
}

.analytics-ops-row.amber::before {
  background: #f59e0b;
}

.analytics-ops-row.red::before {
  background: #ef6f6c;
}

.analytics-ops-row span {
  font-size: 12px;
  font-weight: 800;
}

.analytics-ops-row strong {
  font-size: 13px;
}

.analytics-ops-row small {
  color: #667085;
  grid-column: 1 / -1;
}

.analytics-ai-panel {
  align-self: start;
  background: #ffffff;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  box-shadow: 0 12px 35px rgba(29, 41, 57, 0.04);
  display: grid;
  gap: 10px;
  padding: 14px;
  position: sticky;
  top: 14px;
}

.analytics-ai-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.analytics-ai-head h2 {
  font-size: 15px;
  margin: 0;
}

.analytics-ai-head span {
  background: #eef2ff;
  border-radius: 999px;
  color: #4f46e5;
  font-size: 12px;
  font-weight: 900;
  padding: 3px 8px;
}

.analytics-ai-card {
  background: #fbfcff;
  border: 1px solid #e6ebf4;
  border-left: 4px solid #5b5ff4;
  border-radius: 8px;
  display: grid;
  gap: 6px;
  padding: 10px;
}

.analytics-ai-card.green {
  border-left-color: #31a66f;
}

.analytics-ai-card.amber {
  border-left-color: #f59e0b;
}

.analytics-ai-card.red {
  border-left-color: #ef6f6c;
}

.analytics-ai-card strong {
  font-size: 13px;
}

.analytics-ai-card p,
.analytics-ai-footer p {
  color: #667085;
  font-size: 12px;
  line-height: 1.35;
  margin: 0;
}

.analytics-ai-card button {
  justify-self: start;
  min-height: 28px;
}

.analytics-ai-footer {
  background: #eef2ff;
  border: 1px solid #d8d2ff;
  border-radius: 8px;
  display: grid;
  gap: 5px;
  padding: 10px;
}

.analytics-status-chip {
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  padding: 4px 8px;
}

.analytics-status-chip.reserved {
  background: #fff7d6;
  color: #9a6700;
}

.analytics-status-chip.shipped {
  background: #e8f1ff;
  color: #2457a6;
}

.analytics-status-chip.paid {
  background: #eaf8f0;
  color: #127446;
}

.analytics-empty {
  align-items: center;
  background: #fbfcff;
  border: 1px dashed #dfe5ef;
  border-radius: 8px;
  color: #667085;
  display: flex;
  min-height: 92px;
  padding: 14px;
}

.settlements-dashboard {
  min-width: 0;
}

.settlements-filter-panel {
  grid-template-columns: minmax(180px, 1.1fr) repeat(5, minmax(120px, 1fr)) minmax(300px, auto);
}

.settlements-kpi-grid {
  grid-template-columns: repeat(5, minmax(160px, 1fr));
}

.settlements-kpi small {
  color: #667085;
  font-size: 11px;
}

.settlement-channel-breakdown {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 14px;
}

.settlement-channel-card {
  background: #ffffff;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  box-shadow: 0 12px 35px rgba(29, 41, 57, 0.04);
  color: inherit;
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 13px;
  text-align: left;
}

.settlement-channel-card:hover,
.settlement-channel-card.active {
  background: #f5f7ff;
  border-color: rgba(79, 70, 229, 0.35);
}

.settlement-channel-card span {
  color: #475467;
  font-size: 13px;
  font-weight: 900;
}

.settlement-channel-card strong {
  color: #1d4ed8;
  font-size: 24px;
  line-height: 1.08;
}

.settlement-channel-card small {
  color: #667085;
  font-size: 11px;
  font-weight: 800;
}

.settlements-layout {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 340px);
}

.settlements-main {
  min-width: 0;
}

.settlements-side {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.settlements-table-card {
  padding: 0;
}

.settlements-table-card .analytics-card-head {
  padding: 14px 14px 0;
}

.settlements-table {
  min-width: 1120px;
}

.settlements-table th,
.settlements-table td {
  padding: 9px 12px;
}

.settlement-counterparty-icon {
  align-items: center;
  background: #eef2ff;
  border-radius: 7px;
  color: #4f46e5;
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  height: 24px;
  justify-content: center;
  margin-right: 8px;
  width: 24px;
}

.settlement-type-pill,
.settlement-status {
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  padding: 4px 8px;
}

.settlement-type-pill.customer {
  background: #eaf8f0;
  color: #127446;
}

.settlement-type-pill.supplier {
  background: #f0ecff;
  color: #5b3fc4;
}

.settlement-channel-cell {
  display: grid;
  gap: 5px;
  min-width: 150px;
}

.settlement-channel-pill,
.settlement-channel-muted {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  gap: 5px;
  justify-content: space-between;
  line-height: 1.1;
  padding: 4px 8px;
  white-space: nowrap;
}

.settlement-channel-pill.online {
  background: #e8f1ff;
  color: #175cd3;
}

.settlement-channel-pill.uman {
  background: #eaf8f0;
  color: #127446;
}

.settlement-channel-muted {
  background: #f3f4f6;
  color: #667085;
  justify-content: center;
}

.settlement-status.ok {
  background: #eaf8f0;
  color: #127446;
}

.settlement-status.waiting {
  background: #fff7d6;
  color: #9a6700;
}

.settlement-status.overdue {
  background: #ffe8ea;
  color: #c33131;
}

.settlement-status.advance {
  background: #e8f1ff;
  color: #175cd3;
}

.settlement-side-list {
  display: grid;
  gap: 10px;
}

.settlement-side-row,
.settlement-transaction {
  align-items: center;
  border: 1px solid #eef1f5;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) max-content;
  padding: 9px 10px;
}

.settlement-side-row span,
.settlement-transaction span {
  font-size: 12px;
  font-weight: 900;
  min-width: 0;
}

.settlement-side-row small,
.settlement-transaction small {
  color: #667085;
  display: block;
  font-size: 11px;
  font-weight: 700;
  margin-top: 2px;
}

.settlement-side-row strong,
.settlement-transaction strong {
  font-size: 12px;
  white-space: nowrap;
}

.settlement-side-row.red,
.settlement-transaction.red {
  background: #fff8f8;
  border-color: #ffd1d1;
}

.settlement-side-row.amber,
.settlement-transaction.amber {
  background: #fffaf0;
  border-color: #ffe1a6;
}

.settlement-side-row.blue {
  background: #f5f8ff;
  border-color: #d9e6ff;
}

.settlement-transaction.green {
  background: #f5fbf8;
  border-color: #caead8;
}

.settlement-rank-list {
  display: grid;
  gap: 9px;
}

.settlement-rank-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: max-content minmax(0, 1fr) max-content;
}

.settlement-rank-row strong {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settlement-rank-row em {
  color: #c33131;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.settlement-ai {
  position: static;
}

.settlement-bars {
  align-items: end;
  border-bottom: 1px solid #eef1f5;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(8, 1fr);
  height: 160px;
}

.settlement-bars i {
  background: linear-gradient(180deg, #56c989, #7c65f6);
  border-radius: 6px 6px 0 0;
  display: block;
  min-height: 8px;
  position: relative;
}

.settlement-bars span {
  bottom: -20px;
  color: #667085;
  font-size: 10px;
  font-style: normal;
  left: 50%;
  position: absolute;
  transform: translateX(-50%);
}

.settlement-card-total {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.settlement-card-total span {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.settlement-card-total strong {
  font-size: 14px;
}

.settlement-aging {
  display: grid;
  gap: 14px;
}

.settlement-aging-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 70px minmax(0, 1fr) max-content;
}

.settlement-aging-row span,
.settlement-aging-row strong {
  font-size: 12px;
  font-weight: 900;
}

.settlement-aging-track {
  background: #eef1f6;
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.settlement-aging-track i {
  background: #31a66f;
  border-radius: inherit;
  display: block;
  height: 100%;
}

.settlement-aging-track i.amber {
  background: #f59e0b;
}

.settlement-aging-track i.red {
  background: #ef6f6c;
}

.settlement-balance-donut {
  align-items: center;
  align-self: center;
  background: conic-gradient(#31a66f 0 var(--receivable), #7c65f6 var(--receivable) 100%);
  border-radius: 50%;
  display: inline-flex;
  height: 150px;
  justify-content: center;
  justify-self: center;
  position: relative;
  width: 150px;
}

.settlement-balance-donut::after {
  background: #ffffff;
  border-radius: 50%;
  content: "";
  height: 88px;
  position: absolute;
  width: 88px;
}

.settlement-balance-donut span {
  font-size: 12px;
  font-weight: 900;
  max-width: 78px;
  position: relative;
  text-align: center;
  z-index: 1;
}

.settlement-donut-legend {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.settlement-donut-legend span {
  align-items: center;
  color: #667085;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  gap: 6px;
}

.settlement-donut-legend i {
  background: #31a66f;
  border-radius: 999px;
  display: block;
  height: 9px;
  width: 9px;
}

.settlement-donut-legend span:last-child i {
  background: #7c65f6;
}

.settlement-quick-actions {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
}

.settlement-action {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  color: #344054;
  display: grid;
  gap: 2px 10px;
  grid-template-columns: 34px minmax(0, 1fr);
  min-height: 62px;
  padding: 10px;
  text-align: left;
}

.settlement-action span {
  align-items: center;
  background: #eef2ff;
  border-radius: 8px;
  color: #4f46e5;
  display: inline-flex;
  font-weight: 900;
  grid-row: span 2;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.settlement-action strong {
  font-size: 12px;
}

.settlement-action small {
  color: #667085;
  font-size: 11px;
}

.cash-dashboard {
  min-width: 0;
}

.cash-filter-panel {
  grid-template-columns: repeat(5, minmax(130px, 1fr)) minmax(120px, auto);
}

.cash-kpi-grid {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
}

.finance-focus-panel,
.analytics-workspace-focus,
.write-off-journal {
  margin-bottom: 14px;
}

.finance-focus-panel {
  background: #ffffff;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.05);
  display: grid;
  gap: 12px;
  padding: 14px;
}

.finance-focus-head {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.finance-focus-head h2 {
  margin: 0 0 4px;
}

.finance-focus-head p {
  color: var(--muted);
  margin: 0;
}

.finance-focus-head > span {
  background: #eef2ff;
  border-radius: 999px;
  color: #4338ca;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 10px;
  white-space: nowrap;
}

.finance-focus-grid,
.analytics-workspace-focus {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.finance-focus-metric {
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px;
}

.finance-focus-metric span,
.finance-focus-metric small {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.finance-focus-metric strong {
  color: #101828;
  font-size: 20px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-focus-metric.green strong {
  color: #067647;
}

.finance-focus-metric.red strong {
  color: #b42318;
}

.finance-focus-metric.warning strong {
  color: #b54708;
}

.finance-focus-metric.blue strong {
  color: #3538cd;
}

.motivation-page {
  display: grid;
  gap: 14px;
}

.motivation-tabs {
  display: inline-flex;
  gap: 6px;
  width: fit-content;
  padding: 4px;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: #f8fafc;
}

.motivation-tabs button {
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #64748b;
  font-weight: 800;
  padding: 10px 16px;
  cursor: pointer;
}

.motivation-tabs button.active {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.18);
}

.motivation-head {
  grid-template-columns: minmax(300px, 1fr) repeat(auto-fit, minmax(170px, 220px));
}

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

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

.motivation-summary-card {
  background: #ffffff;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  box-shadow: 0 12px 35px rgba(29, 41, 57, 0.04);
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 14px;
}

.motivation-summary-card span,
.motivation-summary-card small {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
}

.motivation-summary-card strong {
  color: #182033;
  font-size: 22px;
  line-height: 1.1;
}

.motivation-summary-card.green strong { color: #067647; }
.motivation-summary-card.blue strong { color: #1d4ed8; }
.motivation-summary-card.violet strong { color: #5b21b6; }
.motivation-summary-card.warning strong { color: #b54708; }
.motivation-summary-card.red strong { color: #b42318; }

.motivation-layout {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.motivation-kpi-card,
.motivation-settings-card {
  overflow-x: auto;
}

.motivation-table th,
.motivation-table td,
.motivation-settings-table th,
.motivation-settings-table td {
  vertical-align: middle;
}

.motivation-table td:first-child,
.motivation-settings-table td:first-child {
  min-width: 220px;
}

.motivation-table small,
.motivation-settings-table small {
  color: #667085;
  display: block;
  font-size: 12px;
  margin-top: 2px;
}

.motivation-progress {
  background: #eef1f5;
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
  width: 120px;
}

.motivation-progress span {
  background: linear-gradient(90deg, #2563eb, #22c55e);
  display: block;
  height: 100%;
}

.motivation-replacement-list {
  display: grid;
  gap: 8px;
}

.motivation-order-row {
  align-items: center;
  background: #fbfcff;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  display: grid;
  gap: 4px 10px;
  grid-template-columns: minmax(0, 1fr) max-content;
  padding: 10px;
  text-align: left;
}

.motivation-order-row strong,
.motivation-order-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.motivation-order-row span {
  color: #667085;
  font-size: 12px;
}

.motivation-order-row b {
  color: #067647;
  grid-row: span 2;
}

.motivation-settings-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.finance-review-list {
  display: grid;
  gap: 8px;
}

.finance-review-row {
  align-items: center;
  background: #fbfcff;
  border: 1px solid #eef0f5;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: 130px minmax(160px, 1fr) minmax(180px, 1.4fr) auto auto;
  padding: 9px 10px;
}

.finance-review-row span,
.finance-review-row small {
  color: #667085;
  font-size: 12px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-review-row em {
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  padding: 4px 8px;
  white-space: nowrap;
}

.finance-review-row em.success {
  background: #ecfdf3;
  color: #067647;
}

.finance-review-row em.warning {
  background: #fffaeb;
  color: #b54708;
}

.finance-review-row em.danger {
  background: #fef3f2;
  color: #b42318;
}

.analytics-workspace-focus {
  background: #ffffff;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.05);
  padding: 12px;
}

.cash-layout {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
}

body[data-current-view="incomeExpenses"] .cash-layout {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 340px);
}

body[data-current-view="incomeExpenses"] .cash-table-card,
body[data-current-view="incomeExpenses"] .cash-entry-card {
  min-width: 0;
}

body[data-current-view="incomeExpenses"] .cash-entry-card {
  align-self: start;
  position: sticky;
  top: 12px;
  width: 100%;
}

body[data-current-view="incomeExpenses"] .finance-focus-panel,
body[data-current-view="incomeExpenses"] .cash-layout > * {
  min-width: 0;
}

.cash-table-card {
  min-width: 0;
  padding: 0;
}

.cash-table-card .analytics-card-head {
  padding: 14px 14px 0;
}

.cash-alert {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  color: #c2410c;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 10px;
}

.cash-table {
  min-width: 980px;
}

.cash-table th,
.cash-table td {
  padding: 9px 12px;
  vertical-align: top;
}

.cash-table small {
  color: #667085;
  display: block;
  font-size: 11px;
  font-weight: 700;
  margin-top: 3px;
}

.cash-source-pill {
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  padding: 4px 8px;
}

.cash-source-pill.income {
  background: #ecfdf3;
  color: #067647;
}

.cash-source-pill.expense {
  background: #fef3f2;
  color: #b42318;
}

.cash-amount {
  font-weight: 900;
  text-align: right;
  white-space: nowrap;
}

.cash-amount.income {
  color: #067647;
}

.cash-amount.expense {
  color: #b42318;
}

.employee-card-panel {
  margin-top: 14px;
}

.employee-payment-stats {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 12px 0;
}

.employee-payment-stats div {
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  padding: 10px 12px;
}

.employee-payment-stats span,
.employee-payment-table small {
  color: #667085;
  display: block;
  font-size: 12px;
  font-weight: 700;
}

.employee-payment-stats strong {
  color: #101828;
  display: block;
  font-size: 18px;
  margin-top: 4px;
}

.employee-access-form,
.employee-password-form {
  align-items: end;
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(220px, 1fr) max-content minmax(180px, 0.8fr);
  margin: 0 0 12px;
  padding: 10px 12px;
}

.employee-access-form {
  grid-template-columns: minmax(200px, 0.8fr) minmax(150px, 0.5fr) max-content minmax(180px, 1fr);
}

.employee-access-form label,
.employee-password-form label {
  color: #667085;
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 4px;
}

.employee-access-form select,
.employee-password-form input {
  border: 1px solid #d0d5dd;
  border-radius: 7px;
  font: inherit;
  min-height: 34px;
  padding: 6px 9px;
}

.employee-access-form span,
.employee-password-form span {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.employee-card-actions {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.employee-card-actions label {
  color: #667085;
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 4px;
}

.employee-card-actions input {
  border: 1px solid #d0d5dd;
  border-radius: 7px;
  font: inherit;
  min-height: 32px;
  padding: 5px 8px;
}

.employee-payment-actions {
  white-space: nowrap;
}

.employee-payment-edit-row td {
  background: #f8fafc;
  padding: 10px;
}

.employee-payment-edit-form {
  align-items: end;
  display: grid;
  gap: 8px;
  grid-template-columns: 170px 130px 130px 110px 150px minmax(180px, 1fr) auto;
}

.employee-payment-edit-form label {
  color: #667085;
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 5px;
}

.employee-payment-edit-form input,
.employee-payment-edit-form select {
  border: 1px solid #d0d5dd;
  border-radius: 7px;
  font: inherit;
  min-height: 34px;
  padding: 6px 8px;
  width: 100%;
}

.employee-payment-edit-actions {
  display: flex;
  gap: 6px;
}

.cash-entry-card {
  display: grid;
  gap: 12px;
}

.cash-movement-form {
  display: grid;
  gap: 10px;
}

.cash-movement-form label {
  color: #667085;
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 6px;
}

.cash-movement-form input,
.cash-movement-form select,
.cash-movement-form textarea {
  background: #fbfcff;
  border: 1px solid #dfe5ef;
  border-radius: 7px;
  color: #182033;
  font: inherit;
  min-height: 36px;
  padding: 7px 9px;
}

.cash-movement-form textarea {
  resize: vertical;
}

.site-request-form,
.site-request-workspace {
  align-content: start;
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.site-request-customer {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.site-request-modal-backdrop {
  background: rgba(30, 35, 41, 0.38);
  backdrop-filter: blur(2px);
}

.site-request-dialog {
  box-shadow: 0 26px 80px rgba(30, 35, 41, 0.3);
  margin-bottom: 0;
  max-height: calc(100vh - 48px);
  overflow: auto;
  width: min(1040px, calc(100vw - 32px));
}

.site-request-dialog-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.delivery-badge {
  background: #eef1f5;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 5px;
  padding: 4px 7px;
  text-align: left;
}

.delivery-badge span {
  font-size: 12px;
  font-weight: 700;
}

.delivery-badge small {
  color: #775200;
  font-size: 11px;
  font-weight: 700;
}

.delivery-badge.attention {
  background: #fff7d6;
  border-color: #e7c665;
}

.delivery-badge-table {
  margin-top: 0;
  min-width: 132px;
  width: 100%;
}

.delivery-status-badge {
  align-self: flex-start;
  border: 1px solid transparent;
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  margin-top: 3px;
  padding: 4px 7px;
  white-space: nowrap;
}

.delivery-status-mini {
  font-size: 10px;
  padding: 3px 6px;
}

.delivery-badge .delivery-status-badge {
  font-size: 10px;
  font-weight: 800;
}

.delivery-status-muted {
  background: #f1f3f5;
  border-color: #d9dee5;
  color: #667085;
}

.delivery-status-info {
  background: #eef4ff;
  border-color: #b8cdfc;
  color: #3155b7;
}

.delivery-status-accent {
  background: #f2edff;
  border-color: #c7b8ff;
  color: #5b3fd0;
}

.delivery-status-warning {
  background: #fff6db;
  border-color: #e8c766;
  color: #946200;
}

.delivery-status-success {
  background: #eaf8ef;
  border-color: #a7dbb8;
  color: #137333;
}

.delivery-status-danger {
  background: #ffe8e8;
  border-color: #f0a4a4;
  color: #b42318;
}

.delivery-status-cell {
  min-width: 180px;
}

.delivery-status-cell small {
  color: var(--muted);
  display: block;
  font-size: 11px;
  margin-top: 4px;
}

.delivery-status-select {
  font-size: 12px;
  margin-top: 6px;
  min-height: 30px;
  padding: 5px 7px;
}

.delivery-badge-empty {
  background: #f8faf9;
  color: var(--muted);
}

.site-request-product-match {
  border: 1px solid var(--line);
  border-radius: 6px;
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  min-width: 128px;
  padding: 5px 8px;
}

.site-request-product-match strong {
  font-size: 12px;
}

.site-request-product-match small {
  color: var(--muted);
  font-size: 11px;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-request-product-match.success {
  background: #eef8f1;
  border-color: #b7dfc3;
  color: var(--accent-dark);
}

.site-request-product-match.danger {
  background: #ffe4e4;
  border-color: #f0a8a8;
  color: #b42318;
}

.site-request-product-attention {
  background: #fff4f4;
  box-shadow: inset 3px 0 0 #dc2626;
}

.site-request-delivery-attention {
  background: #fffaf0;
  box-shadow: inset 3px 0 0 #d99a00;
}

.delivery-dialog {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 26px 80px rgba(30, 35, 41, 0.3);
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 48px);
  max-width: 760px;
  overflow: auto;
  padding: 16px;
  width: min(760px, calc(100vw - 32px));
}

.delivery-warning {
  background: #fff7d6;
  border: 1px solid #e7c665;
  border-radius: 6px;
  color: #775200;
  font-weight: 700;
  padding: 10px 12px;
}

.delivery-detail-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
}

.delivery-detail-grid > div {
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 4px;
  padding: 10px;
}

.delivery-detail-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.delivery-detail-grid p {
  margin: 0;
}

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

.delivery-recipient-attention {
  background: #fffaf0;
  border-color: #e7c665 !important;
}

.site-request-command {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.site-request-actions {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.site-request-filters {
  align-items: end;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(150px, 0.8fr) minmax(160px, 0.85fr) minmax(160px, 0.9fr) minmax(150px, 0.75fr) minmax(130px, 0.6fr) minmax(130px, 0.6fr) minmax(220px, 1.2fr) auto auto auto;
  padding-top: 12px;
}

.site-request-filters label {
  min-width: 0;
}

.site-request-filters .muted {
  align-self: center;
  white-space: nowrap;
}

.site-request-pager {
  align-items: center;
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  padding: 8px 10px;
}

.site-request-pager label {
  align-items: center;
  display: flex;
  flex-direction: row;
  gap: 8px;
}

.site-request-pager select {
  min-height: 32px;
  min-width: 82px;
}

.site-request-page-arrows {
  align-items: center;
  display: flex;
  gap: 8px;
}

.site-request-page-arrows span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  min-width: 54px;
  text-align: center;
}

.site-request-board {
  overflow-x: auto;
}

.site-request-table td,
.site-request-table th {
  padding-bottom: 8px;
  padding-top: 8px;
}

.site-request-row-actions {
  white-space: nowrap;
}

.site-requests-smart-page {
  background: #f7f8fc;
  border: 1px solid #e4e8f0;
  border-radius: 8px;
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 12px;
}

.site-requests-smart-head {
  align-items: end;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.site-requests-smart-head h2 {
  color: #111827;
  font-size: 24px;
  margin-top: 3px;
}

.site-requests-smart-head h2 span {
  background: #eef3ff;
  border: 1px solid #cfd8ff;
  border-radius: 999px;
  color: #4f46e5;
  font-size: 12px;
  margin-left: 8px;
  padding: 3px 8px;
  vertical-align: middle;
}

.site-requests-smart-actions,
.site-requests-smart-toolbar {
  align-items: center;
  display: flex;
  gap: 10px;
}

.site-requests-smart-actions button,
.site-requests-smart-toolbar button {
  padding: 0 14px;
}

.site-requests-smart-toolbar {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.05);
  padding: 7px;
}

.site-requests-smart-search {
  flex: 1 1 420px;
}

.site-requests-smart-search input {
  background: #f9fafb;
  border-color: #d7deea;
  min-height: 36px;
}

.site-requests-ai {
  background: #f3f0ff;
  border-color: #d8d2ff;
  color: #4f46e5;
  font-weight: 800;
  opacity: 1;
}

.site-requests-smart-count,
.site-request-filter-count {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 10px;
  white-space: nowrap;
}

.site-requests-smart-count {
  margin-left: auto;
}

.site-request-bulk-toolbar {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d7deea;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.05);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin: 8px 0;
  padding: 8px;
}

.site-request-bulk-summary {
  display: grid;
  gap: 2px;
  min-width: 130px;
}

.site-request-bulk-summary strong {
  color: var(--text);
  font-size: 13px;
}

.site-request-bulk-summary span {
  color: var(--muted);
  font-size: 12px;
}

.site-request-bulk-actions {
  align-items: center;
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.site-request-bulk-actions select {
  min-height: 32px;
  min-width: 180px;
  padding: 4px 8px;
}

.site-request-smart-filters {
  align-items: end;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.04);
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(120px, 0.7fr) minmax(140px, 0.75fr) minmax(160px, 0.9fr) minmax(150px, 0.75fr) minmax(130px, 0.6fr) minmax(130px, 0.6fr) auto;
  padding: 8px 10px;
}

.site-request-smart-filters label {
  font-size: 12px;
}

.site-request-smart-filters select,
.site-request-smart-filters input {
  min-height: 30px;
  padding: 4px 7px;
}

.site-request-smart-stats {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
}

.site-request-smart-stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: inset 3px 0 0 #98a2b3;
  display: grid;
  gap: 4px;
  min-height: 74px;
  padding: 11px;
}

.site-request-smart-stat span,
.site-request-smart-stat small {
  color: var(--muted);
  font-size: 12px;
}

.site-request-smart-stat strong {
  font-size: 20px;
}

.site-request-smart-stat.stat-accent {
  box-shadow: inset 3px 0 0 #635bff;
}

.site-request-smart-stat.stat-success {
  box-shadow: inset 3px 0 0 var(--accent);
}

.site-request-smart-stat.stat-danger {
  box-shadow: inset 3px 0 0 #d92d20;
}

.site-request-smart-stat.stat-warning {
  box-shadow: inset 3px 0 0 #d99a00;
}

.site-request-smart-stat.stat-prom {
  box-shadow: inset 3px 0 0 #8b5cf6;
}

.site-requests-smart-layout {
  align-items: start;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 340px);
  min-width: 0;
}

.site-requests-smart-main {
  min-width: 0;
}

.site-requests-section-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.site-requests-section-head h3 {
  font-size: 17px;
  margin: 0;
}

.site-requests-section-head p {
  font-size: 12px;
  margin-top: 2px;
}

.site-requests-section-head .site-request-pager {
  min-width: min(100%, 430px);
}

.site-requests-table-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(17, 24, 39, 0.06);
  max-height: calc(100vh - 360px);
  min-height: 392px;
  overflow: auto;
}

.site-requests-history-card .site-requests-table-wrap {
  max-height: 430px;
  min-height: 240px;
}

.site-requests-smart-table {
  border: 0;
  min-width: 1120px;
}

.site-requests-smart-table th,
.site-requests-smart-table td {
  font-size: 12px;
  line-height: 1.18;
  padding: 4px 7px;
  vertical-align: middle;
}

.site-requests-smart-table th {
  background: #f8fafc;
  color: #4b5563;
  font-size: 12px;
  position: sticky;
  top: 0;
  z-index: 2;
}

.site-requests-smart-table th:first-child,
.site-requests-smart-table td:first-child {
  text-align: center;
  width: 34px;
}

.site-requests-smart-table input[type="checkbox"] {
  min-height: 14px;
  padding: 0;
  width: 14px;
}

.site-request-smart-row {
  cursor: pointer;
  height: 40px;
}

.site-request-smart-row.is-selected td {
  background: #eef2ff;
  box-shadow: inset 3px 0 0 #4f46e5;
}

.site-request-smart-row.is-selected:hover td {
  background: #e8edff;
}

.site-request-row-sub {
  color: var(--muted);
  display: block;
  font-size: 11px;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-request-channel,
.site-request-state-badge {
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  white-space: nowrap;
}

.site-request-channel {
  background: #f6f8fb;
  color: #344054;
}

.site-status-success,
.document-success,
.document-paid {
  background: #eaf8f0;
  border-color: #b7dfc3;
  color: #127446;
}

.site-status-warning,
.document-warning,
.document-unpaid,
.document-reserved {
  background: #fff7d6;
  border-color: #e7c665;
  color: #775200;
}

.site-status-danger,
.document-cancelled {
  background: #ffe4e4;
  border-color: #f0a8a8;
  color: #b42318;
}

.site-status-prom {
  background: #e8f1ff;
  border-color: #b9d4ff;
  color: #175cd3;
}

.site-status-prom-pending {
  background: #ffe4e4;
  border-color: #f0a8a8;
  color: #b42318;
}

.site-status-prom-stack {
  align-items: flex-start;
  border-radius: 8px;
  flex-direction: column;
  gap: 1px;
  justify-content: center;
  line-height: 1.08;
  min-width: 86px;
  padding: 3px 7px;
  white-space: normal;
}

.site-status-prom-stack small {
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.site-status-neutral,
.site-status-info,
.document-neutral,
.document-converted,
.document-new,
.document-info,
.document-sold {
  background: #eef3ff;
  border-color: #cfd8ff;
  color: #344054;
}

.site-request-row-actions {
  align-items: center;
  display: flex;
  gap: 5px;
}

.site-request-row-actions.is-compact {
  flex-wrap: nowrap;
}

.site-request-row-actions.is-compact button {
  min-height: 28px;
  padding: 0 8px;
}

.site-request-preview-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(17, 24, 39, 0.08);
  display: grid;
  gap: 12px;
  max-height: calc(100vh - 118px);
  overflow: auto;
  padding: 12px;
  position: sticky;
  top: 12px;
}

.site-request-preview-head {
  align-items: start;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.site-request-preview-head h3 {
  font-size: 22px;
  margin: 0;
}

.site-request-preview-empty {
  color: var(--muted);
  display: grid;
  gap: 4px;
  min-height: 180px;
  place-content: center;
  text-align: center;
}

.site-request-preview-empty strong {
  color: var(--text);
  font-size: 18px;
}

.site-request-preview-hero {
  align-items: start;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  border: 1px solid #d9e4f5;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 12px;
}

.site-request-preview-hero h3 {
  font-size: 20px;
  line-height: 1.15;
  margin: 3px 0 4px;
}

.site-request-preview-hero p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.site-request-preview-hero > strong {
  color: #175cd3;
  font-size: 18px;
  white-space: nowrap;
}

.site-request-contact-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.button-like {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  text-decoration: none;
}

.button-like.disabled {
  opacity: 0.45;
  pointer-events: none;
}

.site-request-preview-client {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 4px;
  padding: 12px 0;
}

.site-request-preview-client strong {
  font-size: 17px;
}

.site-request-preview-client span {
  color: var(--muted);
  font-size: 13px;
}

.site-request-business-type-control {
  background: linear-gradient(180deg, #fff7ed 0%, #ffffff 100%);
  border: 1px solid #fdba74;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(249, 115, 22, 0.08);
  display: grid;
  gap: 6px;
  padding: 10px;
}

.site-request-preview-card > .site-request-business-type-control {
  display: grid;
}

.site-request-business-type-control label {
  display: grid;
  gap: 5px;
  font-size: 12px;
  font-weight: 800;
}

.site-request-business-type-control select {
  border-color: #fb923c;
  font-weight: 700;
  min-height: 34px;
}

.site-request-business-type-control small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.site-request-preview-facts {
  display: grid;
  gap: 8px;
}

.site-request-preview-facts div {
  align-items: baseline;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.site-request-preview-facts span,
.site-request-preview-delivery span {
  color: var(--muted);
  font-size: 12px;
}

.site-request-preview-facts strong {
  font-size: 13px;
  text-align: right;
}

.site-request-preview-status {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 10px;
}

.site-request-preview-status h4 {
  font-size: 15px;
  margin: 0;
}

.site-request-preview-status > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.site-request-status-grid {
  display: grid !important;
  gap: 8px !important;
  grid-template-columns: 1fr 1fr;
}

.site-request-status-grid > div,
.site-request-delivery-grid > div {
  background: #ffffff;
  border: 1px solid #e5ebf4;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 8px;
}

.site-request-status-grid span,
.site-request-delivery-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.site-request-status-grid strong,
.site-request-delivery-grid strong {
  font-size: 12px;
  min-width: 0;
}

.warning-text {
  color: #b7791f;
  font-weight: 800;
}

.site-request-preview-alert {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 10px;
}

.site-request-preview-alert span {
  font-size: 13px;
}

.site-request-preview-alert.has-action {
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto;
}

.site-request-preview-alert.has-action strong,
.site-request-preview-alert.has-action span {
  min-width: 0;
}

.site-request-preview-alert-action {
  grid-column: 2;
  grid-row: 1 / span 2;
  justify-self: end;
}

.site-request-preview-alert.alert-danger {
  background: #fff4f4;
  border-color: #f0a8a8;
  color: #b42318;
}

.site-request-preview-alert.alert-warning {
  background: #fffaf0;
  border-color: #e7c665;
  color: #775200;
}

@media (max-width: 560px) {
  .site-request-preview-alert.has-action {
    grid-template-columns: 1fr;
  }

  .site-request-preview-alert-action {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
  }
}

.site-request-preview-delivery {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 10px;
}

.site-request-preview-delivery p {
  font-size: 12px;
  margin: 0;
}

.site-request-delivery-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

.site-request-preview-section {
  display: grid;
  gap: 8px;
}

.site-request-section-title {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.site-request-section-title strong {
  font-size: 15px;
}

.site-request-section-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.site-request-preview-lines {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  padding-top: 10px;
}

.site-request-preview-line {
  align-items: center;
  border: 1px solid #edf1f6;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  padding: 7px;
  padding-right: 34px;
  position: relative;
}

.site-request-preview-line.line-problem {
  background: #fff4f4;
  border-color: #f0a8a8;
}

.site-request-preview-line img,
.site-request-line-photo {
  background: #f3f5f8;
  border: 1px solid #e1e7ef;
  border-radius: 6px;
  height: 42px;
  object-fit: cover;
  width: 42px;
}

.site-request-preview-line strong,
.site-request-preview-line small {
  display: block;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-request-preview-line small {
  color: var(--muted);
  font-size: 12px;
}

.site-request-preview-actions {
  display: grid;
  gap: 8px;
}

.site-request-preview-actions .site-request-row-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.site-request-preview-actions .site-request-row-actions button:first-child,
.site-request-preview-actions .site-request-row-actions button:last-child {
  grid-column: 1 / -1;
}

.site-request-primary-action {
  display: grid;
  gap: 8px;
}

.site-request-primary-action > .primary {
  min-height: 40px;
  width: 100%;
}

.site-request-secondary-actions {
  display: grid;
  gap: 6px;
  grid-template-columns: 1fr 1fr;
}

.site-request-preview-details {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.site-request-preview-details summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.site-request-preview-details[open] summary {
  margin-bottom: 8px;
}

.site-requests-history-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.05);
  display: grid;
  gap: 10px;
  padding: 12px;
}

.site-requests-history-card .site-request-filters {
  border-top: 0;
  grid-template-columns: minmax(150px, 0.8fr) minmax(170px, 0.9fr) auto auto;
  padding-top: 0;
}

.store-integration-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.store-integration-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 260px);
}

.integration-overview,
.integration-log-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.integration-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  margin-bottom: 14px;
}

.integration-grid-wide {
  grid-template-columns: repeat(3, minmax(260px, 1fr));
}

.integration-section-title {
  align-items: end;
  display: flex;
  justify-content: space-between;
  margin: 4px 0 10px;
}

.integration-section-title h2 {
  margin: 0 0 3px;
}

.integration-section-title p {
  color: var(--muted);
  margin: 0;
}

.integration-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.integration-card-head {
  align-items: start;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding-bottom: 10px;
}

.integration-card-head h2 {
  margin-top: 2px;
}

.integration-status.success {
  background: #eef8f1;
  color: var(--accent-dark);
}

.integration-status.danger {
  background: #ffe4e4;
  color: #b42318;
}

.integration-message {
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
  padding: 9px 10px;
}

.integration-toggle {
  color: var(--ink);
  font-weight: 700;
}

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

.integration-fields label:nth-child(2) {
  grid-column: span 2;
}

.integration-config-check {
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 44px;
  padding: 8px 10px;
}

.integration-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.integration-log-table {
  min-width: 860px;
}

.integration-roadmap-panel {
  margin-bottom: 14px;
}

.integration-roadmap {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.integration-roadmap > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  padding: 12px;
}

.integration-roadmap strong {
  font-size: 14px;
}

.integration-roadmap p {
  color: var(--muted);
  margin: 0;
}

.bank-test-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.bank-test-form {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(160px, 0.8fr) minmax(130px, 0.5fr) minmax(260px, 1.5fr) auto;
}

.bank-sync-panel {
  align-items: end;
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(150px, 0.45fr)) repeat(3, auto) minmax(180px, auto);
  padding: 12px;
}

.bank-test-form .span-2 {
  grid-column: span 2;
}

.bank-test-check {
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 44px;
  padding: 8px 10px;
}

.bank-test-actions {
  align-items: end;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.bank-match-preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.bank-match-preview.is-empty {
  background: #f8faf9;
}

.bank-match-preview.success {
  background: #f1f8f4;
  border-color: #b7e1c4;
}

.bank-match-preview.warning {
  background: #fff8e8;
  border-color: #f5d28b;
}

.bank-match-preview.danger {
  background: #fff1f1;
  border-color: #f3b5b5;
}

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

.bank-match-grid div {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 4px;
  padding: 9px 10px;
}

.bank-match-grid span {
  color: var(--muted);
  font-size: 12px;
}

.bank-payments-log {
  display: grid;
  gap: 8px;
  overflow-x: auto;
}

.compact-head {
  min-height: auto;
}

.bank-status.success {
  background: #eef8f1;
  color: var(--accent-dark);
}

.bank-status.warning {
  background: #fff3d8;
  color: #9a5b00;
}

.bank-status.danger {
  background: #ffe4e4;
  color: #b42318;
}

.bank-x-report {
  display: grid;
  gap: 12px;
  overflow-x: auto;
}

.bank-x-report-table {
  min-width: 980px;
}

.bank-manual-queue {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.bank-manual-queue.empty {
  background: #f8faf9;
}

.bank-manual-queue.empty p {
  color: var(--muted);
  margin: 0;
}

.bank-manual-row {
  align-items: end;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(120px, 0.45fr) minmax(220px, 1fr) minmax(210px, 0.75fr) auto;
  padding-top: 10px;
}

.bank-manual-row > div:first-child {
  display: grid;
  gap: 3px;
}

.bank-manual-row span,
.bank-manual-row small {
  color: var(--muted);
}

.bank-manual-purpose {
  display: grid;
  gap: 3px;
}

.order-delivery-documents,
.order-delivery-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  margin: 14px 0;
  padding: 12px;
}

.order-delivery-documents.empty {
  background: #f8faf9;
}

.order-delivery-documents h3 {
  margin: 0 0 4px;
}

.order-delivery-documents p {
  color: var(--muted);
  margin: 0;
}

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

.order-delivery-grid .delivery-wide {
  grid-column: span 2;
}

.order-delivery-grid .delivery-full {
  grid-column: 1 / -1;
}

.delivery-places {
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 10px;
}

.delivery-places-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.delivery-places-head h3 {
  font-size: 15px;
  margin: 0;
}

.delivery-places-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.delivery-place-grid {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 74px repeat(4, minmax(92px, 1fr));
}

.delivery-place-grid strong {
  color: var(--accent-dark);
}

.delivery-place-grid-head {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.delivery-place-grid input {
  min-height: 34px;
}

.delivery-place-summary {
  display: block;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.delivery-payment-hint {
  align-self: stretch;
  background: #f8fbfa;
  border: 1px solid #cfe2dd;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 10px;
}

.delivery-payment-hint div {
  display: grid;
  gap: 2px;
}

.delivery-payment-hint span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.delivery-payment-hint strong {
  color: var(--ink);
  font-size: 16px;
}

.delivery-payment-hint p {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 700;
  grid-column: 1 / -1;
  margin: 0;
}

.success-text {
  color: var(--accent-dark);
  font-weight: 700;
}

.danger-text {
  color: #b42318;
  font-weight: 800;
}

.eyebrow {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.dashboard-actions button {
  padding: 0 14px;
}

.dashboard-stats {
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  margin-bottom: 14px;
}

.dashboard-stats .stat strong {
  font-size: 21px;
}

.dashboard-main {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(520px, 1.25fr) minmax(360px, 0.75fr);
}

.dashboard-panel {
  display: grid;
  gap: 12px;
  align-content: start;
}

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

.dashboard-table {
  border: 0;
}

.dashboard-table th,
.dashboard-table td {
  padding: 9px 8px;
}

.home-dashboard {
  color: #182033;
  display: grid;
  gap: 14px;
}

.home-head {
  align-items: center;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(260px, 0.9fr) minmax(340px, 0.8fr) max-content;
}

.home-head h1 {
  font-size: 28px;
  margin: 0 0 5px;
}

.home-head p,
.home-title-row p {
  color: #667085;
  margin: 0;
}

.home-search {
  background: #ffffff;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 8px 12px;
}

.home-search span {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.home-search input {
  border: 0;
  min-height: 24px;
  padding: 0;
}

.home-search input:focus {
  outline: none;
}

.home-head-actions {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.home-head-actions > button:first-child {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #ffffff;
  font-weight: 800;
}

.home-user-card {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  display: grid;
  gap: 2px 10px;
  grid-template-columns: 34px max-content;
  min-width: 165px;
  padding: 8px 12px;
}

.home-user-card span {
  align-items: center;
  background: #eef2ff;
  border-radius: 999px;
  color: #3730a3;
  display: inline-flex;
  font-weight: 900;
  grid-row: span 2;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.home-user-card strong {
  font-size: 13px;
}

.home-user-card small {
  color: #667085;
}

.home-surface {
  background: #ffffff;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  box-shadow: 0 16px 45px rgba(29, 41, 57, 0.05);
  display: grid;
  gap: 14px;
  padding: 18px;
}

.home-title-row {
  align-items: end;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.home-title-row h2 {
  font-size: 25px;
  margin: 0 0 5px;
}

.home-period-tabs {
  align-items: center;
  background: #f7f8fc;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  display: inline-flex;
  overflow: hidden;
}

.home-period-tabs button {
  background: transparent;
  border: 0;
  border-right: 1px solid #dfe5ef;
  color: #344054;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  min-height: 36px;
  padding: 0 14px;
}

.home-period-tabs button:last-child {
  border-right: 0;
}

.home-period-tabs button.active {
  background: #eef2ff;
  color: #4f46e5;
}

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

.home-plan-panel {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  padding: 14px;
}

.home-plan-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.home-plan-main span,
.home-plan-edit span {
  color: #667085;
  display: block;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 4px;
}

.home-plan-main strong {
  color: #182033;
  display: block;
  font-size: 24px;
  line-height: 1.1;
}

.home-plan-main small {
  color: #667085;
  display: block;
  font-weight: 800;
  margin-top: 4px;
}

.home-plan-progress {
  background: #e4e7ec;
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.home-plan-progress span {
  background: #31a66f;
  display: block;
  height: 100%;
}

.home-plan-edit {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) max-content;
}

.home-plan-edit input {
  background: #ffffff;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  font: inherit;
  font-weight: 800;
  min-height: 38px;
  padding: 8px 10px;
  width: 100%;
}

.home-kpi,
.home-card {
  background: #ffffff;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  box-shadow: 0 12px 35px rgba(29, 41, 57, 0.04);
}

.home-kpi {
  display: grid;
  gap: 8px;
  min-height: 126px;
  padding: 14px;
}

.home-kpi-title {
  align-items: center;
  color: #344054;
  display: flex;
  font-size: 13px;
  font-weight: 900;
  gap: 8px;
  justify-content: space-between;
}

.home-kpi-title i {
  align-items: center;
  background: #eef2ff;
  border-radius: 999px;
  color: #4f46e5;
  display: inline-flex;
  font-style: normal;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.home-kpi.green .home-kpi-title i {
  background: #e8f7f2;
  color: #138050;
}

.home-kpi.orange .home-kpi-title i {
  background: #fff4e5;
  color: #d97706;
}

.home-kpi.red .home-kpi-title i {
  background: #ffe8ea;
  color: #c33131;
}

.home-kpi strong {
  font-size: 23px;
  line-height: 1.1;
}

.home-kpi-foot {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: max-content 1fr;
}

.home-kpi small {
  color: #667085;
  font-size: 11px;
  font-weight: 700;
}

.dashboard-delta {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  padding: 3px 7px;
  white-space: nowrap;
}

.dashboard-delta.positive {
  background: #eaf8f0;
  color: #127446;
}

.dashboard-delta.negative {
  background: #ffe8ea;
  color: #b42318;
}

.dashboard-delta.neutral {
  background: #eef1f5;
  color: #667085;
}

.home-layout {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 300px);
}

.home-main-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  min-width: 0;
}

.home-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 14px;
}

.home-card.span-3 {
  grid-column: span 3;
}

.home-card.span-4 {
  grid-column: span 4;
}

.home-card.span-5 {
  grid-column: span 5;
}

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

.home-card-head h3 {
  font-size: 15px;
  margin: 0;
}

.home-card-head span {
  color: #667085;
  font-size: 12px;
  font-weight: 900;
}

.home-donut-layout {
  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: 150px minmax(0, 1fr);
}

.home-donut,
.home-status-donut {
  align-items: center;
  border-radius: 50%;
  display: inline-flex;
  justify-content: center;
  position: relative;
}

.home-donut {
  height: 148px;
  width: 148px;
}

.home-donut::after,
.home-status-donut::after {
  background: #ffffff;
  border-radius: 50%;
  content: "";
  position: absolute;
}

.home-donut::after {
  height: 82px;
  width: 82px;
}

.home-donut span,
.home-status-donut span {
  font-weight: 900;
  position: relative;
  text-align: center;
  z-index: 1;
}

.home-donut span {
  font-size: 13px;
  max-width: 76px;
}

.home-donut-list {
  display: grid;
  gap: 8px;
}

.home-donut-row {
  align-items: center;
  display: grid;
  gap: 7px;
  grid-template-columns: 10px minmax(0, 1fr) max-content;
}

.home-donut-row i,
.home-status-list i,
.home-chart-legend i {
  border-radius: 999px;
  display: inline-block;
  height: 9px;
  width: 9px;
}

.home-donut-row span {
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-donut-row strong {
  font-size: 12px;
}

.home-donut-row small {
  color: #667085;
  grid-column: 2 / -1;
}

.home-table {
  border: 0;
  border-collapse: collapse;
  font-size: 12px;
  width: 100%;
}

.home-table th,
.home-table td {
  border-bottom: 1px solid #eef1f5;
  padding: 8px 7px;
}

.home-table th {
  background: transparent;
  color: #667085;
  font-size: 11px;
  font-weight: 900;
}

.home-table small {
  color: #667085;
  display: block;
  margin-top: 2px;
}

.home-progress {
  background: #eef1f6;
  border-radius: 999px;
  display: inline-flex;
  height: 7px;
  margin-right: 7px;
  overflow: hidden;
  vertical-align: middle;
  width: 60px;
}

.home-progress i {
  background: #7c65f6;
  border-radius: inherit;
  display: block;
}

.home-status-layout {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: 128px minmax(0, 1fr);
}

.home-status-donut {
  height: 124px;
  width: 124px;
}

.home-status-donut::after {
  height: 70px;
  width: 70px;
}

.home-status-donut span {
  display: grid;
  gap: 2px;
}

.home-status-donut strong {
  font-size: 22px;
}

.home-status-donut small {
  color: #667085;
  font-size: 11px;
}

.home-status-list {
  display: grid;
  gap: 8px;
}

.home-status-list div {
  align-items: center;
  display: grid;
  gap: 6px;
  grid-template-columns: 10px minmax(0, 1fr) max-content;
}

.home-status-list span,
.home-status-list strong {
  font-size: 12px;
}

.home-status-list span {
  font-weight: 800;
}

.home-status-list small {
  color: #667085;
  grid-column: 2 / -1;
}

.home-link-action {
  background: transparent;
  border: 0;
  color: #4f46e5;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  justify-self: center;
}

.home-cash-chart {
  display: grid;
  gap: 12px;
}

.home-chart-legend {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.home-chart-legend span {
  align-items: center;
  color: #667085;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  gap: 6px;
}

.home-chart-legend .green {
  background: #31a66f;
}

.home-chart-legend .red {
  background: #ef6f6c;
}

.home-chart-legend .blue {
  background: #5b5ff4;
}

.home-cash-bars {
  align-items: end;
  border-bottom: 1px solid #dfe5ef;
  border-top: 1px solid #eef1f5;
  display: grid;
  gap: 6px;
  grid-auto-flow: column;
  min-height: 210px;
  overflow: hidden;
  padding-top: 16px;
}

.home-cash-day {
  align-items: end;
  display: flex;
  gap: 2px;
  height: 180px;
  justify-content: center;
  min-width: 12px;
  position: relative;
}

.home-cash-day span {
  border-radius: 4px 4px 0 0;
  display: block;
  width: 5px;
}

.home-cash-day .income {
  background: rgba(49, 166, 111, 0.75);
}

.home-cash-day .expense {
  background: rgba(239, 111, 108, 0.65);
}

.home-cash-day i {
  background: #5b5ff4;
  border-radius: 999px;
  height: 4px;
  left: 50%;
  position: absolute;
  transform: translateX(-50%);
  width: 14px;
}

.home-cash-day small {
  bottom: -22px;
  color: #667085;
  font-size: 10px;
  font-weight: 800;
  left: 50%;
  position: absolute;
  transform: translateX(-50%);
}

.home-tasks {
  display: grid;
  gap: 8px;
}

.home-task {
  align-items: center;
  background: #fbfcff;
  border: 1px solid #e6ebf4;
  border-radius: 8px;
  color: #182033;
  cursor: pointer;
  display: grid;
  gap: 2px 10px;
  grid-template-columns: 32px minmax(0, 1fr) max-content;
  min-height: 58px;
  padding: 8px 10px;
  text-align: left;
}

.home-task span {
  align-items: center;
  background: #eef2ff;
  border-radius: 8px;
  color: #4f46e5;
  display: inline-flex;
  font-weight: 900;
  grid-row: span 2;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.home-task strong {
  font-size: 12px;
}

.home-task small {
  color: #667085;
  font-size: 11px;
}

.home-task em {
  color: #f97316;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  grid-column: 3;
  grid-row: 1 / span 2;
}

.home-side {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.home-events {
  display: grid;
  gap: 10px;
}

.home-event {
  align-items: start;
  display: grid;
  gap: 10px;
  grid-template-columns: 34px minmax(0, 1fr);
}

.home-event > span {
  align-items: center;
  background: #eef2ff;
  border-radius: 10px;
  color: #4f46e5;
  display: inline-flex;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.home-event strong {
  font-size: 12px;
}

.home-event p,
.home-event small {
  color: #667085;
  display: block;
  font-size: 11px;
  line-height: 1.35;
  margin: 2px 0 0;
}

.home-finance-box {
  display: grid;
  gap: 9px;
}

.home-finance-box div {
  align-items: center;
  border-bottom: 1px solid #eef1f5;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding-bottom: 8px;
}

.home-finance-box div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.home-finance-box span {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.home-finance-box strong {
  font-size: 13px;
}

.stat,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.stat span {
  color: var(--muted);
  display: block;
  font-size: 13px;
}

.stat strong {
  display: block;
  font-size: 24px;
  margin-top: 7px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border: 1px solid var(--line);
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #eef1f5;
  font-weight: 700;
}

.status {
  display: inline-block;
  border-radius: 999px;
  background: #eef8f1;
  color: var(--accent-dark);
  padding: 3px 9px;
  font-size: 13px;
}

.status.success {
  background: #e8f7ef;
  color: #047857;
}

.status.warning {
  background: #fff7df;
  color: #a15c00;
}

.status.info {
  background: #eff6ff;
  color: #1d4ed8;
}

.status.danger {
  background: #ffe8e8;
  color: #b42318;
}

.site-request-state {
  border: 1px solid transparent;
  font-weight: 700;
  white-space: nowrap;
}

.site-request-history-states {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.site-request-state-reserved {
  background: #f2ecff;
  border-color: #c8b6ff;
  color: #5b21b6;
}

.site-request-state-unpaid {
  background: #fff2d6;
  border-color: #f4c45f;
  color: #8a4b00;
}

.site-request-state-sold {
  background: #e7f0ff;
  border-color: #aecbfa;
  color: #1d4ed8;
}

.site-request-state-paid {
  background: #dcfce7;
  border-color: #86efac;
  color: #14532d;
}

.site-request-state-cancelled {
  background: #ffe4e4;
  border-color: #f0a8a8;
  color: #b42318;
}

.site-request-state-converted {
  background: #eef1f5;
  border-color: #d5dce5;
  color: #344054;
}

.warning {
  color: var(--warn);
  font-weight: 700;
}

.success {
  color: var(--accent-dark);
  font-weight: 700;
}

@media (max-width: 1250px) {
  .dashboard-stats {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .analytics-command,
  .analytics-config,
  .analytics-layout,
  .analytics-mini-grid,
  .analytics-report-head,
  .analytics-filter-panel,
  .analytics-dashboard-layout,
  .analytics-customizer-grid,
  .home-head,
  .home-layout,
  .home-donut-layout,
  .home-status-layout,
  .dashboard-main,
  .customer-layout,
  .integration-grid,
  .integration-roadmap,
  .price-list-builder,
  .reorder-hero,
  .supplier-directory,
  .supplier-documents-workspace,
  .supplier-order-layout,
  .site-request-layout,
  .warehouse-analytics-grid,
  .warehouse-dashboard-layout,
  .warehouse-focused-layout,
  .orders-smart-layout,
  .orders-smart-insights,
  .site-request-smart-filters,
  .site-request-smart-stats,
  .site-requests-smart-layout {
    grid-template-columns: 1fr;
  }

  .bank-test-form,
  .bank-match-grid,
  .bank-sync-panel,
  .bank-manual-row {
    grid-template-columns: 1fr;
  }

  .customer-segment-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .bank-test-form .span-2 {
    grid-column: auto;
  }

  .warehouse-kpi-grid {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .warehouse-side-column {
    position: static;
  }

  .supplier-directory-card {
    max-height: none;
    position: static;
  }

  .supplier-document-card {
    max-height: none;
    position: static;
  }

  .unified-document-row {
    grid-template-columns: 1fr;
  }

  .unified-document-side {
    justify-items: start;
    text-align: left;
  }

  .unified-document-actions {
    justify-content: flex-start;
  }

  .group-manager-grid {
    grid-template-columns: 1fr;
  }

  .supplier-order-head-grid {
    grid-template-columns: minmax(0, 1fr) minmax(160px, 0.45fr);
  }

  .order-filter-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .site-request-filters {
    grid-template-columns: repeat(4, minmax(140px, 1fr));
  }

  .order-work-tabs {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }

  .order-summary {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }

  .analytics-stats {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .analytics-kpi-grid {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }

  .home-kpi-grid {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }

  .home-plan-panel {
    grid-template-columns: 1fr;
  }

  .home-card.span-3,
  .home-card.span-4,
  .home-card.span-5 {
    grid-column: span 6;
  }

  .analytics-report-card.span-4,
  .analytics-report-card.span-5,
  .analytics-report-card.span-6,
  .analytics-report-card.span-7 {
    grid-column: span 6;
  }

  .analytics-ai-panel {
    position: static;
  }

  .order-catalog-dialog {
    grid-template-rows: auto auto auto;
    overflow: auto;
  }

  .order-catalog-layout {
    grid-template-columns: 1fr;
  }

  .order-catalog-main {
    min-height: 540px;
  }

  .order-recommendations-panel.compact .order-recommendations-grid {
    grid-auto-columns: minmax(240px, calc((100% - 8px) / 2));
  }

  .cash-layout,
  .cash-filter-panel,
  .cash-kpi-grid,
  .finance-focus-grid,
  .analytics-workspace-focus,
  .crm-interaction-form,
  .employee-payment-edit-form,
  .finance-review-row {
    grid-template-columns: 1fr;
  }

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

  .write-off-journal .compact-kpis {
    min-width: 0;
  }

  .order-catalog-sidebar,
  .order-catalog-cart-panel {
    max-height: none;
  }

  .customer-list {
    position: static;
  }
}

@media (max-width: 800px) {
  body {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    height: auto;
    max-height: none;
  }

  nav {
    grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  }

  .main-nav {
    grid-template-columns: 1fr;
  }

  .nav-subitems {
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  }

  nav button {
    text-align: center;
    padding: 8px;
  }

  .nav-subitems button {
    padding: 8px;
  }

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

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

  .period-lock-body {
    grid-template-columns: 1fr;
  }

  .accounting-health-header,
  .accounting-health-item {
    grid-template-columns: 1fr;
  }

  .accounting-health-header {
    flex-direction: column;
  }

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

  .accounting-health-item > div:last-child {
    text-align: left;
  }

  .customer-segment-grid {
    grid-template-columns: 1fr;
  }

  .analytics-command,
  .dashboard-command,
  .site-request-command {
    align-items: stretch;
    flex-direction: column;
  }

  .site-request-dialog {
    max-height: calc(100vh - 24px);
    width: min(100%, calc(100vw - 20px));
  }

  .site-request-dialog-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .order-catalog-backdrop {
    padding: 8px;
  }

  .order-catalog-dialog {
    height: calc(100vh - 16px);
    padding: 10px;
    width: calc(100vw - 16px);
  }

  .order-catalog-header,
  .order-catalog-header-actions,
  .order-catalog-toolbar,
  .order-catalog-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .order-catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  .order-recommendations-head {
    align-items: stretch;
    flex-direction: column;
  }

  .order-recommendations-grid,
  .order-catalog-recommendations-panel .order-recommendations-grid {
    grid-template-columns: 1fr;
    max-height: none;
  }

  .order-recommendations-panel.compact .order-recommendations-grid {
    grid-auto-columns: minmax(240px, 86vw);
    grid-template-columns: none;
  }

  .order-recommendation-card {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .order-recommendation-card .primary.small {
    grid-column: 1 / -1;
  }

  .order-catalog-card-actions,
  .order-edit-catalog-entry,
  .invoice-add-head {
    align-items: stretch;
    flex-direction: column;
  }

  .order-catalog-card-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .invoice-add-actions {
    justify-items: stretch;
  }

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

  .delivery-dialog {
    max-height: calc(100vh - 24px);
    width: min(100%, calc(100vw - 20px));
  }

  .catalog-command,
  .draft-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-actions {
    justify-content: flex-start;
  }

  .analytics-stats,
  .dashboard-stats,
  .dashboard-main {
    grid-template-columns: 1fr;
  }

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

  .analytics-filters,
  .analytics-report-head,
  .analytics-filter-panel,
  .analytics-dashboard-layout,
  .analytics-customizer-grid,
  .analytics-main-grid,
  .analytics-ops-grid,
  .analytics-channel-layout,
  .home-head,
  .home-layout,
  .home-main-grid,
  .home-kpi-grid,
  .home-donut-layout,
  .home-status-layout,
  .catalog-workspace,
  .catalog-toolbar,
  .category-create,
  .integration-fields,
  .orders-smart-filters,
  .orders-smart-layout,
  .orders-smart-insights,
  .site-request-smart-filters,
  .site-request-smart-stats,
  .site-requests-smart-layout,
  .warehouse-kpi-grid,
  .warehouse-analytics-grid,
  .warehouse-dashboard-layout,
  .warehouse-focused-layout,
  .warehouse-dashboard-page .warehouse-toolbar,
  .order-detail-layout,
  .order-info-panel,
  .order-delivery-grid,
  .bank-test-form,
  .bank-match-grid,
  .bank-sync-panel,
  .bank-manual-row,
  .reorder-stat-grid,
  .site-request-customer,
  .site-request-filters,
  .supplier-order-head-grid,
  .supplier-order-summary-cards,
  .store-integration-grid {
    grid-template-columns: 1fr;
  }

  .bank-test-form .span-2 {
    grid-column: auto;
  }

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

  .analytics-filter-actions,
  .analytics-period-buttons,
  .analytics-card-head,
  .home-head-actions,
  .home-title-row,
  .home-plan-edit,
  .home-card-head {
    align-items: stretch;
    flex-direction: column;
  }

  .home-plan-edit {
    display: grid;
    grid-template-columns: 1fr;
  }

  .analytics-filter-actions {
    justify-content: flex-start;
  }

  .analytics-report-card.span-4,
  .analytics-report-card.span-5,
  .analytics-report-card.span-6,
  .analytics-report-card.span-7,
  .analytics-report-card.span-12 {
    grid-column: 1 / -1;
  }

  .home-card.span-3,
  .home-card.span-4,
  .home-card.span-5 {
    grid-column: 1 / -1;
  }

  .home-period-tabs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .home-period-tabs button {
    border-bottom: 1px solid #dfe5ef;
  }

  .home-task {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .home-task em {
    grid-column: 2;
    grid-row: auto;
  }

  .analytics-manager-table th:nth-child(3),
  .analytics-manager-table td:nth-child(3),
  .analytics-manager-table th:nth-child(5),
  .analytics-manager-table td:nth-child(5),
  .analytics-manager-table th:nth-child(6),
  .analytics-manager-table td:nth-child(6),
  .analytics-manager-table th:nth-child(7),
  .analytics-manager-table td:nth-child(7),
  .analytics-control-table th:nth-child(3),
  .analytics-control-table td:nth-child(3),
  .analytics-control-table th:nth-child(4),
  .analytics-control-table td:nth-child(4) {
    display: none;
  }

  .analytics-bar-row {
    grid-template-columns: 1fr;
  }

  .analytics-ops-column {
    border-right: 0;
    border-bottom: 1px solid #eef1f5;
    padding: 0 0 12px;
  }

  .analytics-ops-column:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .reorder-action-bar,
  .supplier-panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .reorder-main-actions {
    justify-content: flex-start;
  }

  .catalog-sidebar,
  .catalog-preview {
    position: static;
  }

  .integration-fields label:nth-child(2) {
    grid-column: auto;
  }

  .order-delivery-grid .delivery-wide {
    grid-column: auto;
  }

  .order-delivery-grid .delivery-full {
    grid-column: auto;
  }

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

  .delivery-place-grid,
  .delivery-place-grid-head {
    grid-template-columns: 1fr 1fr;
  }

  .order-sale-layout,
  .order-setup-grid,
  .order-product-add,
  .invoice-meta-grid,
  .quick-customer-form {
    grid-template-columns: 1fr;
  }

  .order-create-head {
    align-items: stretch;
    flex-direction: column;
  }

  .orders-smart-head,
  .site-requests-smart-head,
  .warehouse-dashboard-head,
  .warehouse-stock-head,
  .order-detail-top,
  .order-lines-head,
  .orders-smart-toolbar,
  .site-requests-smart-toolbar,
  .orders-section-head,
  .site-requests-section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .order-detail-actions,
  .order-lines-actions {
    justify-content: flex-start;
  }

  .order-detail-side {
    position: static;
  }

  .order-info-column {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 0 0 12px;
  }

  .order-info-column:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .orders-smart-count {
    margin-left: 0;
  }

  .orders-smart-search,
  .site-requests-smart-search {
    flex: 1 1 auto;
    width: 100%;
  }

  .orders-preview-card,
  .site-request-preview-card {
    position: static;
  }

  .order-create-total {
    text-align: left;
  }

  .order-draft-card {
    padding: 12px;
  }

  .draft-actions {
    justify-content: flex-start;
  }

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

  .order-filter-grid,
  .audit-filter-grid,
  .order-summary {
    grid-template-columns: 1fr;
  }

  .order-work-tabs {
    grid-template-columns: 1fr 1fr;
  }

  .journal-payment-stats {
    grid-template-columns: 1fr;
  }

  .order-edit-head,
  .order-edit-add,
  .order-return-actions {
    grid-template-columns: 1fr;
  }

  .customer-layout,
  .customer-edit-form,
  .customer-pay-form,
  .customer-stats {
    grid-template-columns: 1fr;
  }

  .customer-list {
    position: static;
  }

  .customer-phone-row {
    grid-template-columns: 1fr;
  }

  .customer-phone-editor-head {
    align-items: stretch;
    flex-direction: column;
  }

  .purchase-layout,
  .purchase-history,
  .purchase-history.has-selection,
  .purchase-head,
  .purchase-line-form,
  .inventory-document-bar,
  .inventory-layout,
  .mini-stats,
  .supplier-stats,
  .product-finance-grid {
    grid-template-columns: 1fr;
  }

  .warehouse-toolbar,
  .warehouse-admin {
    grid-template-columns: 1fr;
  }

  .location-create-form {
    grid-template-columns: 1fr;
  }

  .warehouse-detail {
    position: static;
  }

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

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .document-title-row,
  .signatures {
    flex-direction: column;
  }

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

@media print {
  @page {
    margin: 12mm;
  }

  body {
    background: white;
    display: block;
  }

  .sidebar,
  .topbar,
  .order-card,
  .panel:not(.order-card):not(.return-act),
  nav {
    display: none !important;
  }

  .shell {
    padding: 0;
  }

  .print-document {
    border: 0;
    border-radius: 0;
    margin: 0;
    padding: 0;
  }

  body.printing-document * {
    visibility: hidden !important;
  }

  body.printing-document .print-active,
  body.printing-document .print-active * {
    visibility: visible !important;
  }

  body.printing-document .print-active {
    display: block !important;
    left: 0;
    position: absolute;
    top: 0;
    width: 100%;
  }

  body.printing-document .print-document:not(.print-active) {
    display: none !important;
  }

  body.printing-document > :not(.print-root) {
    display: none !important;
  }

  body.printing-document .print-root {
    display: block !important;
    margin: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    position: static !important;
    width: auto !important;
  }

  body.printing-document .print-root,
  body.printing-document .print-root * {
    visibility: visible !important;
  }

  body.printing-document .print-root .print-document {
    border: 0 !important;
    border-radius: 0 !important;
    display: block !important;
    left: auto !important;
    margin: 0 !important;
    max-width: none !important;
    min-height: 0 !important;
    padding: 0 !important;
    position: static !important;
    top: auto !important;
    width: auto !important;
  }

  .document-title-row,
  .signatures {
    break-inside: avoid;
  }

  .receipt-summary {
    grid-template-columns: repeat(4, 1fr);
  }

  .report-summary-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .document-parties,
  .receipt-summary div,
  .official-document-meta {
    border-color: #333;
  }

  .official-requisites {
    grid-template-columns: repeat(3, 1fr);
  }

  .print-document table {
    border-color: #333;
  }

  .print-document th,
  .print-document td {
    border-color: #333;
  }

  .invoice-product-photo {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}

/* Final smart order workspace overrides */
.site-request-smart-stats {
  grid-template-columns: repeat(6, minmax(130px, 1fr));
}

.orders-smart-insights {
  grid-template-columns: repeat(8, minmax(118px, 1fr));
}

.erp-status-tabs {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.erp-status-tab {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d8e0ec;
  border-radius: 8px;
  color: #344054;
  cursor: pointer;
  display: flex;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  justify-content: space-between;
  min-height: 40px;
  padding: 0 12px;
}

.erp-status-tab strong {
  align-items: center;
  background: #eef2ff;
  border-radius: 999px;
  color: #2563eb;
  display: inline-flex;
  font-size: 13px;
  justify-content: center;
  min-width: 28px;
  padding: 3px 8px;
}

.erp-status-tab.active {
  border-color: #2563eb;
  box-shadow: inset 3px 0 0 #2563eb;
  color: #1d4ed8;
}

.erp-status-badge,
.erp-finance-badge {
  align-items: center;
  border: 1px solid #d8e0ec;
  border-radius: 7px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
  min-height: 24px;
  padding: 3px 8px;
  white-space: nowrap;
}

.order-sla-badge {
  align-items: center;
  border: 1px solid #d8e0ec;
  border-radius: 999px;
  display: inline-flex;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  margin: 3px 4px 0 0;
  min-height: 20px;
  padding: 3px 7px;
  white-space: nowrap;
}

.order-sla-ok {
  background: #ecfdf3;
  border-color: #bbf7d0;
  color: #15803d;
}

.order-sla-warning {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b45309;
}

.order-sla-danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

.erp-status-blue {
  background: #dbeafe;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.erp-status-red,
.finance-error,
.finance-unpaid {
  background: #fee2e2;
  border-color: #fecaca;
  color: #dc2626;
}

.erp-status-orange,
.finance-awaiting {
  background: #ffedd5;
  border-color: #fed7aa;
  color: #c2410c;
}

.erp-status-green,
.finance-paid {
  background: #dcfce7;
  border-color: #bbf7d0;
  color: #15803d;
}

.erp-status-violet {
  background: #f3e8ff;
  border-color: #e9d5ff;
  color: #7c3aed;
}

.site-requests-smart-layout,
.orders-smart-layout {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 360px);
}

.site-requests-smart-table {
  min-width: 1180px;
  table-layout: fixed;
  width: 100%;
}

.orders-smart-table {
  min-width: 1460px;
  table-layout: fixed;
  width: 100%;
}

.site-requests-smart-table th:first-child,
.site-requests-smart-table td:first-child,
.orders-smart-table.order-work-table th:first-child,
.orders-smart-table.order-work-table td:first-child {
  text-align: left;
  width: auto;
}

.site-requests-smart-table th:nth-child(1) { width: 138px; }
.site-requests-smart-table th:nth-child(2) { width: 190px; }
.site-requests-smart-table th:nth-child(3) { width: 136px; }
.site-requests-smart-table th:nth-child(4) { width: 96px; }
.site-requests-smart-table th:nth-child(5) { width: 176px; }
.site-requests-smart-table th:nth-child(6) { width: 132px; }
.site-requests-smart-table th:nth-child(7) { width: 148px; }
.site-requests-smart-table th:nth-child(8) { width: 140px; }
.site-requests-smart-table th:nth-child(9) { width: 118px; }

.orders-smart-table.order-work-table th:nth-child(1) { width: 92px; }
.orders-smart-table.order-work-table th:nth-child(2) { width: 128px; }
.orders-smart-table.order-work-table th:nth-child(3) { width: 220px; }
.orders-smart-table.order-work-table th:nth-child(4) { width: 100px; }
.orders-smart-table.order-work-table th:nth-child(5) { width: 164px; }
.orders-smart-table.order-work-table th:nth-child(6) { width: 168px; }
.orders-smart-table.order-work-table th:nth-child(7) { width: 150px; }
.orders-smart-table.order-work-table th:nth-child(8) { width: 130px; }
.orders-smart-table.order-work-table th:nth-child(9) { width: 144px; }
.orders-smart-table.order-work-table th:nth-child(10) { width: 142px; }
.orders-smart-table.order-work-table th:nth-child(11) { width: 112px; }

.site-requests-smart-table th,
.site-requests-smart-table td,
.orders-smart-table th,
.orders-smart-table td {
  height: auto;
  line-height: 1.28;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: normal;
}

.site-requests-smart-table td > strong,
.site-requests-smart-table td > span,
.orders-smart-table td > strong,
.orders-smart-table td > span {
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
}

.orders-smart-table td > strong,
.orders-smart-table td > span:not(.status):not(.channel-pill):not(.priority-pill):not(.customer-business-type-badge),
.orders-smart-table .order-delivery-cell,
.orders-smart-table .order-row-sub,
.orders-smart-table .order-row-manager,
.site-requests-smart-table .site-request-row-sub {
  white-space: normal;
}

.orders-smart-table .status,
.orders-smart-table .channel-pill,
.orders-smart-table .priority-pill,
.orders-smart-table .customer-business-type-badge,
.orders-smart-table .customer-internal-note-badge,
.orders-smart-table .order-workflow-badge,
.orders-smart-table .order-payment-marker,
.site-requests-smart-table .site-request-channel,
.site-requests-smart-table .site-request-state-badge {
  line-height: 1.15;
  max-width: 100%;
  min-width: 0;
  text-align: left;
  white-space: normal;
}

.orders-smart-table .order-status-stack,
.orders-smart-table .order-needs-action-chips,
.site-requests-smart-table .site-request-row-actions {
  max-width: 100%;
}

.site-requests-smart-table .site-request-row-actions.is-compact {
  flex-wrap: wrap;
}

.site-request-preview-comment,
.orders-preview-comment,
.site-request-preview-history,
.orders-preview-history,
.orders-preview-execution {
  background: #f8fafc;
  border: 1px solid #e5ebf3;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 10px;
}

.orders-preview-actions > strong,
.site-request-preview-actions > strong {
  color: #344054;
  font-size: 12px;
  font-weight: 900;
  grid-column: 1 / -1;
}

.orders-preview-steps {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.orders-preview-steps span {
  align-items: center;
  color: #667085;
  display: grid;
  font-size: 10px;
  gap: 4px;
  justify-items: center;
  text-align: center;
}

.orders-preview-steps i {
  background: #e5e7eb;
  border: 2px solid #cbd5e1;
  border-radius: 999px;
  display: block;
  height: 16px;
  width: 16px;
}

.orders-preview-steps span.done i {
  background: #bbf7d0;
  border-color: #22c55e;
}

.orders-preview-steps span.active i {
  background: #2563eb;
  border-color: #2563eb;
}

.executive-control-panel {
  display: grid;
  gap: 14px;
  margin: 16px 0;
}

.executive-control-head {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e5ebf3;
  border-radius: 8px;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 16px 18px;
}

.executive-control-head h2 {
  color: #101828;
  font-size: 22px;
  line-height: 1.15;
  margin: 2px 0 4px;
}

.executive-control-head p,
.executive-control-note span {
  color: #667085;
  font-size: 13px;
  margin: 0;
}

.executive-control-note {
  background: #f8fafc;
  border: 1px solid #e5ebf3;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  max-width: 420px;
  padding: 10px 12px;
}

.executive-control-note strong {
  color: #344054;
  font-size: 12px;
  text-transform: uppercase;
}

.executive-kpi-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.executive-kpi-card {
  background: #ffffff;
  border: 1px solid #e5ebf3;
  border-left: 4px solid #2563eb;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  min-height: 92px;
  padding: 12px;
}

.executive-kpi-card span {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.executive-kpi-card strong {
  color: #101828;
  font-size: 26px;
  line-height: 1;
}

.executive-kpi-card small {
  color: #667085;
  font-size: 12px;
}

.executive-kpi-card.green { border-left-color: #16a34a; }
.executive-kpi-card.amber { border-left-color: #f59e0b; }
.executive-kpi-card.red { border-left-color: #dc2626; }
.executive-kpi-card.blue { border-left-color: #2563eb; }

.executive-control-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.executive-table {
  font-size: 12px;
  table-layout: auto;
}

.executive-table th,
.executive-table td {
  padding: 9px 10px;
  vertical-align: top;
}

.executive-table td small {
  color: #667085;
  display: block;
  font-size: 11px;
  line-height: 1.25;
  margin-top: 3px;
}

.executive-critical-row {
  background: #fff7ed;
}

.executive-critical-row td:first-child {
  border-left: 3px solid #f97316;
}

.executive-norm-bar {
  background: #eef2f7;
  border-radius: 999px;
  display: block;
  height: 7px;
  margin-bottom: 4px;
  overflow: hidden;
  width: 92px;
}

.executive-norm-bar i {
  background: #2563eb;
  border-radius: inherit;
  display: block;
  height: 100%;
}

@media (max-width: 1280px) {
  .executive-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .executive-control-head {
    align-items: stretch;
    flex-direction: column;
  }

  .executive-kpi-grid,
  .executive-control-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1250px) {
  .warehouse-assembly-workspace .warehouse-work-head {
    align-items: stretch;
    flex-direction: column;
  }

  .warehouse-work-search {
    flex: 1 1 auto;
  }

  .warehouse-assembly-kpis {
    grid-template-columns: repeat(4, minmax(130px, 1fr));
  }

  .warehouse-lifecycle-flow {
    grid-template-columns: repeat(8, minmax(140px, 1fr));
  }
}

@media (max-width: 900px) {
  .warehouse-assembly-workspace .warehouse-work-head h2 {
    font-size: 26px;
  }

  .warehouse-assembly-kpis {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }

  .warehouse-lifecycle-card,
  .warehouse-work-table-card,
  .warehouse-route-card {
    padding: 16px;
  }

  .warehouse-route-card-head,
  .warehouse-route-subhead,
  .warehouse-route-select-row,
  .warehouse-route-actions,
  .warehouse-route-archive-tools,
  .warehouse-route-period-shift {
    align-items: stretch;
    flex-direction: column;
  }

  .warehouse-route-summary,
  .warehouse-route-form,
  .warehouse-route-archive-stats {
    grid-template-columns: 1fr;
  }

  .warehouse-work-inline-form {
    grid-template-columns: 1fr;
  }

  .warehouse-work-wide {
    grid-column: auto;
  }

  .warehouse-delivery-inline-form .delivery-wide,
  .warehouse-delivery-inline-form .delivery-full {
    grid-column: auto;
  }

  .warehouse-work-inline-form > .warehouse-delivery-inline-head {
    align-items: stretch;
    flex-direction: column;
  }

  .warehouse-delivery-payment-hint {
    grid-template-columns: 1fr;
  }
}

/* Responsive workspace layer */
body {
  grid-template-columns: clamp(220px, 17vw, 260px) minmax(0, 1fr);
}

.shell,
.orders-smart-page,
.site-requests-smart-page,
.warehouse-assembly-page,
.warehouse-workspace,
.warehouse-work-table-card,
.orders-smart-main,
.site-requests-smart-main {
  max-width: 100%;
  min-width: 0;
}

.shell {
  padding: clamp(10px, 1.35vw, 22px);
}

body[data-current-view="orders"] .shell,
body[data-current-view="siteRequests"] .shell,
body[data-current-view="warehouseOrders"] .shell {
  padding: clamp(10px, 1.05vw, 16px);
}

.orders-smart-head,
.site-requests-smart-head,
.warehouse-assembly-workspace .warehouse-work-head,
.orders-smart-toolbar,
.site-requests-smart-toolbar,
.orders-section-head,
.site-requests-section-head {
  flex-wrap: wrap;
  min-width: 0;
}

.orders-smart-actions,
.site-requests-smart-actions,
.warehouse-work-inline-actions,
.warehouse-work-actions,
.warehouse-next-action {
  flex-wrap: wrap;
  min-width: 0;
}

.orders-smart-search,
.site-requests-smart-search,
.warehouse-work-search {
  flex: 1 1 min(100%, 340px);
  min-width: min(100%, 260px);
}

.orders-smart-layout,
.site-requests-smart-layout {
  grid-template-columns: minmax(0, 1fr) clamp(300px, 24vw, 360px);
}

body[data-current-view="siteRequests"] .site-requests-smart-layout {
  grid-template-columns: minmax(0, 1fr) clamp(280px, 21vw, 330px);
}

.orders-preview-card,
.site-request-preview-card {
  max-width: 100%;
}

.orders-smart-filters,
.site-request-smart-filters {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.site-request-smart-stats,
.orders-smart-insights,
.warehouse-assembly-kpis {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.warehouse-lifecycle-flow {
  grid-auto-flow: column;
  grid-auto-columns: minmax(138px, 1fr);
  grid-template-columns: none;
}

.orders-table-wrap,
.site-requests-table-wrap,
.warehouse-work-table-shell {
  max-width: 100%;
  overscroll-behavior-x: contain;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.orders-smart-table {
  min-width: max(1240px, 100%);
}

.site-requests-smart-table {
  min-width: max(1040px, 100%);
}

body[data-current-view="siteRequests"] .site-requests-table-wrap {
  overflow-x: hidden;
}

body[data-current-view="siteRequests"] .site-requests-smart-table {
  min-width: 0;
  table-layout: fixed;
  width: 100%;
}

body[data-current-view="siteRequests"] .site-requests-smart-table th,
body[data-current-view="siteRequests"] .site-requests-smart-table td {
  font-size: 11px;
  padding: 4px 5px;
}

body[data-current-view="siteRequests"] .site-requests-smart-table.no-selection th:nth-child(1) { width: 11%; }
body[data-current-view="siteRequests"] .site-requests-smart-table.no-selection th:nth-child(2) { width: 17%; }
body[data-current-view="siteRequests"] .site-requests-smart-table.no-selection th:nth-child(3) { width: 11%; }
body[data-current-view="siteRequests"] .site-requests-smart-table.no-selection th:nth-child(4) { width: 8%; }
body[data-current-view="siteRequests"] .site-requests-smart-table.no-selection th:nth-child(5) { width: 15%; }
body[data-current-view="siteRequests"] .site-requests-smart-table.no-selection th:nth-child(6) { width: 10%; }
body[data-current-view="siteRequests"] .site-requests-smart-table.no-selection th:nth-child(7) { width: 13%; }
body[data-current-view="siteRequests"] .site-requests-smart-table.no-selection th:nth-child(8) { width: 8%; }
body[data-current-view="siteRequests"] .site-requests-smart-table.no-selection th:nth-child(9) { width: 7%; }

body[data-current-view="siteRequests"] .site-requests-smart-table.has-selection th:nth-child(1) { width: 4%; }
body[data-current-view="siteRequests"] .site-requests-smart-table.has-selection th:nth-child(2) { width: 11%; }
body[data-current-view="siteRequests"] .site-requests-smart-table.has-selection th:nth-child(3) { width: 16%; }
body[data-current-view="siteRequests"] .site-requests-smart-table.has-selection th:nth-child(4) { width: 10%; }
body[data-current-view="siteRequests"] .site-requests-smart-table.has-selection th:nth-child(5) { width: 8%; }
body[data-current-view="siteRequests"] .site-requests-smart-table.has-selection th:nth-child(6) { width: 14%; }
body[data-current-view="siteRequests"] .site-requests-smart-table.has-selection th:nth-child(7) { width: 10%; }
body[data-current-view="siteRequests"] .site-requests-smart-table.has-selection th:nth-child(8) { width: 12%; }
body[data-current-view="siteRequests"] .site-requests-smart-table.has-selection th:nth-child(9) { width: 8%; }
body[data-current-view="siteRequests"] .site-requests-smart-table.has-selection th:nth-child(10) { width: 7%; }

body[data-current-view="siteRequests"] .site-requests-smart-table td,
body[data-current-view="siteRequests"] .site-requests-smart-table th,
body[data-current-view="siteRequests"] .site-requests-smart-table .site-request-row-sub,
body[data-current-view="siteRequests"] .site-requests-smart-table .site-request-phone {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-current-view="siteRequests"] .site-requests-smart-table .site-request-row-sub {
  white-space: nowrap;
}

body[data-current-view="siteRequests"] .site-requests-smart-table .erp-status-badge,
body[data-current-view="siteRequests"] .site-requests-smart-table .erp-finance-badge,
body[data-current-view="siteRequests"] .site-requests-smart-table .site-request-channel {
  font-size: 10px;
  padding: 2px 5px;
}

.warehouse-assembly-table {
  min-width: max(1040px, 100%);
}

@media (max-width: 1500px) {
  body {
    grid-template-columns: clamp(210px, 18vw, 240px) minmax(0, 1fr);
  }

  .orders-smart-table {
    min-width: 1180px;
  }

  .site-requests-smart-table {
    min-width: 980px;
  }

  .warehouse-assembly-table {
    min-width: 980px;
  }
}

@media (max-width: 1250px) {
  .orders-smart-layout,
  .site-requests-smart-layout {
    grid-template-columns: 1fr;
  }

  .orders-preview-card,
  .site-request-preview-card {
    max-height: none;
    position: static;
  }

  .orders-table-wrap,
  .site-requests-table-wrap {
    max-height: min(62vh, 620px);
  }

  .warehouse-assembly-workspace .warehouse-work-head {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 900px) {
  body {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-bottom: 1px solid var(--line);
    border-right: 0;
    height: auto;
    max-height: 42vh;
    overflow-y: auto;
    position: static;
  }

  .shell {
    padding: 10px;
  }

  .orders-smart-page,
  .site-requests-smart-page,
  .warehouse-assembly-page {
    padding: 10px;
  }

  .orders-smart-actions,
  .site-requests-smart-actions,
  .order-channel-head,
  .orders-smart-toolbar,
  .site-requests-smart-toolbar {
    align-items: stretch;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .orders-smart-search,
  .site-requests-smart-search,
  .orders-smart-search input,
  .site-requests-smart-search input {
    grid-column: 1 / -1;
    width: 100%;
  }

  .orders-smart-count,
  .site-requests-smart-count {
    margin-left: 0;
    white-space: normal;
  }

	  .site-request-smart-stats,
	  .orders-smart-insights,
	  .order-channel-flow,
	  .order-channel-stats,
	  .settlement-channel-breakdown,
	  .warehouse-assembly-kpis,
    .motivation-head,
    .motivation-summary-grid,
    .motivation-settings-grid {
	    grid-template-columns: repeat(2, minmax(0, 1fr));
	  }

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

  .motivation-layout .span-6,
  .motivation-layout .span-12 {
    grid-column: 1 / -1;
  }

  .orders-table-wrap,
  .site-requests-table-wrap,
  .warehouse-work-table-shell {
    max-height: none;
    min-height: 260px;
  }

  .orders-smart-table {
    min-width: 1080px;
  }

  .site-requests-smart-table,
  .warehouse-assembly-table {
    min-width: 900px;
  }

  .customer-payment-editor-grid,
  .customer-payment-editor-summary {
    grid-template-columns: 1fr;
  }

  .customer-payment-editor-doc {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .orders-smart-actions,
  .site-requests-smart-actions,
  .orders-smart-toolbar,
  .site-requests-smart-toolbar,
	  .site-request-smart-stats,
	  .orders-smart-insights,
	  .order-channel-flow,
	  .order-channel-stats,
	  .settlement-channel-breakdown,
	  .warehouse-assembly-kpis,
    .motivation-head,
    .motivation-summary-grid,
    .motivation-quality-grid,
    .motivation-settings-grid {
	    grid-template-columns: 1fr;
	  }

  .orders-smart-table {
    min-width: 980px;
  }

  .site-requests-smart-table,
  .warehouse-assembly-table {
    min-width: 820px;
  }

  .warehouse-lifecycle-flow {
    grid-auto-columns: minmax(128px, 72vw);
  }

  .customer-payment-editor {
    margin: 6px 0;
    padding: 10px;
  }

  .customer-payment-editor-head,
  .customer-payment-editor-actions {
    align-items: stretch;
    flex-direction: column;
  }
}
