/* The balance & subscription dialog, and the welcome sheet.
   (The wallet chip in the header lives in layout.css.) */

.billing-dialog { width: min(660px, 96vw); max-height: 92vh; overflow-y: auto; }
.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .plan-grid { grid-template-columns: 1fr; } }
.plan-card, .pack-row {
  background: var(--panel2); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.plan-card.current { border-color: color-mix(in srgb, var(--accent) 60%, var(--border)); }
.plan-card .price { font-family: var(--font-display); font-size: 24px; font-weight: 500; }
.plan-card .price small { font-family: var(--font-ui); font-size: 13px; font-weight: 400; color: var(--muted); }
.pack-row { flex-direction: row; align-items: center; justify-content: space-between; }
.balance-big { font-family: var(--font-display); font-size: 44px; font-weight: 500; line-height: 1; letter-spacing: -.02em; }

.ledger { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; max-height: 320px; overflow-y: auto; }
.ledger li { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.ledger .when { color: var(--muted); font-size: 13px; }
.ledger .pos { color: var(--accent2); font-weight: 600; }
.ledger .neg { color: var(--muted); }

.billing-note {
  background: color-mix(in srgb, var(--warn) 12%, var(--panel2)); border: 1px solid color-mix(in srgb, var(--warn) 35%, var(--border));
  border-radius: 12px; padding: 10px 14px; font-size: 14px;
}
.billing-note.ok { background: color-mix(in srgb, var(--accent2) 12%, var(--panel2)); border-color: color-mix(in srgb, var(--accent2) 35%, var(--border)); }
.billing-note.busy { background: var(--panel2); border-color: var(--border); color: var(--muted); }

/* --- Welcome sheet (first run) --- */
.onboard-dialog { width: min(480px, 94vw); gap: 16px; }
.onboard-dialog p { color: var(--muted); font-size: 15.5px; }
.onboard-dialog p b { color: var(--text); font-weight: 600; }
.link-btn { background: none; border: none; padding: 0; color: var(--muted); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover:not(:disabled) { background: none; color: var(--text); }
