 .profile-main {
   padding: 40px 0 60px;
 }
 
 .profile-card {
   background: #ffffff;
   border-radius: 16px;
   padding: 24px;
   box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
   margin-bottom: 30px;
 }
 
 .profile-head {
   display: grid;
   grid-template-columns: 120px 1fr;
   gap: 24px;
   align-items: center;
 }
 
 .avatar-large {
   width: 120px;
   height: 120px;
   border-radius: 50%;
   background: #9ca3af;
   color: #ffffff;
   display: inline-flex;
   align-items: center;
   justify-content: center;
   font-size: 28px;
   font-weight: 600;
   overflow: hidden;
  cursor: pointer;
 }
 
 .avatar-large img {
   width: 100%;
   height: 100%;
   object-fit: cover;
   display: none;
 }
 
 .avatar-large.has-image img {
   display: block;
 }
 
.avatar-large:focus-visible {
  outline: 2px solid #111827;
  outline-offset: 4px;
}

.avatar-input {
  display: none;
}
 
 .profile-fields {
   display: grid;
   gap: 16px;
 }

 .profile-actions {
   display: flex;
   gap: 12px;
   flex-wrap: wrap;
 }

.profile-bottom-actions {
  display: flex;
  justify-content: flex-end;
}

.wallet-quick {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 14px;
}

.wallet-quick strong {
  color: #111827;
}
 
 .field {
   display: grid;
   gap: 8px;
   font-size: 14px;
 }
 
 .field input {
   border: 1px solid #e5e7eb;
   border-radius: 10px;
   padding: 10px 12px;
   font-size: 14px;
 }
 
 .readonly-field .field-text {
   padding: 10px 12px;
   background: #f9fafb;
   border-radius: 10px;
   border: 1px dashed #e5e7eb;
   color: #4b5563;
 }

.account-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.account-row .field-text {
  flex: 1;
}

.name-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.name-row input {
  flex: 1;
}

.name-row input[readonly] {
  background: #f9fafb;
  color: #4b5563;
}

.account-fix-btn {
  min-width: 94px;
}

.password-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.password-row .field-text {
  flex: 1;
}

.password-edit {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.password-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
 
 .profile-products {
   display: grid;
   gap: 18px;
 }

.profile-tabs {
  display: flex;
  align-items: center;
  gap: 14px;
}

.profile-tab {
  border: none;
  background: transparent;
  font-size: 30px;
  font-weight: 700;
  color: #9ca3af;
  cursor: pointer;
  padding: 0;
  line-height: 1.2;
}

.profile-tab.active {
  color: #0f172a;
}

.product-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.product-batch-toggle-btn {
  margin-left: 0;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  color: #374151;
  cursor: pointer;
}

.product-batch-toggle-btn.product-batch-anchor {
  margin-left: auto;
}

.product-batch-toggle-btn:hover {
  border-color: #cbd5e1;
  color: #1f2937;
}

.product-batch-toggle-btn.active {
  border-color: #111827;
  background: #111827;
  color: #ffffff;
}

.batch-toolbar {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  padding: 12px;
  display: grid;
  gap: 10px;
  position: sticky;
  top: 10px;
  z-index: 40;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.batch-toolbar.hidden {
  display: none;
}

.batch-toolbar-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.batch-selected-text {
  font-size: 13px;
  color: #374151;
}

.batch-toolbar-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.batch-price-group,
.batch-category-group,
.batch-iprole-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.batch-price-group input,
.batch-category-group select,
.batch-ip-role-control input {
  flex: 1;
  min-width: 0;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  cursor: pointer;
}

.batch-ip-role-control {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  width: 100%;
}

.product-filter-btn {
  border: 1px solid #e5e7eb;
  background: #ffffff;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  color: #4b5563;
  cursor: pointer;
}

.product-filter-btn:hover {
  border-color: #cbd5e1;
  color: #1f2937;
}

.product-filter-btn.active {
  background: #111827;
  border-color: #111827;
  color: #ffffff;
}

.orders-list {
  display: grid;
  gap: 12px;
}

.order-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.order-filter-btn {
  border: 1px solid #e5e7eb;
  background: #ffffff;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  color: #4b5563;
  cursor: pointer;
}

.order-filter-btn:hover {
  border-color: #cbd5e1;
  color: #1f2937;
}

.order-filter-btn.active {
  background: #111827;
  border-color: #111827;
  color: #ffffff;
}

.wallet-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  padding: 14px 16px;
  display: grid;
  gap: 10px;
}

.wallet-card h3 {
  margin: 0;
  font-size: 18px;
}

.wallet-balance {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
}

.wallet-consign-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.wallet-consign-stat-item {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f9fafb;
  padding: 8px 10px;
  display: grid;
  gap: 4px;
}

.wallet-consign-stat-item span {
  font-size: 12px;
  color: #6b7280;
}

.wallet-consign-stat-item strong {
  font-size: 16px;
  color: #111827;
}

.wallet-top-actions {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
}

.toggle-wallet-btn {
  min-width: 120px;
  min-height: 40px;
  font-size: 15px;
}

.wallet-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.wallet-action-item {
  border: 1px dashed #d1d5db;
  border-radius: 10px;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.wallet-action-item label {
  font-size: 13px;
  color: #4b5563;
}

.saved-qr-box {
  border: 1px dashed #d1d5db;
  border-radius: 8px;
  padding: 8px 10px;
  background: #f9fafb;
  display: grid;
  gap: 4px;
}

.saved-qr-title {
  font-size: 12px;
  color: #6b7280;
}

.saved-qr-empty {
  font-size: 13px;
  color: #9ca3af;
}

.saved-qr-thumb-wrap {
  position: relative;
  width: 120px;
  height: 120px;
}

.saved-qr-thumb-wrap.hidden {
  display: none;
}

.saved-qr-thumb-btn {
  width: 120px;
  height: 120px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  padding: 4px;
  cursor: zoom-in;
}

.saved-qr-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.saved-qr-remove-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.upload-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.upload-row input[type="file"] {
  flex: 1;
  min-width: 0;
}

.wallet-action-item input[type="text"],
.wallet-action-item input[type="file"],
.wallet-action-item select {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
}

.wallet-message {
  min-height: 20px;
  font-size: 13px;
  color: #6b7280;
}

.wallet-message.success {
  color: #166534;
}

.wallet-message.error {
  color: #991b1b;
}

.wallet-list {
  display: grid;
  gap: 8px;
}

.wallet-row {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f9fafb;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.wallet-row-title {
  font-size: 14px;
  color: #111827;
}

.wallet-row-time {
  font-size: 12px;
  color: #6b7280;
}

.wallet-row-amount {
  font-size: 14px;
  font-weight: 700;
}

.wallet-row-amount.in {
  color: #166534;
}

.wallet-row-amount.out {
  color: #991b1b;
}

.wallet-withdraw-images {
  display: flex;
  gap: 12px;
  font-size: 12px;
}

.wallet-withdraw-images a {
  color: #2563eb;
}

.wallet-empty {
  color: #9ca3af;
  font-size: 13px;
}

.wallet-recharge-qr {
  margin-top: 6px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  padding: 10px;
  display: grid;
  justify-items: center;
  gap: 8px;
}

.wallet-recharge-qr.hidden {
  display: none;
}

.wallet-recharge-qr p {
  margin: 0;
  color: #334155;
  font-size: 13px;
}

.wallet-recharge-qr img {
  width: 180px;
  height: 180px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
}

.batch-ip-role-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 2100;
}

.batch-ip-role-modal.show {
  display: flex;
}

.batch-ip-role-dialog {
  width: min(720px, 92vw);
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
  padding: 16px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  max-height: min(80vh, 760px);
  overflow: hidden;
}

.batch-ip-role-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.batch-ip-role-title {
  font-size: 16px;
  color: #111827;
  font-weight: 600;
}

.batch-ip-role-close {
  border: none;
  background: #f3f4f6;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  color: #111827;
  font-size: 20px;
  line-height: 1;
}

.batch-ip-role-body {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  min-height: 0;
}

.batch-ip-role-letters {
  display: grid;
  gap: 4px;
  align-content: start;
  overflow: auto;
  padding-right: 4px;
}

.batch-ip-role-letters button {
  border: none;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  padding: 0;
  font-size: 12px;
  line-height: 1.2;
}

.batch-ip-role-letters button.active {
  color: #111827;
  font-weight: 700;
}

.batch-ip-role-list {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px;
  overflow: auto;
  min-height: 0;
}

.batch-ip-role-section {
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 8px;
  margin-bottom: 8px;
}

.batch-ip-role-section-title {
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 4px;
}

.batch-ip-role-ip {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: #1f2937;
  font-size: 14px;
  font-weight: 600;
  padding: 6px 2px;
  cursor: pointer;
}

.batch-ip-role-roles.hidden {
  display: none;
}

.batch-ip-role-item {
  width: 100%;
  text-align: left;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #374151;
  font-size: 13px;
  border-radius: 8px;
  padding: 6px 8px;
  margin: 4px 0;
  cursor: pointer;
}

.batch-ip-role-item:hover {
  border-color: #111827;
}

.batch-ip-role-empty {
  color: #9ca3af;
  font-size: 13px;
}

.qr-preview-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.qr-preview-mask.hidden {
  display: none;
}

.qr-preview-mask img {
  max-width: min(92vw, 560px);
  max-height: 86vh;
  border-radius: 12px;
  background: #fff;
  padding: 12px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.32);
}

.qr-preview-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #111827;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.order-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  cursor: pointer;
}

.order-card:focus-visible {
  outline: 2px solid #111827;
  outline-offset: 2px;
}

.order-cover {
  width: 84px;
  height: 84px;
  border-radius: 10px;
  overflow: hidden;
  background: #f3f4f6;
}

.order-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.order-content {
  display: grid;
  gap: 8px;
}

.order-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.order-no {
  font-size: 14px;
  color: #374151;
}

.order-status {
  font-size: 12px;
  border-radius: 999px;
  padding: 3px 10px;
  background: #eef2ff;
  color: #1f2937;
}

.order-status.paid {
  background: #dcfce7;
  color: #166534;
}

.order-status.failed {
  background: #fee2e2;
  color: #991b1b;
}

.order-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 14px;
  color: #4b5563;
}

.order-pay-btn {
  border: 1px solid #111827;
  background: #111827;
  color: #ffffff;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
}

.order-pay-btn:hover {
  opacity: 0.92;
}

.order-goods {
  display: grid;
  gap: 4px;
  font-size: 13px;
}

.order-goods-item {
  color: #374151;
}

.order-goods-more,
.order-goods-empty {
  color: #9ca3af;
}

.order-detail-tip {
  font-size: 12px;
  color: #6b7280;
}

.order-detail {
  margin-top: 4px;
  display: grid;
  gap: 8px;
}

.order-detail-item {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f9fafb;
  padding: 8px;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  cursor: pointer;
}

.order-detail-item:hover {
  border-color: #cbd5e1;
  background: #f3f4f6;
}

.order-detail-item:focus-visible {
  outline: 2px solid #111827;
  outline-offset: 1px;
}

.order-detail-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  background: #e5e7eb;
}

.order-detail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.order-detail-title {
  font-size: 14px;
  color: #1f2937;
  font-weight: 600;
  margin-bottom: 2px;
}

.order-detail-meta {
  font-size: 12px;
  color: #6b7280;
}

.product-image-wrap {
  position: relative;
}

.product-image-wrap > img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.product-consign-badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  line-height: 1.4;
  color: #fff;
  pointer-events: none;
}

.product-consign-badge.safe {
  background: #16a34a;
}

.product-consign-badge.warn {
  background: #f59e0b;
}

.product-consign-badge.danger,
.product-consign-badge.expired {
  background: #dc2626;
}

 .product-card .product-actions {
   display: flex;
   gap: 10px;
   padding: 0 16px 16px;
 }

.product-card.selectable {
  position: relative;
}

.product-select-wrap {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #d1d5db;
}

.product-select-checkbox {
  width: 14px;
  height: 14px;
  cursor: pointer;
}

.product-card.batch-selected {
  box-shadow: 0 0 0 2px #111827;
}

.product-card.has-audit-badge {
  position: relative;
}

.product-card.has-ship-badge {
  position: relative;
}

.product-ship-badge {
  position: absolute;
  top: 0;
  left: 0;
  width: 82px;
  height: 82px;
  z-index: 2;
  background: linear-gradient(135deg, #dc2626 0%, #dc2626 50%, transparent 50%, transparent 100%);
  pointer-events: none;
}

.product-ship-badge > span {
  position: absolute;
  top: 19px;
  left: 1px;
  width: 58px;
  text-align: center;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  transform: rotate(-45deg);
  transform-origin: center center;
}

.product-card.has-ship-badge .product-select-wrap {
  top: 44px;
}

.product-audit-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  line-height: 1.4;
  color: #ffffff;
}

.product-audit-badge.pending {
  background: #2563eb;
}

.product-audit-badge.draft {
  background: #6b7280;
}

.product-audit-badge.approved {
  background: #16a34a;
}

.product-audit-badge.rejected {
  background: #dc2626;
}

.product-reject-reason {
  position: absolute;
  top: 36px;
  right: 10px;
  z-index: 2;
  max-width: calc(100% - 20px);
  border-radius: 8px;
  padding: 3px 8px;
  background: rgba(220, 38, 38, 0.92);
  color: #ffffff;
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
 
 .ghost-btn {
   background: transparent;
   border: 1px solid #e5e7eb;
   padding: 8px 12px;
   border-radius: 8px;
   cursor: pointer;
   font-size: 13px;
 }
 
 .ghost-btn:hover {
   border-color: #111827;
   color: #111827;
 }

.ghost-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
 
 @media (max-width: 720px) {
   .profile-head {
     grid-template-columns: 1fr;
     justify-items: start;
   }
 
   .avatar-large {
     width: 90px;
     height: 90px;
     font-size: 22px;
   }

  .profile-tab {
    font-size: 24px;
  }

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

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

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

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

  .order-cover {
    width: 72px;
    height: 72px;
  }

  .product-batch-toggle-btn {
    margin-left: 0;
  }

  .batch-price-group,
  .batch-category-group,
  .batch-iprole-group {
    flex-direction: column;
    align-items: stretch;
  }

  .batch-ip-role-control {
    grid-template-columns: 1fr;
  }
 }
