body {
  background: #f5f7f9;
}

.page-shell {
  max-width: 1120px;
}

.brand-bar {
  border-bottom: 1px solid #dee2e6;
}

.brand-link {
  align-items: center;
  display: inline-flex;
  gap: 10px;
}

.brand-logo {
  border: 1px solid #e4e7ec;
  border-radius: 6px;
  height: 40px;
  object-fit: cover;
  width: 40px;
}

.branch-switcher {
  min-width: 240px;
}

.product-list {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.product-card {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
}

.product-card .form-label {
  margin-bottom: 2px;
}

.product-card .form-control {
  padding-bottom: 4px;
  padding-top: 4px;
}

.product-card .fw-semibold {
  line-height: 1.25;
}

.product-image {
  aspect-ratio: 4 / 3;
  border: 1px solid #e4e7ec;
  border-radius: 6px;
  object-fit: cover;
  width: 100%;
}

.table-product-image {
  aspect-ratio: 4 / 3;
  border: 1px solid #e4e7ec;
  border-radius: 6px;
  object-fit: cover;
  width: 64px;
}

.company-logo-preview {
  aspect-ratio: 1 / 1;
  border: 1px solid #e4e7ec;
  border-radius: 6px;
  object-fit: cover;
  width: 80px;
}

.image-picker {
  align-items: center;
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
}

.image-picker-trigger {
  background: transparent;
  border: 0;
  padding: 0;
}

.product-image-input {
  height: 1px;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  width: 1px;
}

.drag-handle {
  color: #5f6b7a;
  cursor: grab;
  font-size: 1.2rem;
  text-align: center;
  width: 84px;
}

.product-sort-row.is-dragging {
  opacity: 0.55;
}

.product-admin-grid {
  min-width: 1240px;
  overflow-x: auto;
}

.product-admin-header,
.product-admin-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 84px 190px 150px 180px 110px 120px 70px 130px 92px;
  padding: 8px;
}

.product-admin-header {
  border-bottom: 1px solid #dee2e6;
  color: #5f6b7a;
  font-size: 0.875rem;
  font-weight: 600;
}

.product-admin-row {
  border-bottom: 1px solid #eef1f4;
}

.product-admin-row:last-child {
  border-bottom: 0;
}

.product-admin-table {
  min-width: 1240px;
}

.admin-edit-table {
  min-width: 900px;
}

.product-admin-table .sort-input {
  width: 84px;
}

.price-block,
.qty-block {
  align-items: center;
  display: flex;
  gap: 6px;
  line-height: 1.25;
}

.qty-input {
  max-width: 72px;
}

.pre-line {
  white-space: pre-line;
}

.order-total-bar {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  padding: 14px 16px;
}

.order-total-box {
  background: #f8fafc;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 14px 16px;
}

.order-total-box > div {
  display: flex;
  justify-content: space-between;
}

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

@media (max-width: 992px) {
  .product-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 576px) {
  .product-list {
    grid-template-columns: 1fr;
  }
}


.admin-module-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.admin-nav-group {
  border-left: 3px solid #d7dee6;
  padding-left: 9px;
}

.admin-nav-group-label {
  color: #667085;
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.admin-nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.admin-nav-links a {
  font-size: 0.9rem;
  text-decoration: none;
}

.admin-nav-links a[aria-current="page"] {
  color: #212529;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 992px) {
  .brand-bar .page-shell {
    align-items: flex-start !important;
    flex-wrap: wrap;
  }

  .admin-module-nav {
    justify-content: flex-start;
    width: 100%;
  }
}
