/* Metric HUD Grid */
.hud-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.hud-card {
  background: linear-gradient(145deg, #131620 0%, #0c0e14 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.hud-card.gold-accent {
  border-color: rgba(212, 175, 55, 0.35);
  background: radial-gradient(circle at top right, rgba(212, 175, 55, 0.07), #0e1118 70%);
}

.hud-card.emerald-accent {
  border-color: rgba(16, 185, 129, 0.3);
  background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.07), #0e1118 70%);
}

.hud-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.hud-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--muted);
  font-weight: 700;
}

.hud-pill {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 2px 7px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}

.hud-value {
  font-size: 2.1rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
  letter-spacing: -0.5px;
}

.hud-subtext {
  margin-top: 12px;
  font-size: 0.78rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Secondary Split Panels */
.analytics-split {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.panel-box {
  background: linear-gradient(145deg, #131620 0%, #0c0e14 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.panel-head-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-head h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.3px;
}

/* Clean Metrics Strip for Orders */
.order-metrics-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 12px 10px;
  margin-bottom: 14px;
}

.order-stat-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 3px;
}

.order-stat-col:not(:last-child) {
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.order-stat-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.5px;
}

.order-stat-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
}

/* Dual-tone Progress Bar */
.pipeline-bar-wrapper {
  margin-top: 6px;
}

.pipeline-legend {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.pipeline-bar {
  width: 100%;
  height: 6px;
  background: #090a0f;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.bar-paid {
  background: linear-gradient(90deg, #10b981, #059669);
  height: 100%;
  transition: width 0.4s ease;
}

.bar-pending {
  background: linear-gradient(90deg, #f59e0b, #d97706);
  height: 100%;
  transition: width 0.4s ease;
}

/* Treasury Card Block */
.treasury-card {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.treasury-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.treasury-val {
  font-size: 1.45rem;
  font-weight: 800;
  color: #fbbf24;
  margin-top: 3px;
  font-family: monospace, sans-serif;
}

/* ========================================================
   WIDGET BARU: AFFILIATE LEADERBOARD & LIVE FEED
   ======================================================== */
.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.leader-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
}

.leader-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rank-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
}

.rank-1 { background: linear-gradient(135deg, #d4af37, #99750d); color: #000; box-shadow: 0 0 10px rgba(212,175,55,0.4); }
.rank-2 { background: #94a3b8; color: #000; }
.rank-3 { background: #b45309; color: #fff; }

.leader-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
}

.leader-code {
  font-size: 0.7rem;
  font-family: monospace;
  color: var(--muted);
}

.leader-sales {
  text-align: right;
}

.leader-amount {
  font-size: 0.95rem;
  font-weight: 800;
  color: #34d399;
}

.leader-count {
  font-size: 0.68rem;
  color: var(--muted);
}

/* Feed List */
.feed-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feed-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.25);
  border-left: 3px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.feed-item.paid {
  border-left-color: #10b981;
}

.feed-item.pending {
  border-left-color: #f59e0b;
}

.feed-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
}

.feed-meta {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 2px;
}

.badge-status {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
}

.badge-active {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-pending {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
