.data-table--orders {
  --table-min-width: 960px;
  font-size: 14px;
}
.so-col-date {
  width: 106px;
}
.so-col-id {
  width: 108px;
}
.so-col-amount {
  width: 100px;
}
.so-col-stage {
  width: 126px;
}
.so-col-buyer {
  width: 160px;
}
.so-col-contacts {
  width: 210px;
}
.data-table--orders td {
  padding-top: 18px;
  padding-bottom: 18px;
}
.data-table--orders tbody tr {
  cursor: pointer;
}
.data-table--orders tbody tr:hover,
.data-table--orders tbody tr:focus-within {
  background: #f2f6fd;
}
.data-table--orders .table-sort {
  min-height: 40px;
}
.data-table--orders .table-sort .ui-icon {
  flex-shrink: 0;
}
.so-date, .so-money, .so-phone {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.so-date span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}
.so-open {
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-weight: 700;
}
.so-open:hover, .data-table--orders tbody tr:hover .so-open {
  color: var(--blue);
}
.so-buyer {
  display: grid;
  gap: 4px;
  overflow-wrap: anywhere;
}
.so-buyer small {
  font: inherit;
  color: var(--muted);
}
.so-contacts {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.so-email {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.so-stage {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 14px;
  white-space: nowrap;
  color: var(--stage-color);
  background: var(--stage-tint);
}
.so-stage--new {
  --stage-color: var(--blue);
  --stage-tint: #e7effc;
}
.so-stage--processing {
  --stage-color: #9b5a0a;
  --stage-tint: #fff1dd;
}
.so-stage--paid {
  --stage-color: #247246;
  --stage-tint: #e7f5ec;
}
.so-stage--delivery {
  --stage-color: #744394;
  --stage-tint: #f1e9f8;
}
.so-stage--completed {
  --stage-color: #666;
  --stage-tint: var(--inner);
}
.so-stage--cancelled {
  --stage-color: #ab3535;
  --stage-tint: #fbeaea;
}
.so-toolbar-start {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
.so-filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  font-size: 12px;
}
.so-form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.so-fields {
  display: grid;
  gap: 22px;
  min-height: 0;
}
.so-field {
  display: grid;
  gap: 10px;
  min-width: 0;
}
.so-field .form-input {
  font: inherit;
  min-width: 0;
}
.so-field :is(input, select, textarea):focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.so-grid, .so-dates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.so-fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.so-fieldset legend {
  padding: 0;
  margin-bottom: 12px;
}
.so-grid input {
  padding-left: 14px;
  padding-right: 14px;
}
.so-filter-foot .text-button {
  justify-content: center;
  color: var(--muted);
}
.so-order-modal {
  max-width: 860px;
}
.so-order-modal .modal-head {
  align-items: flex-start;
}
.so-order-modal h2 {
  overflow-wrap: anywhere;
}
.so-dates {
  gap: 18px 24px;
  font-size: 14px;
  margin: 0;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.so-dates dt {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 5px;
}
.so-dates dd {
  margin: 0;
}
.so-section {
  display: grid;
  gap: 18px;
  min-width: 0;
}
.so-section h3 {
  font: inherit;
}
.so-section .so-field {
  font-size: 14px;
  color: var(--muted);
}
.so-section .so-field .form-input {
  font-size: 16px;
}
.so-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.so-section-heading .muted {
  font-size: 14px;
}
.so-items {
  display: grid;
  gap: 12px;
}
.so-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 120px 86px 108px 32px;
  gap: 12px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.so-item img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 8px;
}
.so-item-title {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.so-item .so-field {
  font-size: 14px;
  gap: 6px;
}
.so-item .form-input {
  padding: 10px 12px;
  font-size: 16px;
}
.so-item-sum {
  display: grid;
  gap: 6px;
  font-size: 14px;
}
.so-item-sum output {
  font-size: 16px;
  min-height: 44px;
  display: flex;
  align-items: center;
  font-weight: 700;
  white-space: nowrap;
}
.so-remove {
  width: 32px;
  height: 32px;
  border: 0;
  padding: 4px;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
}
.so-remove:hover {
  color: #ab3535;
  background: #fbeaea;
}
.so-remove .ui-icon {
  width: 20px;
  height: 20px;
}
.so-add-product {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
}
.so-add-product .btn {
  min-height: 44px;
}
.so-product-options {
  --select-option-height: 80px;
}
.so-product-options button {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 20px;
}
.so-product-options img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}
.so-product-options small {
  display: block;
  color: var(--muted);
  font-size: 14px;
}
.so-subtotal {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-top: 6px;
}
.so-subtotal output {
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
}
.so-textarea {
  border-radius: 16px;
  resize: vertical;
  min-height: 76px;
}
.so-save-foot {
  justify-items: center;
  padding-top: 12px;
}
.so-save-foot .btn {
  min-width: 150px;
}
.so-order-modal .modal-scroll {
  padding-bottom: 12px;
}
#so-notes {
  min-height: 116px;
}
@media (max-width: 799px) {
  .so-item {
    grid-template-columns: 52px minmax(0, 1fr) minmax(0, 1fr) 32px;
  }
  .so-item img {
    grid-column: 1;
    grid-row: 1;
    width: 52px;
    height: 52px;
  }
  .so-item-title {
    grid-column: 2 / 4;
    grid-row: 1;
    font-size: 16px;
  }
  .so-remove {
    grid-column: 4;
    grid-row: 1;
  }
  .so-item .so-field {
    grid-row: 2;
  }
  .so-item .so-field:nth-of-type(1) {
    grid-column: 1 / 3;
  }
  .so-item .so-field:nth-of-type(2) {
    grid-column: 3 / 5;
  }
  .so-item-sum {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .so-item-sum output {
    min-height: 24px;
  }
}
@media (max-width: 599px) {
  .so-toolbar-start {
    justify-content: space-between;
    gap: 12px;
  }
  .so-order-modal h2 {
    font-size: 22px;
  }
  .so-grid {
    grid-template-columns: 1fr;
  }
  .so-add-product {
    grid-template-columns: 1fr;
  }
  .so-fields {
    gap: 20px;
  }
  .so-dates {
    gap: 16px;
  }
}
@media (max-width: 389px) {
  .so-dates {
    grid-template-columns: 1fr;
  }
}
