html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  background: #f7f8fa;
  color: #1f2933;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

.navbar-brand {
  font-weight: 700;
}

.page-heading {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin: 1.5rem 0;
}

.page-heading h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0;
}

.page-actions {
  display: flex;
  gap: .5rem;
}

.page-kicker {
  color: #64748b;
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .04em;
  margin: 0 0 .2rem;
  text-transform: uppercase;
}

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

.summary-strip > div {
  background: #ffffff;
  border: 1px solid #d9e1e8;
  border-radius: 6px;
  padding: 1rem;
}

.summary-label {
  color: #64748b;
  display: block;
  font-size: .875rem;
}

.summary-strip strong {
  display: block;
  font-size: 1.6rem;
  margin-top: .25rem;
}

.table-shell {
  background: #ffffff;
  border: 1px solid #d9e1e8;
  border-radius: 6px;
  overflow: hidden;
}

.order-table {
  margin: 0;
}

.order-table thead th {
  background: #eef2f5;
  color: #52616f;
  font-size: .8rem;
  text-transform: uppercase;
}

.order-id {
  color: #52616f;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

.status-pill {
  background: #e7f0ff;
  border: 1px solid #bdd5ff;
  border-radius: 999px;
  color: #174ea6;
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  padding: .25rem .6rem;
}

.auth-shell {
  display: flex;
  justify-content: center;
  padding: 3rem 0;
}

.auth-panel {
  background: #ffffff;
  border: 1px solid #d9e1e8;
  border-radius: 6px;
  max-width: 460px;
  padding: 1.5rem;
  width: 100%;
}

.auth-panel h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.auth-form {
  display: grid;
  gap: .75rem;
}

.auth-form .btn {
  margin-top: .5rem;
}

.dev-accounts {
  border-top: 1px solid #d9e1e8;
  color: #64748b;
  display: grid;
  gap: .35rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
}

.dev-accounts code {
  color: #1f2933;
}

.form-shell {
  background: #ffffff;
  border: 1px solid #d9e1e8;
  border-radius: 6px;
  padding: 1.25rem;
}

.entry-form {
  display: grid;
  gap: .75rem;
  max-width: 920px;
}

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

.form-section {
  display: grid;
  gap: .75rem;
}

.form-section h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
}

.section-heading-row {
  align-items: center;
  display: flex;
  gap: .75rem;
  justify-content: space-between;
}

.customer-entry-form {
  gap: 1.25rem;
}

.address-list {
  display: grid;
  gap: 1rem;
}

.address-panel {
  border: 1px solid #d9e1e8;
  border-radius: 6px;
  display: grid;
  gap: .75rem;
  padding: 1rem;
}

.address-panel-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.address-default-check {
  margin-top: .25rem;
}

.form-actions {
  display: flex;
  justify-content: flex-start;
}

.detail-shell,
.detail-section {
  background: #ffffff;
  border: 1px solid #d9e1e8;
  border-radius: 6px;
  margin-bottom: 1rem;
  padding: 1.25rem;
}

.detail-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.detail-label {
  color: #64748b;
  display: block;
  font-size: .8rem;
  font-weight: 700;
  margin-bottom: .2rem;
  text-transform: uppercase;
}

.detail-note {
  border-top: 1px solid #d9e1e8;
  margin-top: 1rem;
  padding-top: 1rem;
}

.detail-note p,
.address-comment {
  margin: 0;
}

.address-card-list {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.address-card {
  border: 1px solid #d9e1e8;
  border-radius: 6px;
  display: grid;
  gap: .75rem;
  padding: 1rem;
}

.address-card-header {
  align-items: flex-start;
  display: flex;
  gap: .75rem;
  justify-content: space-between;
}

.order-create-form {
  gap: 1.5rem;
  max-width: 1040px;
}

.step-hint {
  color: #64748b;
  margin: 0;
}

.customer-empty {
  align-items: center;
  background: #eef2f5;
  border: 1px dashed #b8c4d0;
  border-radius: 6px;
  color: #52616f;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-top: .5rem;
  padding: 1rem;
  text-align: center;
}

.selected-customer-card {
  align-items: center;
  background: #f1f7ff;
  border: 1px solid #bdd5ff;
  border-radius: 6px;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 1rem;
}

.selected-customer-card > div {
  display: grid;
  gap: .15rem;
  min-width: 0;
}

.selected-customer-card strong {
  font-size: 1.05rem;
}

.order-substep {
  border-top: 1px solid #d9e1e8;
  display: grid;
  gap: .75rem;
  padding-top: 1rem;
}

.order-substep:first-child {
  border-top: 0;
  padding-top: 0;
}

.order-price-list-strip {
  background: #f1f5f9;
  border: 1px solid #d9e1e8;
  border-radius: 6px;
  display: grid;
  gap: .75rem;
  grid-template-columns: 1fr 1fr;
  padding: .75rem 1rem;
}

.order-total-strip {
  align-items: center;
  background: #f1f7ff;
  border: 1px solid #bdd5ff;
  border-radius: 6px;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 1rem;
}

.order-total-strip strong {
  font-size: 1.4rem;
}

.order-step {
  align-items: start;
  display: grid;
  gap: 1rem;
  grid-template-columns: auto minmax(0, 1fr);
}

.step-marker {
  align-items: center;
  background: #1b6ec2;
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  font-weight: 700;
  height: 2rem;
  justify-content: center;
  margin-top: .15rem;
  width: 2rem;
}

.step-content {
  display: grid;
  gap: .75rem;
}

.customer-search-shell {
  position: relative;
}

.customer-results {
  background: #ffffff;
  border: 1px solid #d9e1e8;
  border-radius: 6px;
  box-shadow: 0 .5rem 1rem rgba(15, 23, 42, .12);
  left: 0;
  max-height: 280px;
  overflow: auto;
  position: absolute;
  right: 0;
  top: calc(100% + .25rem);
  z-index: 20;
}

.customer-result {
  background: transparent;
  border: 0;
  border-bottom: 1px solid #eef2f5;
  display: grid;
  gap: .15rem;
  padding: .75rem;
  text-align: left;
  width: 100%;
}

.customer-result:hover,
.customer-result:focus {
  background: #eef2f5;
}

.customer-result span {
  color: #64748b;
  font-size: .875rem;
}

.new-address-panel {
  border: 1px solid #d9e1e8;
  border-radius: 6px;
  display: grid;
  gap: .75rem;
  padding: 1rem;
}

.selected-products {
  display: grid;
  gap: .75rem;
}

.empty-products {
  background: #eef2f5;
  border: 1px dashed #b8c4d0;
  border-radius: 6px;
  color: #64748b;
  padding: 1rem;
}

.selected-product-card {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d9e1e8;
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  gap: .75rem;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  padding: .85rem;
  transition: background-color .15s, border-color .15s;
}

.selected-product-card:hover,
.selected-product-card:focus-visible {
  background: #f7f8fa;
  border-color: #b8c4d0;
  outline: none;
}

.selected-product-card__media {
  align-items: center;
  background: #eef2f5;
  border: 1px solid #d9e1e8;
  border-radius: 6px;
  display: flex;
  height: 56px;
  justify-content: center;
  overflow: hidden;
  width: 56px;
}

.selected-product-card__media img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.selected-product-card__body {
  display: grid;
  gap: .15rem;
  min-width: 0;
}

.selected-product-card__body strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-product-card__price {
  color: #64748b;
  font-size: .875rem;
}

.selected-product-card__total {
  font-size: 1.15rem;
  font-weight: 700;
  white-space: nowrap;
}

body.sheet-open {
  overflow: hidden;
}

.bottom-sheet {
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 1080;
}

.bottom-sheet__backdrop {
  background: rgba(15, 23, 42, .45);
  inset: 0;
  position: absolute;
}

.bottom-sheet__panel {
  background: #ffffff;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  box-shadow: 0 -.5rem 1.5rem rgba(15, 23, 42, .25);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  position: relative;
}

.bottom-sheet__header {
  align-items: flex-start;
  border-bottom: 1px solid #d9e1e8;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 1rem 1.25rem;
}

.bottom-sheet__header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
}

.bottom-sheet__header strong {
  display: block;
}

.bottom-sheet__close {
  background: transparent;
  border: 0;
  color: #52616f;
  font-size: 1.75rem;
  line-height: 1;
  padding: .25rem .5rem;
}

.bottom-sheet__search {
  background: #ffffff;
  border-bottom: 1px solid #d9e1e8;
  padding: .75rem 1.25rem;
}

.bottom-sheet__search .form-control {
  font-size: 1rem;
}

.bottom-sheet__body {
  overflow-y: auto;
  padding: 1rem 1.25rem;
}

.bottom-sheet__footer {
  border-top: 1px solid #d9e1e8;
  display: flex;
  gap: .75rem;
  padding: 1rem 1.25rem;
}

.bottom-sheet__footer .btn {
  flex: 1;
  font-size: 1rem;
  padding: .75rem 1rem;
}

.qty-product-meta {
  color: #64748b;
  margin: 0 0 1rem;
  text-align: center;
}

.qty-stepper {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin: 1.5rem 0;
}

.qty-stepper__btn {
  align-items: center;
  background: #1b6ec2;
  border: 0;
  border-radius: 50%;
  box-shadow: 0 .25rem .75rem rgba(27, 110, 194, .35);
  color: #ffffff;
  display: inline-flex;
  font-size: 2.5rem;
  font-weight: 700;
  height: 4.5rem;
  justify-content: center;
  line-height: 1;
  width: 4.5rem;
}

.qty-stepper__btn:active {
  transform: scale(.95);
}

.qty-stepper__input {
  -moz-appearance: textfield;
  appearance: textfield;
  border: 2px solid #d9e1e8;
  border-radius: 12px;
  font-size: 3rem;
  font-weight: 700;
  height: 5rem;
  text-align: center;
  width: 9rem;
}

.qty-stepper__input::-webkit-outer-spin-button,
.qty-stepper__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.qty-summary {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr 1fr;
  margin-top: 1rem;
}

.qty-summary strong {
  font-size: 1.15rem;
}

.product-pick-list {
  display: grid;
  gap: .5rem;
}

.product-pick-card {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d9e1e8;
  border-radius: 8px;
  display: grid;
  gap: .75rem;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  padding: .75rem;
  text-align: left;
  width: 100%;
}

.product-pick-card:hover:not(:disabled) {
  background: #f7f8fa;
  border-color: #b8c4d0;
}

.product-pick-card--added,
.product-pick-card:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.product-pick-card__media {
  align-items: center;
  background: #eef2f5;
  border: 1px solid #d9e1e8;
  border-radius: 6px;
  display: flex;
  height: 56px;
  justify-content: center;
  overflow: hidden;
  width: 56px;
}

.product-pick-card__media img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.product-pick-card__body {
  display: grid;
  gap: .1rem;
  min-width: 0;
}

.product-pick-card__meta {
  color: #64748b;
  font-size: .85rem;
}

.product-pick-card__price {
  font-weight: 700;
}

.product-pick-card__badge {
  background: #e7f0ff;
  border-radius: 999px;
  color: #174ea6;
  font-size: .75rem;
  font-weight: 700;
  padding: .15rem .6rem;
  white-space: nowrap;
}

.product-thumb {
  background: #eef2f5;
  border: 1px solid #d9e1e8;
  border-radius: 6px;
  height: 44px;
  object-fit: cover;
  width: 44px;
}

.price-entry-table {
  border: 1px solid #d9e1e8;
  border-radius: 6px;
  overflow: hidden;
}

.access-list {
  display: grid;
  gap: .75rem;
}

.access-card {
  align-items: flex-start;
  border: 1px solid #d9e1e8;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  gap: .75rem;
  padding: .85rem;
}

.access-card:hover {
  background: #f7f8fa;
}

.access-card small {
  color: #64748b;
  display: block;
  margin-top: .2rem;
}

.status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1rem;
}

.warehouse-topbar {
  align-items: center;
  background: #1f1f22;
  color: #a78bfa;
  display: flex;
  font-size: 1.35rem;
  font-weight: 700;
  gap: 1rem;
  margin: -1rem -1rem 1.5rem;
  padding: 1rem;
}

.warehouse-back {
  color: #a78bfa;
  font-size: 2.25rem;
  line-height: 1;
  text-decoration: none;
}

.warehouse-board {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.warehouse-card-list,
.warehouse-line-list {
  display: grid;
  gap: 1rem;
}

.warehouse-order-card,
.warehouse-line-card {
  align-items: center;
  background: #fff5d8;
  border: 1px solid #d9e1e8;
  border-radius: 8px;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 1rem;
}

.warehouse-order-card--picked,
.warehouse-line-card--picked {
  background: #e8f6ee;
}

.warehouse-order-card div,
.warehouse-line-card div {
  display: grid;
  gap: .2rem;
  min-width: 0;
}

.warehouse-order-card strong,
.warehouse-line-card strong {
  font-size: 1.1rem;
}

.warehouse-order-card span,
.warehouse-line-card span,
.warehouse-pick-header p {
  color: #64748b;
}

.warehouse-pick-header {
  display: grid;
  gap: .75rem;
  margin-bottom: 1.5rem;
}

.warehouse-pick-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.05;
  margin: 0;
}

.warehouse-picked-badge {
  background: #ffffff;
  border: 1px solid #d9e1e8;
  border-radius: 6px;
  color: #1f2937;
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  padding: .75rem 1rem;
}

.warehouse-line-actions {
  display: grid;
  gap: .5rem;
}

.warehouse-line-actions .btn {
  min-width: 7.5rem;
}

.scanner-shell,
.confirm-product {
  display: grid;
  gap: 1rem;
}

.scanner-video {
  aspect-ratio: 4 / 3;
  background: #111827;
  border-radius: 8px;
  object-fit: cover;
  width: 100%;
}

.scanner-message {
  color: #64748b;
}

.scanner-form {
  display: grid;
  gap: .75rem;
}

.scanner-input {
  font-size: 1.25rem;
  padding: .85rem 1rem;
}

.confirm-product {
  text-align: center;
}

.confirm-product__image {
  align-items: center;
  aspect-ratio: 1 / 1;
  background: #eef2f5;
  border: 1px solid #d9e1e8;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  margin: 0 auto;
  max-width: 360px;
  overflow: hidden;
  width: 100%;
}

.confirm-product__image img {
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.confirm-product h1 {
  font-size: 2rem;
  font-weight: 800;
  margin: 0;
}

.confirm-quantity {
  display: grid;
  gap: .25rem;
  margin: .5rem 0 1rem;
}

.confirm-quantity strong {
  font-size: 6rem;
  line-height: 1;
}

.confirm-button {
  font-size: 1.25rem;
  padding: 1rem;
  width: 100%;
}

@media (max-width: 767.98px) {
  .page-heading {
    align-items: stretch;
    flex-direction: column;
  }

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

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

  .detail-grid,
  .detail-grid.compact {
    grid-template-columns: 1fr;
  }

  .order-step {
    grid-template-columns: 1fr;
  }

  .step-marker {
    display: none;
  }

  .selected-product-card {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .selected-product-card__total {
    grid-column: 1 / -1;
    text-align: right;
  }

  .product-pick-card {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .product-pick-card__badge {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .order-price-list-strip {
    grid-template-columns: 1fr;
  }

  .qty-stepper__btn {
    font-size: 2.25rem;
    height: 4rem;
    width: 4rem;
  }

  .qty-stepper__input {
    font-size: 2.5rem;
    height: 4.5rem;
    width: 7rem;
  }

  .bottom-sheet__panel {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }

  .warehouse-order-card,
  .warehouse-line-card {
    grid-template-columns: minmax(0, 1fr) 38%;
  }

  .form-shell {
    border-left: 0;
    border-radius: 0;
    border-right: 0;
    margin-left: calc(var(--bs-gutter-x) * -.5);
    margin-right: calc(var(--bs-gutter-x) * -.5);
  }

  .section-heading-row {
    align-items: stretch;
    flex-direction: column;
  }

  .section-heading-row .btn,
  .form-actions .btn,
  .page-heading .btn {
    width: 100%;
  }

  .customer-list .table-responsive {
    overflow: visible;
  }

  .price-list-products .table-responsive {
    overflow: visible;
  }

  .customer-list table,
  .customer-list thead,
  .customer-list tbody,
  .customer-list tr,
  .customer-list td,
  .price-list-products table,
  .price-list-products thead,
  .price-list-products tbody,
  .price-list-products tr,
  .price-list-products td {
    display: block;
    width: 100%;
  }

  .customer-list thead,
  .price-list-products thead {
    display: none;
  }

  .customer-list tr,
  .price-list-products tr {
    border-bottom: 1px solid #d9e1e8;
    padding: .75rem 1rem;
  }

  .customer-list tr:last-child,
  .price-list-products tr:last-child {
    border-bottom: 0;
  }

  .customer-list td,
  .price-list-products td {
    border: 0;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: .25rem 0;
  }

  .customer-list td::before {
    color: #64748b;
    content: attr(data-label);
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
  }

  .price-list-products td::before {
    color: #64748b;
    content: attr(data-label);
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
  }
}

@media (min-width: 768px) {
  .bottom-sheet {
    align-items: center;
    justify-content: center;
    padding: 2rem;
  }

  .bottom-sheet__panel {
    border-radius: 16px;
    max-width: 520px;
    width: 100%;
  }

  #product-sheet .bottom-sheet__panel {
    max-width: 760px;
  }
}
