/* Earnings management follows the task-center visual system. */
#accountView #accountEarningsSheet .account-core-card {
  overflow-y: auto;
  background: #f5f7fc;
}

#accountView #accountEarningsSheet .account-core-head {
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid rgba(72, 87, 145, 0.10);
  background: rgba(249, 250, 255, 0.94);
  box-shadow: 0 8px 24px rgba(42, 54, 99, 0.06);
  backdrop-filter: blur(18px);
}

#accountView #accountEarningsSheet .earnings-report.account-core-content {
  display: block;
  padding: 14px 12px 0;
  background:
    radial-gradient(circle at 9% 0, rgba(89, 124, 235, 0.10), transparent 30%),
    radial-gradient(circle at 94% 16%, rgba(126, 86, 209, 0.08), transparent 27%),
    #f5f7fc;
}

#accountView .earnings-overview-card {
  padding: 17px;
  border-radius: 22px;
  background: linear-gradient(135deg, #4d74e5 0%, #615fd8 55%, #7655cd 100%);
  color: #fff;
  box-shadow: 0 18px 36px rgba(75, 79, 190, 0.23);
}

#accountView .earnings-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#accountView .earnings-overview-head span { color: rgba(255,255,255,.78); font-size: 11px; font-weight: 760; }
#accountView .earnings-overview-head em { padding: 4px 8px; border-radius: 999px; background: rgba(255,255,255,.13); color: rgba(255,255,255,.82); font-size: 9px; font-style: normal; }

#accountView .earnings-overview-value {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-top: 9px;
}

#accountView .earnings-overview-value strong { color: #fff; font-size: 38px; line-height: 1; font-weight: 900; letter-spacing: -1px; }
#accountView .earnings-overview-value span { color: rgba(255,255,255,.78); font-size: 11px; }

#accountView .earnings-overview-foot {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.16);
}

#accountView .earnings-overview-foot > span { display: grid; gap: 4px; }
#accountView .earnings-overview-foot small { color: rgba(255,255,255,.64); font-size: 9px; }
#accountView .earnings-overview-foot strong { color: #fff; font-size: 12px; font-weight: 820; }
#accountView .earnings-overview-foot i { width: 1px; height: 28px; background: rgba(255,255,255,.18); }

#accountView .earnings-convert-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  margin-top: 11px;
  padding: 13px;
  border: 1px solid rgba(226, 151, 55, 0.16);
  border-radius: 18px;
  background: linear-gradient(135deg, #fffaf1, #fff4e5);
  box-shadow: 0 10px 24px rgba(142, 91, 28, 0.07);
}

#accountView .earnings-convert-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f1b34f, #e28a36);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 8px 16px rgba(214, 129, 36, 0.20);
}

#accountView .earnings-convert-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

#accountView .earnings-convert-copy strong { color: #3b3025; font-size: 13px; font-weight: 850; }
#accountView .earnings-convert-copy small { overflow: hidden; color: #9a8065; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }

#accountView .earnings-convert-card button {
  min-width: 72px;
  min-height: 34px;
  padding: 0 11px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #ed9e3e, #dd7832);
  color: #fff;
  font-size: 10px;
  font-weight: 820;
  box-shadow: 0 7px 14px rgba(214, 116, 44, 0.18);
}

#accountView .earnings-convert-card button:disabled {
  background: #eadfce;
  color: #aa9780;
  box-shadow: none;
}

#accountView .earnings-support-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 11px;
}

#accountView .earnings-support-grid article {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(72, 88, 144, 0.11);
  border-radius: 17px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 10px 24px rgba(42,54,94,.06);
}

#accountView .earnings-support-icon {
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: #eaf7f3;
  color: #278a74;
  font-size: 12px;
  font-weight: 900;
}

#accountView .earnings-support-gold .earnings-support-icon { background: #fff1e6; color: #d57738; }
#accountView .earnings-support-grid article > div { display: grid; gap: 4px; min-width: 0; }
#accountView .earnings-support-grid small { color: #8b95a7; font-size: 9px; white-space: nowrap; }
#accountView .earnings-support-grid strong { color: #263249; font-size: 13px; font-weight: 850; white-space: nowrap; }

#accountView .earnings-report-note {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(101, 85, 197, 0.10);
  border-radius: 14px;
  background: #f1effc;
}

#accountView .earnings-report-note > span { display: grid; place-items: center; flex: 0 0 25px; width: 25px; height: 25px; border-radius: 9px; background: #ddd7f8; color: #6857bd; font-size: 10px; font-weight: 900; }
#accountView .earnings-report-note p { margin: 0 !important; padding: 0 !important; color: #766f93 !important; font-size: 9px !important; line-height: 1.45 !important; }

#accountView #accountEarningsSheet .account-earnings-ledger {
  gap: 11px;
  margin: 12px 12px 28px;
  padding: 14px 12px;
  border: 1px solid rgba(72, 88, 144, 0.11);
  border-radius: 20px;
  background: rgba(255,255,255,.97);
  box-shadow: 0 13px 28px rgba(42,54,94,.07);
}

#accountView #accountEarningsSheet .account-earnings-ledger-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
}

#accountView #accountEarningsSheet .account-earnings-ledger-title strong { color: #263249; font-size: 15px; font-weight: 850; }
#accountView #accountEarningsSheet .account-earnings-ledger-title small { color: #8b95a7; font-size: 9px; }

#accountView #accountEarningsSheet .ledger-filters { gap: 6px; margin: 0 -2px; padding: 1px 2px 3px; }
#accountView #accountEarningsSheet .ledger-filters button {
  min-height: 30px;
  padding: 0 10px;
  border-color: rgba(77, 93, 151, 0.12);
  background: #f6f8fc;
  color: #7d8799;
  font-size: 10px;
}

#accountView #accountEarningsSheet .ledger-filters button.active {
  border-color: transparent;
  background: linear-gradient(135deg, #5276df, #7059ce);
  color: #fff;
  box-shadow: 0 7px 15px rgba(76,81,185,.18);
}

#accountView #accountEarningsSheet .ledger-list { display: grid; gap: 0; }
#accountView #accountEarningsSheet .ledger-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 66px;
  padding: 10px 2px;
  border-bottom: 1px solid #edf0f5;
}

#accountView #accountEarningsSheet .ledger-item:last-child { border-bottom: 0; }
#accountView .ledger-kind-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 13px; background: #eef3ff; color: #5570cf; font-size: 10px; font-weight: 900; }
#accountView .ledger-kind-icon.gold { background: #fff2e7; color: #d27a3e; }
#accountView .ledger-item-copy { display: grid; gap: 4px; min-width: 0; }
#accountView .ledger-item-copy strong { overflow: hidden; color: #303b50; font-size: 12px; font-weight: 790; text-overflow: ellipsis; white-space: nowrap; }
#accountView .ledger-item-copy small { overflow: hidden; color: #9aa3b1; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
#accountView #accountEarningsSheet .ledger-amount { display: grid; justify-items: end; gap: 4px; }
#accountView #accountEarningsSheet .ledger-amount strong { font-size: 11px; font-weight: 850; }
#accountView #accountEarningsSheet .ledger-amount.income strong { color: #dc783b; }
#accountView #accountEarningsSheet .ledger-amount.expense strong { color: #526881; }
#accountView #accountEarningsSheet .ledger-amount small { color: #a0a8b5; font-size: 8px; }

html.theme-dark #accountView #accountEarningsSheet .account-core-card,
html.theme-dark #accountView #accountEarningsSheet .earnings-report.account-core-content { background: #090d14 !important; }
html.theme-dark #accountView #accountEarningsSheet .account-core-head { background: rgba(10,15,24,.96) !important; border-color: rgba(96,165,250,.16) !important; }
html.theme-dark #accountView .earnings-overview-card { background: linear-gradient(135deg, #18345d, #302857); box-shadow: none; }
html.theme-dark #accountView .earnings-convert-card { border-color: rgba(234,175,83,.17); background: linear-gradient(135deg, #211b13, #1b1712); box-shadow: none; }
html.theme-dark #accountView .earnings-convert-copy strong { color: #f4e8d4 !important; }
html.theme-dark #accountView .earnings-convert-copy small { color: #ac9b83 !important; }
html.theme-dark #accountView .earnings-support-grid article,
html.theme-dark #accountView #accountEarningsSheet .account-earnings-ledger { border-color: rgba(96,165,250,.15); background: #101a29; box-shadow: none; }
html.theme-dark #accountView .earnings-support-grid strong,
html.theme-dark #accountView .ledger-item-copy strong { color: #eef5ff !important; }
html.theme-dark #accountView .earnings-report-note { border-color: rgba(126,104,220,.18); background: #17182b; }
html.theme-dark #accountView #accountEarningsSheet .ledger-item { border-bottom-color: rgba(96,165,250,.11); }

@media (max-width: 360px) {
  #accountView #accountEarningsSheet .earnings-report.account-core-content { padding-inline: 9px; }
  #accountView #accountEarningsSheet .account-earnings-ledger { margin-inline: 9px; }
  #accountView .earnings-support-grid article { padding: 11px 9px; gap: 8px; }
  #accountView .earnings-support-icon { flex-basis: 34px; width: 34px; height: 34px; }
}

/* Earnings management body edge expansion v447 */
#accountView #accountEarningsSheet .earnings-report.account-core-content {
  width: 100% !important;
  max-width: 100% !important;
  padding-left: 4px !important;
  padding-right: 4px !important;
  box-sizing: border-box !important;
}

#accountView #accountEarningsSheet :is(.earnings-overview-card, .earnings-convert-card, .earnings-support-grid, .earnings-report-note, .account-earnings-ledger) {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box !important;
}

#accountView #accountEarningsSheet .account-earnings-ledger {
  margin: 12px 0 28px !important;
}
