/* 个人账户面板：余额、套餐与充值共用一个清晰的信息层级。 */
.console-account-popover {
  --console-account-value-size: 20px;
  box-sizing: border-box;
  width: 288px;
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 76px);
  overflow-y: auto;
  padding: 16px;
  border: 1px solid #e5e8ee;
  border-radius: 10px;
  background: #fff;
  color: #17202e;
  box-shadow: 0 8px 24px rgb(16 24 40 / 12%);
}

.console-account-popover h2,
.console-account-popover p {
  margin: 0;
}

.console-account-title {
  margin-bottom: 16px !important;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.console-account-balance-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #475467;
  font-size: 12px;
  line-height: 18px;
}

.console-account-section-title {
  color: #475467;
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
}

.console-account-link,
.console-account-retry {
  padding: 0;
  border: 0;
  background: transparent;
  color: #2454d6;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}

.console-account-link:hover,
.console-account-retry:hover {
  color: #1745bc;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.console-account-amount {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-height: 36px;
  margin-top: 4px !important;
  font-size: var(--console-account-value-size);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 36px;
}

.console-account-unit {
  color: #475467;
  font-size: 12px;
  font-weight: 400;
}

.console-account-skeleton,
.console-account-loading-text,
.console-account-error {
  display: none;
}

[data-cash-balance-state="loading"] .console-account-amount,
[data-cash-balance-state="error"] .console-account-amount {
  display: none;
}

[data-cash-balance-state="loading"] .console-account-skeleton {
  display: block;
  width: 112px;
  height: 28px;
  margin-block: 8px 4px;
  border-radius: 5px;
  background: #edf0f4;
  animation: console-account-loading 1.4s ease-in-out infinite alternate;
}

[data-cash-balance-state="loading"] .console-account-loading-text {
  display: block;
}

[data-cash-balance-state="error"] .console-account-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 36px;
  margin-top: 4px;
  color: #475467;
  font-size: 13px;
  line-height: 20px;
}

.console-account-packages {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #eef0f3;
}

.console-account-packages > p {
  margin-bottom: 8px;
  color: #475467;
  font-size: 12px;
  line-height: 18px;
}

.console-account-packages .console-package-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.console-account-packages .console-package-header {
  min-width: 0;
  flex: 1 1 100%;
}

.console-account-packages .console-package-name {
  color: #17202e;
  font-size: var(--console-account-value-size);
  font-weight: 600;
  line-height: 28px;
}

.console-account-packages .console-package-badge {
  padding: 1px 5px;
  border: 0;
  border-radius: 4px;
  background: #edf2ff;
  color: #2454d6;
  font-size: 10px;
  font-weight: 500;
}

.console-account-packages .console-package-date {
  margin-top: 0;
  color: #475467;
  font-size: 11px;
  line-height: 18px;
}

.console-account-packages .console-package-date svg {
  display: none;
}

.console-account-packages .console-package-benefits {
  flex-basis: 100%;
  margin-top: 2px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #475467;
  font-size: 11px;
}

.console-account-recharge {
  display: flex;
  width: 100%;
  height: 36px;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: var(--console-recharge-background, #f7e1bd);
  color: var(--console-recharge-color, #925b0a);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: filter 140ms ease;
}

.console-account-recharge:hover {
  filter: brightness(0.98);
}

.console-account-popover :is(a, button):focus-visible {
  outline: 2px solid #2454d6;
  outline-offset: 3px;
}

@keyframes console-account-loading {
  to { opacity: 0.5; }
}

@media (prefers-reduced-motion: reduce) {
  .console-account-skeleton { animation: none !important; }
  .console-account-recharge { transition: none; }
}
