/* 订单台账：与仪表台统一的紫色 SaaS 风格 */
#orderLedgerView {
  background:
    radial-gradient(circle at 100% 0%, rgba(109,74,255,.07), transparent 24%),
    linear-gradient(180deg, #f8f9fd 0%, #f4f6fb 100%);
  border: 1px solid #ebe9f4;
  border-radius: 16px;
  padding: 16px 16px 22px;
}
#orderLedgerView .order-stats-cards {
  gap: 14px;
  margin-bottom: 14px;
}
#orderLedgerView .stat-card {
  position: relative;
  overflow: hidden;
  min-height: 84px;
  border: 1px solid #ebe9f4;
  border-radius: 13px;
  padding: 15px 17px;
  box-shadow: 0 6px 18px rgba(68,58,122,.05);
}
#orderLedgerView .stat-card:nth-child(1) { background: linear-gradient(135deg, #f0f5ff, #e3ecff); }
#orderLedgerView .stat-card:nth-child(2) { background: linear-gradient(135deg, #fff9ef, #ffeed7); }
#orderLedgerView .stat-card:nth-child(3) { background: linear-gradient(135deg, #f1fbfd, #e2f6fb); }
#orderLedgerView .stat-card:nth-child(4) { background: linear-gradient(135deg, #f1fbf6, #e2f5eb); }
#orderLedgerView .stat-card:hover {
  transform: translateY(-1px);
  border-color: #ddd6f6;
  box-shadow: 0 10px 24px rgba(78,62,145,.09);
}
#orderLedgerView .stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255,255,255,.86) !important;
  box-shadow: 0 5px 13px rgba(68,58,122,.07);
}
#orderLedgerView .stat-label { color: #858ba3; font-size: 12px; }
#orderLedgerView .stat-value { color: #25283f; font-size: 22px; font-weight: 800; }
#orderLedgerView .stat-sub { color: #9095aa; }
#orderLedgerView .toolbar {
  gap: 10px;
  padding: 12px;
  margin-bottom: 11px;
  border-radius: 14px;
  background: rgba(255,255,255,.94);
  border: 1px solid #ebe9f4;
  box-shadow: 0 7px 20px rgba(68,58,122,.05);
}
#orderLedgerView .search-box,
#orderLedgerView .filter-select {
  height: 38px;
  border: 1px solid #e8e5f2;
  border-radius: 9px;
  background: #faf9ff;
  color: #454963;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
#orderLedgerView .search-box:focus,
#orderLedgerView .filter-select:focus {
  outline: none;
  border-color: #a99bf0;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(109,74,255,.09);
}
#orderLedgerView .filter-label { color: #a0a4b8; }
#orderLedgerView .result-count { color: #7d829a; }
#orderLedgerView .quick-filters {
  gap: 8px;
  margin: 0 0 12px;
  padding: 0 2px;
}
#orderLedgerView .quick-filter-label { color: #8d92a8; }
#orderLedgerView .quick-filter-tag {
  padding: 6px 13px;
  border: 1px solid #e7e4f2;
  border-radius: 999px;
  background: rgba(255,255,255,.9);
  color: #747a92;
  font-weight: 600;
}
#orderLedgerView .quick-filter-tag:hover {
  color: #6d4aff;
  border-color: #cfc6f4;
  background: #f7f4ff;
}
#orderLedgerView .quick-filter-tag.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #8067e8, #7354df);
  box-shadow: 0 4px 11px rgba(109,74,255,.20);
}
#orderLedgerView .quick-filter-tag.clear { color: #d46b86; border-color: #f2cdd8; }
#orderLedgerView .quick-filter-tag.clear:hover { background: #fff4f7; border-color: #e6a6b8; }
#orderLedgerView .table-wrap {
  border: 1px solid #e8e5f2;
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(68,58,122,.07);
  scrollbar-width: thin;
  scrollbar-color: #c9c2e8 #f7f6fb;
}
#orderLedgerView .table-wrap::-webkit-scrollbar { width: 9px; height: 9px; }
#orderLedgerView .table-wrap::-webkit-scrollbar-track { background: #f7f6fb; }
#orderLedgerView .table-wrap::-webkit-scrollbar-thumb { background: #c9c2e8; border-radius: 999px; }
.order-table-shell::after {
  border-color: #d8d2f5;
  border-bottom-width: 1px !important;
  border-radius: 8px 8px 0 0;
}
.order-table thead tr.col-row > th {
  color: #575173;
  background: #f8f7ff;
  font-weight: 700;
}
.order-table thead tr.col-row .col-fixed-1 {
  background: linear-gradient(90deg, #f4f1ff 0%, #f8f7ff 38%);
}
.order-table thead tr.col-row .col-fixed-2,
.order-table thead tr.col-row .col-fixed-3 {
  background: #f8f7ff;
}
.order-table thead tr.col-row .col-fixed-right {
  background: linear-gradient(90deg, #f8f7ff 0%, #f3f0ff 100%);
}
.order-table thead tr.col-row > th::after { background: #e4e0f3; }
.order-table tbody td {
  color: #444860;
  border-bottom-color: #f0eff5;
}
.order-table tbody td:not(:last-child) { border-right-color: #f0eff5; border-right-width: 1px; }
.order-table tbody tr:hover { background: #faf9ff !important; }
.order-table tbody tr:hover .col-fixed,
.order-table tbody tr:hover .col-fixed-right { background: #faf9ff !important; }
.order-table .amount-total {
  color: #5b6fc4;
  font-weight: 700;
}
.order-table .amount-settlement { color: #4f5872; }
.order-table .amount-profit.positive { color: #2f9e82; }
.order-table .amount-profit.negative { color: #d35f72; }
.order-table .profit-rate { color: #7d8298; opacity: 1; }
.order-table .gift-badge {
  background: #f5f1ff;
  color: #785fe0;
  border-radius: 999px;
}
.order-table .boom-amount { color: #d18a3c; }
.order-table .boom-empty { color: #c5c8d5; }
.order-table .cell-muted { color: #9b9fb1; }
.order-table .status-done { background: #e9f8f4; color: #2e9c8a; }
.order-table .status-pending { background: #fff6e8; color: #d18a3c; }
.order-table .status-tag { padding: 3px 10px; font-weight: 700; }
.order-table .action-link {
  color: #6d4aff;
  font-weight: 700;
  margin-right: 10px;
}
.order-table .action-link.danger { color: #d4627e; }
#orderLedgerView .empty-state { color: #9297aa; }
@media (max-width: 1200px) {
  #orderLedgerView .order-stats-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  #orderLedgerView { padding: 12px 10px 18px; }
  #orderLedgerView .order-stats-cards { grid-template-columns: 1fr; }
}

#orderLedgerView { background-color: #f7f6ff !important; }
#orderLedgerView .table-wrap { border-color: #d8d2f5 !important; }
.order-table-shell::after { border: 1px solid #cfc5f4 !important; border-bottom-width: 1px !important; }
.order-table thead tr.col-row > th { background: #f4f1ff !important; color: #5b4f88 !important; }
.order-table thead tr.col-row .col-fixed-1,
.order-table thead tr.col-row .col-fixed-2,
.order-table thead tr.col-row .col-fixed-3,
.order-table thead tr.col-row .col-fixed-right { background: #f4f1ff !important; }
.order-table tbody tr:hover,
.order-table tbody tr:hover .col-fixed,
.order-table tbody tr:hover .col-fixed-right { background: #faf8ff !important; }

.order-table .boss-id-cell {
  display: inline-block;
  max-width: 100%;
  padding: 3px 6px;
  border-radius: 6px;
  color: #5f5a7a;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.order-table .boss-id-cell:hover {
  color: #6d4aff;
  background: #f4f1ff;
}
.order-table .boss-id-cell::after {
  content: "⧉";
  margin-left: 4px;
  opacity: 0;
  font-size: 10px;
}
.order-table .boss-id-cell:hover::after { opacity: .7; }

.order-table .taker-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 4px;
  width: 100%;
  max-width: 100%;
  white-space: nowrap;
}
.order-table .taker-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.order-table .gift-badge {
  flex: 0 0 auto;
  margin-left: 0;
  padding: 1px 5px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 999px;
}

.order-table .taker-name {
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
  font-size: 12px;
}
.order-table .settle-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
  font-size: 12px;
}
.order-table .settle-name {
  max-width: 88px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.order-table .settle-row .gift-badge {
  padding: 1px 5px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.order-table .gift-cell { text-align: center; white-space: nowrap; }
.order-table .gift-empty { color: #c5c8d5; }
.order-table .gift-cell .gift-badge { margin-left: 0; }
.order-table .taker-name {
  display: block;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  font-size: 12px;
}

.order-table .taker-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 4px;
  width: 100%;
  white-space: nowrap;
}
.order-table .taker-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
.order-table .taker-divider {
  color: #c6c9d6;
  font-size: 11px;
  flex: 0 0 auto;
}
.order-table .taker-row .gift-badge {
  flex: 0 0 auto;
  margin-left: 0;
  font-size: 10px;
}

.order-table .taker-row,
.order-table .gift-item {
  min-height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.order-table .taker-row + .taker-row,
.order-table .gift-item + .gift-item {
  border-top: 1px solid #e8e6f5;
}
.order-table .gift-cell { text-align: center; white-space: nowrap; }
.order-table .gift-cell .gift-badge { margin-left: 0; font-size: 10px; }
.order-table .gift-empty { color: #c5c8d5; }

.order-table .remark-cell {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.order-table .remark-text {
  display: block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.order-table .taker-gift-cell {
  padding: 0 !important;
  overflow: hidden;
}
.order-table .taker-gift-line {
  display: grid;
  grid-template-columns: 140px 86px;
  min-height: 22px;
  align-items: center;
}
.order-table .taker-gift-line + .taker-gift-line {
  border-top: 1px solid #e8e6f5;
}
.order-table .taker-gift-line .taker-row,
.order-table .taker-gift-line .gift-item {
  min-height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  overflow: hidden;
}
.order-table .taker-gift-line .taker-row {
  padding: 0 6px;
  border-right: 1px solid #f0eff5;
}
.order-table .taker-gift-line .gift-item { padding: 0 4px; }
.order-table .taker-gift-line .taker-name { font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.order-table .taker-gift-line .gift-badge { margin-left: 0; font-size: 10px; }
