/**
 * Module: Cột Phải - Thẻ Người Mua Chuẩn 1688 (Buyer Account Panel - 320px x 362px)
 */
.buyer-account-panel {
  width: 320px;
  height: 362px;
  background: linear-gradient(180deg, #fff8f4 0%, #ffffff 38%);
  border: 1px solid #ffe8db;
  border-radius: 8px;
  padding: 10px 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
}

/* 1. Header: Avatar + Greeting + Quick Link */
.buyer-greeting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
}

.buyer-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.buyer-avatar-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff7a38 0%, #ff5000 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(255, 80, 0, 0.2);
}

.buyer-avatar-circle.is-guest {
  background: #f3f4f6;
  color: #9ca3af;
  box-shadow: none;
}

.buyer-name-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
}

.buyer-name-greeting {
  font-size: 11px;
  color: #6b7280;
  font-weight: 400;
}

.buyer-name-display {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.buyer-account-quicklink {
  font-size: 11px;
  font-weight: 500;
  color: #6b7280;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px 8px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.buyer-account-quicklink:hover {
  color: #ff5000;
  background: #fff0e6;
  border-color: #ffd8c4;
}

/* 2. Mini Wallet Card (Thẻ Số Dư & Tỷ Giá) */
.buyer-wallet-card {
  background: linear-gradient(135deg, #ffffff 0%, #fffbf8 100%);
  border: 1px solid #ffd8c4;
  border-radius: 8px;
  padding: 7px 10px;
  box-shadow: 0 1px 3px rgba(255, 80, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-sizing: border-box;
}

.wallet-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wallet-card-row.top-row {
  border-bottom: 1px dashed #f5e2d5;
  padding-bottom: 4px;
}

.wallet-label-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.wallet-label {
  font-size: 11px;
  color: #6b7280;
  font-weight: 500;
  line-height: 1;
}

.buyer-balance-toggle-btn {
  background: none;
  border: none;
  padding: 0 2px;
  cursor: pointer;
  color: #9ca3af;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
  line-height: 1;
}

.buyer-balance-toggle-btn:hover {
  color: #ff5000;
}

.buyer-balance-masked {
  letter-spacing: 2px;
  font-size: 13px !important;
  font-family: inherit !important;
  color: #9ca3af !important;
  font-weight: 700 !important;
}

.buyer-financial-value {
  font-size: 15px;
  font-weight: 700;
  color: #ff5000;
  font-family: var(--font-price);
  line-height: 1.2;
}

.buyer-topup-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: linear-gradient(135deg, #ff6000 0%, #ff5000 100%);
  color: #ffffff !important;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  text-decoration: none;
  line-height: 1.3;
  box-shadow: 0 1px 3px rgba(255, 80, 0, 0.2);
  transition: transform 0.1s ease, box-shadow 0.15s ease;
}

.buyer-topup-btn:hover {
  transform: translateY(-0.5px);
  box-shadow: 0 2px 5px rgba(255, 80, 0, 0.3);
}

.buyer-rate-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
}

.buyer-rate-badge .rate-label {
  color: #9ca3af;
  font-size: 10px;
}

.buyer-rate-badge .rate-val {
  color: #4b5563;
  font-weight: 600;
  font-family: var(--font-price);
}

/* 3. Legacy compatibility aliases */
.buyer-financial-summary {
  display: flex;
  flex-direction: column;
}

.buyer-financial-col {
  display: flex;
  flex-direction: column;
}

.buyer-financial-right {
  display: flex;
  align-items: center;
}

/* 4. Quick Shortcuts */
.buyer-shortcuts-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  text-align: center;
  padding: 6px 0;
  border-top: 1px solid #f2f2f2;
  border-bottom: 1px solid #f2f2f2;
}

.shortcut-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  color: #444444;
  text-decoration: none;
}

.shortcut-item:hover {
  color: #ff5b00;
}

.shortcut-item svg,
.shortcut-item i {
  font-size: 18px;
  line-height: 1;
  stroke: currentColor;
}

/* 5 Order Status Counters */
.buyer-order-stats-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  text-align: center;
}

.order-stat-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.order-stat-num {
  font-size: 15px;
  font-weight: 800;
  color: #111111;
  line-height: 1.1;
}

.order-stat-label {
  font-size: 10px;
  color: #888888;
  margin-top: 2px;
}

.user-card-cta-btn {
  width: 100%;
  height: 28px;
  background: #ffffff;
  border: 1px solid #ff5b00;
  color: #ff5b00 !important;
  font-size: 12px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.user-card-cta-btn:hover {
  background: #fff3eb;
  color: #ff5b00 !important;
  border-color: #ff5b00;
}
