.mp-b2b-page {
  display: grid;
  gap: 16px;
}

.mp-hero-card,
.mp-toolbar-card,
.mp-filter-card,
.mp-table-card,
.mp-summary {
  background: #ffffff;
  border: 1px solid #dbe4ef;
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.mp-hero-card {
  padding: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
}

.mp-page-header {
  margin: 0;
}

.mp-page-eyebrow {
  margin: 0 0 8px;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mp-page-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
  color: #0f172a;
}

.mp-page-desc {
  margin: 10px 0 0;
  color: #475569;
  font-size: 14px;
  line-height: 1.6;
}

.mp-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.mp-tab {
  padding: 9px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.mp-tab.active {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
}

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

.mp-stat-card {
  padding: 16px;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
  border: 1px solid #dbeafe;
}

.mp-stat-label {
  display: block;
  color: #64748b;
  font-size: 12px;
  margin-bottom: 8px;
}

.mp-stat-value {
  font-size: 26px;
  color: #0f172a;
  font-weight: 700;
}

.mp-toolbar-card {
  padding: 14px 16px;
}

.mp-toolbar-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.mp-toolbar-left,
.mp-toolbar-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.mp-toolbar-caption {
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}

.mp-selected-chipbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.mp-selected-summary {
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

.mp-column-wrap {
  position: relative;
}

.mp-column-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 220px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid #dbe4ef;
  background: #fff;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
  display: grid;
  gap: 8px;
  z-index: 20;
}

.mp-column-panel[hidden] {
  display: none !important;
}

.mp-column-option {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #334155;
  font-size: 13px;
}

.mp-filter-card {
  padding: 18px 18px 16px;
}

.mp-filter-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.mp-section-title {
  margin: 0;
  font-size: 16px;
  color: #0f172a;
}

.mp-section-subtitle {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 13px;
}

.mp-filter-card-body {
  margin-top: 16px;
  display: grid;
  gap: 14px;
}

.mp-filter-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.mp-field {
  display: grid;
  gap: 6px;
}

.mp-field-label {
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}

.mp-input,
.mp-select {
  width: 100%;
  height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  padding: 0 12px;
  font-size: 13px;
}

.mp-filter {
  background: #f8fafc;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  padding: 14px;
  display: grid;
  gap: 10px;
}

.mp-filter-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  align-items: start;
}

.mp-filter-label {
  padding-top: 8px;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
}

.mp-filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mp-filter-tag {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #d7e0ea;
  background: #fff;
  color: #334155;
  font-size: 12px;
  cursor: pointer;
}

.mp-filter-tag.active {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
}

.mp-filter-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.mp-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #334155;
  font-size: 13px;
}

.mp-filter-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.mp-btn {
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.mp-btn-primary {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.mp-btn-sm {
  height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.mp-table-card {
  padding: 16px;
}

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

.mp-table-status {
  color: #475569;
  font-size: 13px;
}

.mp-table-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mp-loading-state {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.mp-loading-bar {
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, #e2e8f0 0%, #f8fafc 50%, #e2e8f0 100%);
  background-size: 200% 100%;
  animation: mp-loading 1.4s infinite linear;
}

@keyframes mp-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.mp-empty-state {
  padding: 32px 20px;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  background: #f8fafc;
  color: #64748b;
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.mp-table-wrapper {
  overflow: auto;
  border: 1px solid #dbe4ef;
  border-radius: 14px;
}

.mp-data-table {
  width: 100%;
  min-width: 1320px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.mp-data-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #f8fafc;
  color: #475569;
  padding: 12px 10px;
  border-bottom: 1px solid #dbe4ef;
  text-align: left;
  font-weight: 700;
}

.mp-data-table tbody td {
  padding: 10px 10px;
  border-bottom: 1px solid #edf2f7;
  background: #fff;
  vertical-align: middle;
}

.mp-data-row:nth-child(4n + 1) td,
.mp-data-row:nth-child(4n + 2) td {
  background: #fcfdff;
}

.mp-data-row:hover td {
  background: #f8fbff;
}

.mp-sticky-left,
.mp-sticky-right {
  position: sticky;
  z-index: 2;
  background: inherit;
}

.mp-sticky-right {
  box-shadow: -8px 0 18px rgba(15, 23, 42, 0.04);
}

.mp-col-checkbox {
  width: 52px;
  min-width: 52px;
}

.mp-sort-btn {
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mp-sort-btn.is-active {
  color: #0f172a;
}

.mp-name-cell {
  display: grid;
  gap: 6px;
}

.mp-name-main {
  font-weight: 700;
  color: #0f172a;
}

.mp-name-sub,
.mp-cell-muted {
  color: #64748b;
  font-size: 12px;
}

.mp-case-link,
.mp-link-btn {
  color: #2563eb;
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  font-size: 12px;
}

.mp-star {
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 16px;
  cursor: pointer;
}

.mp-star.is-fav {
  color: #f97316;
}

.mp-tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  margin: 0 6px 6px 0;
  font-size: 11px;
  font-weight: 700;
}

.mp-tag-blue { background: #dbeafe; color: #1d4ed8; }
.mp-tag-green { background: #dcfce7; color: #166534; }
.mp-tag-orange { background: #ffedd5; color: #c2410c; }
.mp-tag-red { background: #fee2e2; color: #b91c1c; }

.mp-remark-cell {
  display: grid;
  gap: 6px;
}

.mp-weight-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 8px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
}

.mp-other-cell {
  display: grid;
  gap: 6px;
  max-width: 100%;
}

.mp-other-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  max-height: 54px;
  overflow: hidden;
}

.mp-other-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
}

.mp-other-tag-more {
  background: #e2e8f0;
  color: #475569;
  font-weight: 700;
}

.mp-other-remark {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mp-action-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mp-detail-row {
  display: none;
}

.mp-detail-row.is-open {
  display: table-row;
}

.mp-detail-card {
  padding: 16px;
  background: #f8fafc;
  border-radius: 14px;
}

.mp-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.mp-detail-item {
  padding: 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  display: grid;
  gap: 6px;
}

.mp-detail-item span {
  color: #64748b;
  font-size: 12px;
}

.mp-detail-item strong {
  color: #0f172a;
  font-size: 13px;
}

.mp-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.mp-page-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.mp-page-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  font-size: 13px;
  cursor: pointer;
}

.mp-page-btn.mp-active {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
}

.mp-page-btn.mp-disabled {
  color: #94a3b8;
  cursor: not-allowed;
}

.mp-summary {
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: #334155;
  font-size: 13px;
}

.mp-summary-left span,
.mp-summary-right {
  color: #0f172a;
  font-weight: 700;
}

.mp-summary-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

#mp-cart-submit:disabled,
#mp-cart-modal-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.mp-selected-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  margin-right: 6px;
}

.mp-selected-chip-remove {
  cursor: pointer;
}

.mp-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}

.mp-modal.is-open {
  display: block;
}

.mp-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.mp-modal-dialog {
  position: relative;
  width: min(860px, calc(100% - 32px));
  margin: 56px auto;
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.mp-modal-header,
.mp-modal-footer {
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
}

.mp-modal-footer {
  justify-content: flex-end;
  gap: 10px;
  border-bottom: none;
  border-top: 1px solid #e5e7eb;
  background: #fff;
}

.mp-modal-body {
  padding: 16px;
}

.mp-modal-title {
  font-size: 16px;
  font-weight: 700;
}

.mp-modal-close {
  width: 34px;
  height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

.mp-modal-empty {
  display: none;
  color: #64748b;
}

.mp-modal-tablewrap {
  overflow: auto;
}

.mp-cart-summary {
  margin-top: 14px;
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
}

.mp-modal-table {
  width: 100%;
  border-collapse: collapse;
}

.mp-modal-table th,
.mp-modal-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #edf2f7;
  text-align: left;
}

.mp-modal-table thead {
  background: #f8fafc;
}

@media (max-width: 1280px) {
  .mp-hero-card {
    grid-template-columns: 1fr;
  }

  .mp-filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .mp-toolbar-row,
  .mp-table-topbar,
  .mp-summary {
    flex-direction: column;
    align-items: flex-start;
  }

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

@media (max-width: 640px) {
  .mp-filter-grid {
    grid-template-columns: 1fr;
  }

  .mp-filter-row {
    grid-template-columns: 1fr;
  }
}
