/* The Account page (account-pane.js) and the credits / Plus dialogs (account.js). Layout pieces (.page, .set-group, .set-card, .fld,
   .btn) are app.css's. */
.acct-form { display: flex; flex-direction: column; gap: 12px; }
.acct-idp { width: 100%; background: var(--surface); }
.acct-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.acct-or::before, .acct-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.acct-links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0; }
.acct-link { border: 0; background: none; padding: 4px 0; color: var(--accent-text); font: inherit; font-size: 14px; cursor: pointer; }
.acct-link:hover { text-decoration: underline; }
.acct-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* Signed out: the sign-in screen (account-pane.js signedOut), a card in the middle of the page. The page's own heading is hidden for it
   (account-view.js sets .signin-only). */
.signin-only .me-head { display: none; }
.auth { min-height: calc(100dvh - var(--top-h) - var(--tab-h) - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 54px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; }
.auth-card { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 12px; padding: 28px 24px 22px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.auth-brand { text-align: center; font: 700 15px/1 var(--font-display); letter-spacing: -0.01em; color: var(--accent-text); }
.auth-card h1 { margin: 0; text-align: center; font: 700 26px/1.15 var(--font-display); letter-spacing: -0.02em; }
.auth-sub { margin: 0 0 6px; text-align: center; color: var(--muted); font-size: 14px; }
.auth-card .btn { min-height: 44px; }
.auth-forgot { align-self: flex-end; margin-top: -6px; padding: 0; font-size: 13px; }
.auth-switch { margin: 4px 0 0; text-align: center; font-size: 14px; color: var(--muted); }
.auth-foot { margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; font-size: 13px; color: var(--muted); text-align: center; }
.auth-foot a { color: inherit; }
@media (max-width: 520px) { .auth { justify-content: flex-start; padding-top: 8px; } .auth-card { padding: 22px 16px 18px; border-radius: 16px; } }

.acct-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.acct-who b { display: block; font-size: 17px; }
.acct-who small { display: block; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.acct-avatar { flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; object-fit: cover;
  background: var(--accent-soft); color: var(--accent-text); font: 700 22px/1 var(--font-display); }

.acct-balance { display: flex; align-items: baseline; gap: 8px; }
.acct-balance b { font: 700 34px/1.1 var(--font-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.acct-balance span { color: var(--muted); font-size: 14px; }
.acct-packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.acct-pack { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 10px 12px; border-radius: 12px; text-align: left;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.acct-pack:hover { border-color: var(--accent); }
.acct-pack:disabled { opacity: .55; cursor: default; }
.acct-pack b { font: 700 20px/1.2 var(--font-display); font-variant-numeric: tabular-nums; }
.acct-pack span { font-size: 12px; color: var(--muted); }
.acct-pack em { margin-top: 6px; font-style: normal; font-weight: 600; color: var(--accent-text); }

.acct-plan b { display: flex; align-items: center; gap: 6px; font-size: 16px; }
.acct-plan b svg.i { width: 18px; height: 18px; color: var(--live); }
.acct-plan small { display: block; color: var(--muted); font-size: 13px; }
.acct-feats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.acct-feats li { display: flex; align-items: center; gap: 8px; }
.acct-feats svg.i { width: 15px; height: 15px; flex: none; color: var(--live); }
.acct-lead { margin: 0 0 12px; font-size: 15px; }
.sheet-body .acct-feats { margin-bottom: 14px; }
.sheet-body .acct-packs { margin-bottom: 12px; }

.acct-log { list-style: none; margin: 0; padding: 0; }
.acct-log li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.acct-log li:first-child { border-top: 0; padding-top: 0; }
.acct-log span { min-width: 0; overflow-wrap: anywhere; }
.acct-log small { display: block; color: var(--muted); font-size: 12px; }
.acct-log b { flex: none; font-variant-numeric: tabular-nums; }
.acct-log b.plus { color: var(--live); }
.acct-log b.minus { color: var(--muted); }
.page code { font-size: 12px; padding: 1px 5px; border-radius: 5px; background: var(--raised); border: 1px solid var(--line); }
[data-credits].link { cursor: pointer; }
[data-credits].link:hover { text-decoration: underline; }

@media (max-width: 520px) { .acct-form .grid2 { grid-template-columns: 1fr; } }

/* A hosted run with nobody signed in (main.js): only Discover and the Account page (the top bar's button) are offered. */
:root[data-locked] #tabbar [data-tab]:not([data-tab="discover"]) { display: none; }

/* Codes: the "Use code" box for everyone, and an admin's panel of codes to give away. */
.acct-redeem { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.acct-redeem input { flex: 1 1 200px; min-height: 40px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface);
  color: var(--ink); font: 600 15px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; text-transform: uppercase; }
.acct-redeem input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.acct-redeem input::placeholder { font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--faint); }
.acct-codegrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.acct-codes { list-style: none; margin: 0; padding: 0; }
.acct-codes li { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--line); }
.acct-codes li.spent code { text-decoration: line-through; color: var(--muted); }
.acct-codes code { font-size: 14px; padding: 2px 6px; }
.acct-codes small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.acct-trial { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line, rgba(128,128,128,.25)); display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.acct-trial .form-note { margin: 0; }
