.mo-dash {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.mo-stat-card {
  background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
  border: 1px solid #e8ebf2;
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 2px 8px rgba(31, 36, 48, 0.04);
}

.mo-stat-label {
  font-size: 13px;
  color: #8a9099;
  margin-bottom: 8px;
}

.mo-stat-value {
  font-size: 28px;
  font-weight: 700;
  color: #1f2430;
  line-height: 1.2;
}

.mo-stat-value--money {
  color: #d92d2d;
}

.mo-chart-wrap {
  background: #fff;
  border: 1px solid #e8ebf2;
  border-radius: 12px;
  padding: 16px 18px 12px;
  margin-bottom: 18px;
}

.mo-chart-title {
  font-size: 14px;
  font-weight: 600;
  color: #1f2430;
  margin-bottom: 14px;
}

.mo-chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 120px;
  padding-top: 8px;
}

.mo-chart-bar-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}

.mo-chart-bar {
  width: 100%;
  max-width: 18px;
  background: linear-gradient(180deg, #d92d2d 0%, #f87171 100%);
  border-radius: 4px 4px 0 0;
  min-height: 2px;
  transition: height 0.2s;
}

.mo-chart-bar-label {
  font-size: 9px;
  color: #8a9099;
  margin-top: 4px;
  transform: rotate(-45deg);
  white-space: nowrap;
  max-width: 36px;
  overflow: hidden;
}

.mo-batch-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px 12px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e8ebf2;
}

.mo-batch-bar label {
  font-size: 13px;
  color: #5c6370;
  display: flex;
  align-items: center;
  gap: 6px;
}

.mo-orders-table-wrap {
  overflow-x: auto;
}

#mallOrdersTable.mo-orders-table,
#mallOrdersTable,
#masTable.mo-orders-table,
#masTable {
  min-width: 1100px;
}

.mo-cover {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #e8ebf2;
  display: block;
}

.mo-cover--empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  font-size: 11px;
  color: #8a9099;
  background: #f1f5f9;
  border-radius: 6px;
  border: 1px solid #e8ebf2;
}

#mallOrdersTable thead th.mo-th-product,
#mallOrdersTable tbody td.mo-td-product,
#masTable thead th.mo-th-product,
#masTable tbody td.mo-td-product {
  min-width: 180px;
  max-width: 280px;
}

#mallOrdersTable tbody td.mo-td-product,
#masTable tbody td.mo-td-product {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#mallOrdersTable thead th.mo-th-check,
#mallOrdersTable tbody td.mo-td-check {
  width: 48px;
  text-align: center;
  vertical-align: middle;
}

#mallOrdersTable thead th.mo-th-order-no,
#mallOrdersTable tbody td.mo-td-order-no,
#masTable thead th.mo-th-order-no,
#masTable tbody td.mo-td-order-no {
  min-width: 160px;
  white-space: nowrap;
}

#mallOrdersTable tbody tr td,
#masTable tbody tr td {
  vertical-align: middle;
}

#mallOrdersTable thead th.mo-th-actions,
#mallOrdersTable tbody td.mo-td-actions,
#masTable thead th.mo-th-actions,
#masTable tbody td.mo-td-actions {
  position: sticky;
  right: 0;
  z-index: 3;
  min-width: 240px;
  background: #fff;
  box-shadow: -6px 0 12px -8px rgba(15, 23, 42, 0.15);
  vertical-align: middle;
  padding: 10px 12px;
}

#mallOrdersTable thead th.mo-th-actions,
#masTable thead th.mo-th-actions {
  z-index: 4;
  background: #fafbfe;
}

#mallOrdersTable tbody td.mo-td-actions .mo-actions,
#masTable tbody td.mo-td-actions .mo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  align-items: center;
  min-width: 220px;
}

.mo-ship-pickup-tip {
  margin: 0 0 16px;
  padding: 12px 16px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #9a3412;
  font-size: 14px;
}

.mo-ship-pickup-tip.hidden,
.mo-ship-card.hidden {
  display: none !important;
}

.mo-act-btn {
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 6px;
  border: 1px solid #d0d5dd;
  background: #fff;
  color: #1f2430;
  cursor: pointer;
  white-space: nowrap;
}

.mo-act-btn:hover {
  border-color: #d92d2d;
  color: #d92d2d;
}

.mo-act-btn--primary {
  background: #d92d2d;
  border-color: #d92d2d;
  color: #fff;
}

.mo-act-btn--primary:hover {
  background: #b91c1c;
  color: #fff;
}

.mo-act-btn--danger {
  border-color: #fecaca;
  color: #b91c1c;
}

.mo-modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.mo-modal {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.mo-modal--wide {
  max-width: 820px;
}

.mo-modal-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e8ebf2;
}

.mo-modal-title {
  font-size: 17px;
  font-weight: 700;
}

.mo-modal-close {
  font-size: 22px;
  line-height: 1;
  border: none;
  background: none;
  cursor: pointer;
  color: #8a9099;
}

.mo-modal-bd {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
}

.mo-modal-ft {
  padding: 12px 20px;
  border-top: 1px solid #e8ebf2;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.mo-detail-section {
  margin-bottom: 16px;
}

.mo-detail-section h4 {
  margin: 0 0 10px;
  font-size: 14px;
  color: #1f2430;
}

.mo-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  font-size: 13px;
}

.mo-detail-grid span {
  color: #8a9099;
}

.mo-item-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.mo-item-table th,
.mo-item-table td {
  border: 1px solid #e8ebf2;
  padding: 8px 10px;
  text-align: left;
}

.mo-item-table th {
  background: #f8fafc;
}

.mo-form-row {
  margin-bottom: 14px;
}

.mo-form-row label {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
  color: #5c6370;
}

.mo-form-row input,
.mo-form-row select,
.mo-form-row textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  font-size: 14px;
}

.mo-ship-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 4px 24px;
}

.mo-ship-topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.mo-ship-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #1f2430;
}

.mo-ship-order-no {
  font-size: 14px;
  font-weight: 500;
  color: #5c6370;
  margin-left: 8px;
}

.mo-ship-card {
  background: #fff;
  border: 1px solid #e8ebf2;
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(31, 36, 48, 0.04);
}

.mo-ship-card-title {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 700;
  color: #1f2430;
}

.mo-ship-info-grid p {
  margin: 0 0 10px;
  font-size: 14px;
  color: #3d4a63;
  line-height: 1.6;
}

.mo-ship-info-grid span {
  color: #8a9099;
}

.mo-ship-info-grid em {
  font-style: normal;
  color: #1f2430;
}

.mo-ship-info-full {
  margin-bottom: 0 !important;
}

.mo-ship-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.mo-ship-form-row--4 input {
  flex: 1 1 200px;
  min-width: 160px;
  padding: 10px 12px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  font-size: 14px;
}

.mo-ship-form-row--logistics select,
.mo-ship-form-row--logistics input {
  padding: 10px 12px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  font-size: 14px;
}

.mo-ship-form-row--logistics select {
  min-width: 140px;
}

.mo-ship-form-row--logistics input {
  flex: 1 1 220px;
  min-width: 180px;
}

.mo-ship-form-row--actions {
  margin-top: 12px;
}

.mo-detail-cover .mo-cover {
  width: 40px;
  height: 40px;
}

.mo-print-area {
  display: none;
}

.mas-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

.mas-tag--pending {
  color: #b45309;
  background: #fff7ed;
}

.mas-tag--ok {
  color: #15803d;
  background: #ecfdf5;
}

.mas-tag--fail {
  color: #b91c1c;
  background: #fef2f2;
}

.mas-tag--muted {
  color: #64748b;
  background: #f1f5f9;
}

.mas-reason-box {
  margin-top: 8px;
  padding: 12px 14px;
  background: #f8f9fb;
  border-radius: 8px;
  line-height: 1.55;
  word-break: break-word;
  white-space: pre-wrap;
}

@media print {
  body * {
    visibility: hidden;
  }
  .mo-print-area,
  .mo-print-area * {
    visibility: visible;
  }
  .mo-print-area {
    display: block !important;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    padding: 20px;
  }
}
