/* account.css — the Log in button (top right), its account menu and the log-in dialog.
   See js/account/account.js. Phone sizes are in mobile.css. */
.acct-btn {
  position: absolute; z-index: 1001; right: 10px; top: calc(14px + env(safe-area-inset-top, 0px));
}
/* Signed in: the button keeps an accent outline */
.acct-btn.signed-in { border-color: var(--accent); }
.acct-btn.signed-in svg { color: var(--accent); }
.acct-btn[aria-expanded="true"] { background: var(--accent); color: var(--night); border-color: var(--accent); }
.acct-btn[aria-expanded="true"] span, .acct-btn[aria-expanded="true"] svg { color: var(--night); }
body.meet-mode .acct-btn, body.meet-mode .acct-pop, body.wv-open .acct-btn, body.wv-open .acct-pop { display: none; }

.acct-pop {
  position: absolute; z-index: 1002; right: 70px; top: calc(14px + env(safe-area-inset-top, 0px));
  width: 250px; box-sizing: border-box; padding: 12px 14px; font-size: 13px;
}
.acct-pop[hidden] { display: none; }
.acct-who { overflow-wrap: anywhere; }
.acct-note { margin: 6px 0 10px; font-size: 12px; color: var(--muted); }
.acct-pop button { width: 100%; }

.login-dlg { width: min(380px, calc(100vw - 32px)); }
.login-dlg .text-in { width: 100%; box-sizing: border-box; }
.login-msg { min-height: 18px; margin-top: 8px; font-size: 12.5px; color: var(--warn); }
.login-msg.ok { color: var(--muted); }

/* Shared trips and welcome banner (js/account/shares.js): under the top bar on every page */
.share-banner { position: fixed; z-index: 1500; left: 50%; transform: translateX(-50%); top: calc(var(--topbar-h, 56px) + env(safe-area-inset-top, 0px) + 8px);
  width: min(640px, calc(100vw - 20px)); display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.share-banner[hidden] { display: none; }
.sb-row { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; font-size: 13.5px; line-height: 1.4;
  background: #13233b; border: 1px solid var(--accent); color: var(--text); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); }
.sb-row > span:nth-child(2) { flex: 1; min-width: 0; }
.sb-row a { color: var(--accent); font-weight: 700; }
.sb-acts { display: flex; gap: 6px; flex: none; }
.sb-invite { border-color: var(--warn); background: #2a2516; }
.sb-note.warn { border-color: var(--bad); }
.sb-welcome { border-color: var(--good); justify-content: space-between; }
.sb-welcome b { flex: 1; font-size: 15px; }
@media (max-width: 600px) { .sb-row { flex-wrap: wrap; } .sb-acts { width: 100%; } .sb-acts button { flex: 1; } }
@media print { .share-banner { display: none !important; } }
/* account share invitation (js/account/shares.js) */
.sb-acct .sb-note { display: block; margin-top: 5px; font-size: 12.5px; opacity: 0.9; }
.sb-acct .sb-alerts { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12.5px; cursor: pointer; }
/* Invite someone (account/invite.js) */
.iv-dlg { width: min(540px, calc(100vw - 24px)); max-height: calc(100vh - 40px); overflow: auto; }
.iv-lead { margin: 0 0 4px; }
.iv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.iv-grid .field-label { margin: 8px 0 0; }
.iv-grid .text-in { display: block; width: 100%; box-sizing: border-box; margin-top: 4px; font-size: 14px; color: var(--text); }
.iv-w { grid-column: 1 / -1; }
.iv-req { color: var(--bad); }
.text-in.iv-bad { border-color: var(--bad); }
.iv-chk { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; font-size: 13.5px; cursor: pointer; }
.iv-chk input { margin-top: 3px; width: 16px; height: 16px; flex: none; }
.iv-note { margin: 10px 0 0; font-size: 13px; padding: 8px 11px; border-radius: 9px; background: rgba(124, 199, 255, 0.12); }
.iv-note[data-kind="ok"] { background: rgba(127, 224, 181, 0.16); color: var(--good); }
.iv-note[data-kind="bad"] { background: rgba(255, 138, 148, 0.16); color: var(--bad); }
.iv-note[data-kind="warn"] { background: rgba(242, 193, 78, 0.16); color: var(--warn); }
.iv-dlg .share-actions { justify-content: flex-end; }
.iv-list { margin-top: 16px; border-top: 1px solid var(--edge); padding-top: 10px; }
.iv-list h4 { margin: 0 0 4px; font-size: 13px; color: var(--muted); font-weight: 700; }
.iv-row { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--edge); flex-wrap: wrap; }
.iv-row:first-of-type { border-top: 0; }
.iv-row > div { flex: 1; min-width: 150px; }
.iv-av { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, #5b8def, #7c5cf0); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.iv-dim { color: var(--muted) !important; } .iv-del { color: var(--bad) !important; }
@media (max-width: 520px) { .iv-grid { grid-template-columns: 1fr; } }

/* Ask the owner to share a trip (trips/share-ask.js) */
.sa-people { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0 10px; }
.sa-pick { font: inherit; font-size: 12.5px; font-weight: 600; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--edge); background: transparent; color: var(--text); cursor: pointer; }
.sa-pick:hover { border-color: var(--accent, #1F6FD1); }
.sa-st { flex: none; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.sa-st.g { background: rgba(127, 224, 181, 0.16); color: var(--good); }
.sa-st.y { background: rgba(242, 193, 78, 0.18); color: var(--warn); }
.sa-st.r { background: rgba(255, 138, 148, 0.2); color: var(--bad); }

/* Dialog close (✕) buttons: no side padding, so the icon sits in the middle of the circle */
.share-dlg .icon-btn, .meet-top .icon-btn { padding: 0; box-sizing: border-box; }

/* Buddies to pick from (account/buddies.js): trip Share page, "Ask … to share" */
.bd-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0 10px; }
.bd-chip { font: inherit; font-size: 12.5px; font-weight: 600; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--edge); background: transparent; color: var(--text); cursor: pointer; }
.bd-chip:hover, .bd-chip:focus-visible { border-color: var(--accent); }

/* Rewards (account/rewards.js): Home's "Your buddies" card and the Invite dialog's progress */
.rw-prog { margin: 10px 0 12px; border: 1px solid rgba(124, 199, 255, 0.35); background: rgba(124, 199, 255, 0.08); border-radius: 12px; padding: 10px 12px; }
.rw-t { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.rw-track { height: 8px; border-radius: 4px; background: rgba(150, 175, 210, 0.25); margin: 7px 0 5px; overflow: hidden; }
.rw-track i { display: block; height: 100%; background: linear-gradient(90deg, #1F6FD1, #7B5BE0); border-radius: 4px; }
.rw-lvl { display: flex; gap: 12px; align-items: center; margin: 4px 0 12px; }
.rw-badge { width: 52px; height: 52px; flex: none; border-radius: 14px; display: grid; place-items: center; font-size: 26px; background: linear-gradient(135deg, #1F6FD1, #7B5BE0); }
.rw-g { flex: 1; min-width: 0; }
.rw-g b { font-size: 15px; }
.rw-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.rw-stats div { border: 1px solid var(--edge); border-radius: 10px; padding: 7px 10px; }
.rw-stats b { display: block; font-size: 19px; }
.rw-stats span { font-size: 11.5px; color: var(--muted); }
.rw-perks { display: grid; gap: 6px; margin-bottom: 12px; }
.rw-perk { display: flex; gap: 10px; align-items: center; font-size: 13px; padding: 7px 10px; border-radius: 9px; border: 1px solid var(--edge); color: var(--muted); }
.rw-perk em { margin-left: auto; font-style: normal; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.rw-perk.on { color: var(--text); border-color: rgba(127, 224, 181, 0.5); background: rgba(127, 224, 181, 0.08); }
.rw-perk.on em { color: var(--good); }
.rw-acts { display: flex; gap: 8px; }
.rw-founder { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; margin-left: 6px; vertical-align: 2px; background: linear-gradient(135deg, #F2C14E, #E08A3C); color: #3a2400; }
.rw-bonus { margin: 0 0 12px; padding: 8px 12px; border-radius: 10px; font-size: 13px; background: rgba(242, 193, 78, 0.16); border: 1px solid rgba(242, 193, 78, 0.5); }
.rw-ladder { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.rw-ladder li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--edge); color: var(--muted); }
.rw-ladder li.on { color: var(--text); border-color: rgba(127, 224, 181, 0.5); background: rgba(127, 224, 181, 0.08); }
.rw-ladder .rw-li { font-size: 20px; line-height: 1.2; }
.rw-ladder b { font-size: 13.5px; }
.rw-ladder em { font-style: normal; font-size: 11.5px; font-weight: 700; margin-left: 4px; }
.rw-ladder li.on em { color: var(--good); }
.rw-ladder small { display: block; font-size: 12px; margin-top: 2px; }
.rw-fine { font-size: 11.5px; color: var(--muted); margin: 10px 0 0; }

/* Locked perks (account/perks.js) */
.pk-lock { max-width: 620px; margin: 18px auto; padding: 22px 24px; border-radius: 18px; border: 1px solid rgba(124, 199, 255, 0.4);
  background: linear-gradient(160deg, rgba(31, 111, 209, 0.14), rgba(123, 91, 224, 0.12)); }
.pk-top { display: flex; gap: 16px; align-items: flex-start; }
.pk-big { width: 64px; height: 64px; flex: none; border-radius: 18px; display: grid; place-items: center; font-size: 32px; background: linear-gradient(135deg, #1F6FD1, #7B5BE0); box-shadow: 0 8px 22px rgba(31, 111, 209, 0.35); }
.pk-tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: rgba(150, 175, 210, 0.2); }
.pk-top h2 { margin: 6px 0 4px; font-size: 22px; }
.pk-top p { margin: 0; color: var(--muted); }
.pk-prog { margin: 18px 0 14px; }
.pk-row { display: flex; justify-content: space-between; font-size: 13px; }
.pk-need { margin: 4px 0 0; font-size: 13.5px; }
.pk-acts { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.pk-go { font-size: 15px; font-weight: 700; padding: 11px 20px; border-radius: 12px; border: 0; cursor: pointer; color: #fff; background: linear-gradient(135deg, #1F6FD1, #7B5BE0); box-shadow: 0 6px 16px rgba(31, 111, 209, 0.35); }
.pk-go:hover { filter: brightness(1.08); }
.pk-fine { font-size: 12px; color: var(--muted); margin: 14px 0 0; }
.pk-lock.pk-compact { max-width: none; margin: 10px 0; padding: 10px 14px; border-radius: 12px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 13.5px; }
.pk-compact .small-btn { margin-left: auto; }
.pk-ic { font-size: 16px; }

/* Admin → Reports → Growth (reports/growth.js) */
.gr-up { color: var(--good); }
.gr-two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 14px 0; }
@media (max-width: 760px) { .gr-two { grid-template-columns: 1fr; } }
.gr-bars, .gr-top { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 13px; }
.gr-bars li { display: grid; grid-template-columns: 150px 1fr 40px; gap: 8px; align-items: center; }
.gr-bars i { height: 10px; border-radius: 5px; width: var(--w); background: linear-gradient(90deg, #1F6FD1, #7B5BE0); }
.gr-bars b, .gr-top b { text-align: right; }
.gr-top li { display: flex; justify-content: space-between; border-bottom: 1px solid var(--edge); padding: 4px 0; }
.iv-chk.pk-off { opacity: .55; }
.iv-privacy { margin: 6px 0 0; }

/* Home: buddies who joined (rewards.js) */
.rw-joined { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 0 0 12px; }
.rw-av { width: 32px; height: 32px; border-radius: 16px; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; border: 2px solid var(--panel); box-shadow: 0 0 0 1px var(--edge); }
.rw-c0 { background: linear-gradient(135deg, #1F6FD1, #7B5BE0); } .rw-c1 { background: linear-gradient(135deg, #0E9F6E, #1F6FD1); }
.rw-c2 { background: linear-gradient(135deg, #E08A3C, #E0546C); } .rw-c3 { background: linear-gradient(135deg, #7B5BE0, #E0546C); }
.rw-wait { background: #94a3b8; }
.rw-joined .dim { margin-left: 4px; }

/* Level-up celebration (levelup.js) */
.lu-dlg { width: min(460px, calc(100vw - 24px)); border: 0; border-radius: 22px; padding: 28px 28px 22px; text-align: center; background: #fff; color: #142235; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35); overflow: hidden; }
.lu-dlg::backdrop { background: rgba(10, 20, 40, 0.45); }
html[data-theme="dark"] .lu-dlg { background: #18223a; color: #e8eef8; }
.lu-big { position: relative; width: 96px; height: 96px; margin: 0 auto 12px; border-radius: 28px; display: grid; place-items: center; font-size: 52px; background: linear-gradient(135deg, #1F6FD1, #7B5BE0); box-shadow: 0 12px 30px rgba(31, 111, 209, 0.45); animation: lu-pop .6s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes lu-pop { from { transform: scale(.3) rotate(-12deg); opacity: 0; } to { transform: none; opacity: 1; } }
.lu-dlg h2 { margin: 0; font-size: 26px; position: relative; }
.lu-dlg p { margin: 6px 0 14px; position: relative; }
.lu-list { text-align: left; list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; position: relative; }
.lu-list li { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 12px; background: rgba(127, 224, 181, 0.12); border: 1px solid rgba(127, 224, 181, 0.5); font-size: 14px; }
.lu-next { font-size: 13px; opacity: .8; }
.lu-acts { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; position: relative; }
.lu-dlg a.lu-go, .lu-dlg a.lu-go:visited { background: #1F6FD1; color: #fff; font-weight: 800; padding: 11px 22px; border-radius: 12px; text-decoration: none; }
.lu-x { position: absolute; top: 10px; right: 10px; }
.lu-conf-wrap { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.lu-conf { position: absolute; top: -20px; width: 8px; height: 14px; border-radius: 2px; animation: lu-fall 2.6s ease-in forwards; }
@keyframes lu-fall { to { top: 110%; transform: rotate(540deg); } }
@media (prefers-reduced-motion: reduce) { .lu-conf, .lu-big { animation: none; } .lu-conf { display: none; } }
/* Growth → cancelled accounts */
.gr-closed { margin-top: 22px; border-top: 1px solid var(--edge); padding-top: 14px; }
.gr-closed h4 { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.gr-closed .gr-bars li { grid-template-columns: 200px 1fr 40px; }
.gr-notes { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 13px; }
.gr-notes q { display: block; }
.gr-notes small { color: var(--muted); }
.iv-note .iv-add { margin-left: 6px; padding: 5px 11px; font-size: 12.5px; }
.iv-add.ghost { background: transparent; color: var(--text); border: 1px solid var(--edge); }

/* Invite prompts (account/prompts.js): a small card in the corner, never blocking */
.pr-card { position: fixed; z-index: 1200; right: 18px; bottom: 18px; width: min(380px, calc(100vw - 24px)); box-sizing: border-box; padding: 16px 18px 14px;
  border-radius: 16px; border: 1px solid var(--edge); background: var(--pop-bg, #101C30); color: var(--text); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
  transform: translateY(16px); opacity: 0; transition: transform 0.25s ease, opacity 0.25s ease; }
.pr-card.on { transform: none; opacity: 1; }
.pr-h { display: flex; align-items: center; gap: 10px; padding-right: 22px; } .pr-h b { font-size: 15px; } .pr-ic { font-size: 22px; }
.pr-card p { margin: 8px 0 12px; font-size: 13px; line-height: 1.5; color: var(--text); opacity: 0.9; }
.pr-acts { display: flex; gap: 8px; } .pr-acts button { padding: 8px 14px; font-size: 13px; }
.pr-card small { display: block; margin-top: 10px; font-size: 11.5px; color: var(--muted); }
.pr-x { position: absolute; top: 10px; right: 10px; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 7px; background: none; color: var(--muted); cursor: pointer; }
body.has-mnav .pr-card { bottom: calc(var(--mnav-h, 64px) + 12px); right: 12px; }
@media (prefers-reduced-motion: reduce) { .pr-card { transition: none; } }
