/* ==========================================================================
   ExtractHelp — Accounts: sign in, sign up, password reset, dashboard
   ========================================================================== */

/* Auth pages --------------------------------------------------------------- */
.page-auth main { background: var(--bg-soft); }
.auth { padding-block: clamp(28px, 5vw, 64px); }
.auth__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; align-items: stretch; width: min(1080px, calc(100% - 2 * var(--gutter))); max-width: none; padding: 0; border-radius: var(--r-xl); box-shadow: var(--shadow-panel); overflow: hidden; }

.auth-card { display: grid; align-content: center; gap: 4px; padding: clamp(28px, 4.5vw, 56px); background: var(--surface); }
.auth-card__brand { display: inline-flex; width: 44px; height: 44px; margin-block-end: 18px; }
.auth-card__brand img { width: 44px; height: 44px; }
.auth-card h1 { margin: 0 0 8px; font-size: clamp(1.7rem, 1.3rem + 1.2vw, 2.15rem); }
.auth-card__lead { margin: 0 0 22px; color: var(--muted); }
.auth-card__icon { display: grid; place-items: center; width: 52px; height: 52px; margin-block-end: 16px; border-radius: 16px; background: var(--accent-soft); color: var(--accent-text); }
.auth-card__icon .icon { width: 24px; height: 24px; }
.auth-card__icon--ok { background: var(--success-soft); color: var(--success); }
.auth-card__switch { margin: 22px 0 0; color: var(--muted); font-size: .95rem; }
.auth-card__switch a { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--accent-text); }
.auth-card__switch .icon { width: 16px; height: 16px; }

.auth-form { display: grid; gap: 16px; }
.auth-form .btn--lg { margin-block-start: 6px; }
.field__row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.field__link { font-size: .86rem; font-weight: 650; color: var(--accent-text); }
.field__opt { color: var(--muted); font-weight: 500; }
.field__hint { margin: 0; color: var(--muted); font-size: .84rem; }

.pass-wrap { position: relative; }
.pass-wrap .input { padding-inline-end: 48px; }
.pass-toggle { position: absolute; top: 50%; inset-inline-end: 6px; display: grid; place-items: center; width: 38px; height: 38px; transform: translateY(-50%); border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; }
.pass-toggle:hover { background: var(--navy-soft); color: var(--heading); }
.pass-toggle .icon { width: 18px; height: 18px; }

.pass-meter { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; margin-block-start: 2px; }
.pass-meter span { height: 5px; border-radius: 999px; background: var(--line); transition: background-color .25s; }
.pass-meter[data-score="1"] span:nth-child(-n+1) { background: var(--danger); }
.pass-meter[data-score="2"] span:nth-child(-n+2) { background: #F59E0B; }
.pass-meter[data-score="3"] span:nth-child(-n+3) { background: #84CC16; }
.pass-meter[data-score="4"] span { background: var(--success); }

.auth-alert { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 16px; padding: 12px 14px; border-radius: 12px; background: var(--danger-soft); color: var(--danger); font-size: .93rem; font-weight: 600; }
.auth-alert .icon { flex: none; width: 18px; height: 18px; margin-block-start: 1px; }
.auth-alert--ok { background: var(--success-soft); color: var(--success); }

.btn[data-loading] { pointer-events: none; opacity: .85; }
.btn[data-loading] .icon { animation: acct-spin .8s linear infinite; }
@keyframes acct-spin { to { transform: rotate(360deg); } }

/* Navy side panel */
.auth-aside { position: relative; isolation: isolate; overflow: hidden; display: grid; align-content: center; gap: 18px; padding: clamp(28px, 4.5vw, 56px); background: var(--grad-navy); color: #E6EBF8; }
.auth-aside::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .35; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .14) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .14) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 70% 20%, #000 10%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 70% 20%, #000 10%, transparent 75%);
}
.auth-aside__glow { position: absolute; z-index: -1; width: 420px; height: 420px; inset-inline-end: -160px; top: -160px; border-radius: 50%; background: radial-gradient(circle, rgba(248, 98, 25, .45), transparent 64%); pointer-events: none; }
.auth-aside h2 { margin: 0; color: #fff; font-size: clamp(1.35rem, 1.1rem + .9vw, 1.75rem); max-width: 15em; }
.eyebrow--on-dark { color: #FFB48A; justify-self: start; }
.auth-points { display: grid; gap: 14px; list-style: none; margin: 6px 0 0; padding: 0; }
.auth-point { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; font-size: .92rem; color: #C3CCE6; }
.auth-point b { display: block; color: #fff; font-size: .98rem; margin-block-end: 2px; }
.auth-point__icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); color: #FFA066; }
.auth-point__icon .icon { width: 19px; height: 19px; }
.auth-aside__card { display: grid; gap: 10px; margin-block-start: 8px; padding: 16px; border-radius: 16px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); }
.auth-mini { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: center; }
.auth-mini__dot { width: 26px; height: 26px; border-radius: 50%; background: var(--grad-accent); opacity: .9; }
.auth-mini__bar { height: 10px; border-radius: 999px; background: rgba(255, 255, 255, .16); transform-origin: left center; }
.auth-mini__bar:dir(rtl) { transform-origin: right center; }
.auth-mini__bar--1 { width: 86%; }
.auth-mini__bar--2 { width: 64%; }
.auth-mini__bar--3 { width: 74%; }

@media (prefers-reduced-motion: no-preference) {
  :root:not(.motion-paused) .auth-card { animation: acct-rise .55s var(--ease) backwards; }
  :root:not(.motion-paused) .auth-point { animation: acct-rise .55s var(--ease) backwards; }
  :root:not(.motion-paused) .auth-point:nth-child(1) { animation-delay: .1s; }
  :root:not(.motion-paused) .auth-point:nth-child(2) { animation-delay: .18s; }
  :root:not(.motion-paused) .auth-point:nth-child(3) { animation-delay: .26s; }
  :root:not(.motion-paused) .auth-point:nth-child(4) { animation-delay: .34s; }
  :root:not(.motion-paused) .auth-aside__glow { animation: acct-glow 14s ease-in-out infinite alternate; }
  :root:not(.motion-paused) .auth-mini__bar { animation: acct-bar 4.5s var(--ease) infinite; }
  :root:not(.motion-paused) .auth-mini:nth-child(2) .auth-mini__bar { animation-delay: .35s; }
  :root:not(.motion-paused) .auth-mini:nth-child(3) .auth-mini__bar { animation-delay: .7s; }
  :root:not(.motion-paused) .acct-tile, :root:not(.motion-paused) .acct-card { animation: acct-rise .5s var(--ease) backwards; }
  :root:not(.motion-paused) .acct-tile:nth-child(2) { animation-delay: .06s; }
  :root:not(.motion-paused) .acct-tile:nth-child(3) { animation-delay: .12s; }
}
@keyframes acct-rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes acct-glow { to { transform: translate(-60px, 70px) scale(1.12); } }
@keyframes acct-bar { 0% { transform: scaleX(.15); opacity: .4; } 35%, 80% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: .4; } }

/* Dashboard ----------------------------------------------------------------- */
.acct-head { padding-block: clamp(22px, 3vw, 36px); background: var(--bg-soft); border-block-end: 1px solid var(--line); }
.acct-head__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.acct-head__id { display: flex; align-items: center; gap: 16px; }
.acct-head h1 { margin: 0; font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.1rem); }
.acct-head__meta { margin: 2px 0 0; color: var(--muted); }
.acct-avatar { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: var(--grad-accent); color: #fff; font-size: 1.5rem; font-weight: 800; box-shadow: 0 12px 24px -12px rgba(248, 98, 25, .9); }

.acct-quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-block-end: 24px; }
.acct-tile { display: grid; gap: 4px; padding: 18px 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--muted); font-size: .9rem; transition: transform .2s var(--ease), box-shadow .2s, border-color .2s; }
.acct-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.acct-tile b { color: var(--heading); font-size: 1.02rem; }
.acct-tile__icon { display: grid; place-items: center; width: 40px; height: 40px; margin-block-end: 8px; border-radius: 12px; background: var(--grad-navy); color: #fff; }
.acct-tile__icon .icon { width: 20px; height: 20px; }

.acct-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.acct-col { display: grid; gap: 20px; }
.acct-card { display: grid; gap: 14px; padding: 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.acct-card h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 1.1rem; }
.acct-card h2 .icon { width: 20px; height: 20px; color: var(--accent); }
.acct-card .btn { justify-self: start; }
.acct-list { display: grid; list-style: none; margin: 0; padding: 0; }
.acct-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px 0; border-block-end: 1px dashed var(--line); }
.acct-list li:last-child { border-block-end: 0; }
.acct-list li > span:first-child { display: grid; flex: 1 1 180px; min-width: 0; }
.acct-list b { color: var(--heading); }
.acct-list small { color: var(--muted); }
.acct-list__link { display: inline-flex; align-items: center; gap: 4px; font-size: .88rem; font-weight: 700; color: var(--accent-text); }
.acct-list__link .icon { width: 14px; height: 14px; }
.acct-num { color: var(--heading); font-weight: 700; font-variant-numeric: tabular-nums; }
.acct-status { padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 750; background: var(--navy-soft); color: var(--heading); }
.acct-status--approved { background: var(--success-soft); color: var(--success); }
.acct-status--pending { background: var(--accent-soft); color: var(--accent-text); }
.acct-status--rejected { background: var(--danger-soft); color: var(--danger); }
.acct-empty { margin: 0; color: var(--muted); }

@media (max-width: 900px) {
  .auth__grid { grid-template-columns: minmax(0, 1fr); width: min(560px, calc(100% - 2 * var(--gutter))); }
  .auth-aside { display: none; }
  .acct-grid { grid-template-columns: minmax(0, 1fr); }
  .acct-quick { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .auth { padding-block: 16px 40px; }
  .auth__grid { border-radius: var(--r-lg); }
  .form-row { grid-template-columns: minmax(0, 1fr); }
}

/* Delete account */
.acct-card--danger { border-color: color-mix(in srgb, var(--danger) 30%, var(--line)); }
.acct-card--danger h2 .icon { color: var(--danger); }
.acct-card--danger p { margin: 0; color: var(--muted); font-size: .93rem; }
.btn--danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn--danger:hover { background: color-mix(in srgb, var(--danger) 85%, #000); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn--danger { color: #2b0b08; } }
:root[data-theme="dark"] .btn--danger { color: #2b0b08; }

.acct-inline { display: inline; margin: 0; }
.acct-list__link--danger { border: 0; background: none; padding: 0; font: inherit; font-size: .88rem; font-weight: 700; color: var(--danger); cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.acct-list__link--danger .icon { width: 14px; height: 14px; }
.acct-note { color: var(--danger) !important; }

/* Sign-in options (8 Nov 2026): providers, divider, email code ----------------------- */
.auth-providers { display: grid; gap: 10px; margin-block-end: 4px; }
.auth-provider { position: relative; flex-wrap: wrap; justify-content: center; gap: 6px 12px; min-height: 52px; white-space: normal; text-align: center; border: 1px solid var(--line-strong); background: var(--surface); color: var(--heading); font-weight: 700; }
.auth-provider:hover { border-color: var(--heading); background: var(--bg-soft); }
.auth-provider__logo { width: 22px; height: 22px; flex: none; }
.auth-provider__logo--in { display: grid; place-items: center; border-radius: 5px; background: #0A66C2; color: #fff; }
.auth-provider__logo--in .icon { width: 15px; height: 15px; }
.auth-provider__off { padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-size: .7rem; font-weight: 750; }
.auth-divider { display: flex; align-items: center; gap: 14px; margin: 18px 0 14px; color: var(--muted); font-size: .86rem; font-weight: 600; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-steps { display: flex; align-items: flex-start; gap: 8px; margin: 2px 0 0; color: var(--muted); font-size: .86rem; line-height: 1.5; }
.auth-steps .icon { flex: none; width: 16px; height: 16px; margin-block-start: 2px; color: var(--success); }
.auth-code { margin-block-start: 18px; padding: 14px 16px; border-radius: 14px; border: 1px dashed var(--line-strong); }
.auth-code summary { display: flex; align-items: center; gap: 8px; cursor: pointer; color: var(--heading); font-weight: 700; list-style: none; }
.auth-code summary::-webkit-details-marker { display: none; }
.auth-code summary .icon { width: 18px; height: 18px; color: var(--accent); }
.auth-code[open] summary { margin-block-end: 14px; }
.input--code { font-family: var(--font-mono); font-size: 1.6rem; letter-spacing: .5em; text-align: center; padding-inline-start: .5em; min-height: 62px; }
.auth-code-help { display: grid; gap: 10px; margin-block-start: 18px; color: var(--muted); font-size: .92rem; }
.auth-code-help p { margin: 0; }
.auth-code-help a, .auth-code-help .link-button { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-text); font-weight: 700; }
.auth-code-help .icon { width: 16px; height: 16px; }
.auth-inline { margin: 0; }

/* Extracts wallet (/account/extracts/) */
.xw-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 20px; margin-block-end: 20px; }
.xw-balance, .xw-id { display: grid; gap: 8px; align-content: start; padding: 22px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); }
.xw-balance { background: var(--grad-navy); border-color: transparent; color: #fff; }
.xw-balance .xw-label, .xw-balance .xw-worth { color: rgba(255, 255, 255, .8); }
.xw-balance .btn { justify-self: start; margin-block-start: 6px; }
.xw-label { font-size: .8rem; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.xw-amount { font-size: clamp(2rem, 4vw, 2.6rem); line-height: 1.1; font-variant-numeric: tabular-nums; }
.xw-amount small { font-size: 1rem; font-weight: 600; }
.xw-worth { font-size: .92rem; }
.xw-copy { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-block-end: 6px; }
.xw-copy code { min-width: 0; overflow-wrap: anywhere; padding: 6px 10px; border-radius: 8px; background: var(--navy-soft); color: var(--heading); font-size: .92rem; }
.xw-small { margin: 0; color: var(--muted); font-size: .9rem; }
.xw-small:empty { display: none; }
.xw-price { margin: 0; font-size: 1.1rem; font-weight: 750; color: var(--heading); font-variant-numeric: tabular-nums; }
.xw-delta { color: var(--success); }
.xw-delta.is-minus { color: var(--heading); }
.xw-rates { width: 100%; border-collapse: collapse; font-size: .93rem; }
.xw-rates th, .xw-rates td { padding: 9px 0; border-block-end: 1px dashed var(--line); text-align: start; font-weight: 500; }
.xw-rates td { text-align: end; font-weight: 750; color: var(--heading); font-variant-numeric: tabular-nums; white-space: nowrap; }
.xw-perks { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.xw-perks b { display: inline-block; min-width: 3.2em; color: var(--accent-text); }
.acct-tile--wallet .acct-tile__icon { background: var(--grad-accent); }
@media (max-width: 900px) { .xw-top { grid-template-columns: minmax(0, 1fr); } }
.acct-head__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.acct-head--slim { padding-block: clamp(16px, 2vw, 24px); }
.acct-tile--inbox .acct-tile__icon { background: var(--grad-accent); }

/* Share Extracts (pages/account/extracts.php) */
.xs-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.xs-row .field { flex: 1 1 200px; margin: 0; }
.xs-send { display: grid; gap: 14px; }
.xs-send[hidden], .xs-phone[hidden], .xs-row[hidden] { display: none; }
.xs-phone { display: grid; gap: 12px; }
.xs-wallet { text-transform: uppercase; font-family: var(--font-mono, ui-monospace, monospace); letter-spacing: .04em; }
.xs-code { letter-spacing: .3em; font-variant-numeric: tabular-nums; }
.xs-who { margin: 6px 0 0; min-height: 1.4em; font-size: .92rem; font-weight: 650; color: var(--muted); }
.xs-who.is-ok { color: var(--success); }
.xs-who.is-bad { color: #b42318; }
.xs-msg { margin: 0; padding: 10px 14px; border-radius: 10px; background: #fef3f2; color: #b42318; font-weight: 650; font-size: .94rem; }
.xs-msg.is-ok { background: #ecfdf3; color: #067647; }
.xs-msg[hidden] { display: none; }
.btn.is-busy { opacity: .7; pointer-events: none; }
.acct-verified { display: inline-flex; align-items: center; gap: 4px; margin-inline-start: 8px; padding: 2px 8px; border-radius: 999px; background: #ecfdf3; color: #067647; font-size: .75rem; font-weight: 750; vertical-align: middle; }
.acct-verified .icon { width: 12px; height: 12px; }
.acct-verify-link { margin-inline-start: 8px; font-size: .8rem; font-weight: 650; }
[data-theme="dark"] .xs-msg { background: rgba(240, 68, 56, .16); color: #fda29b; }
[data-theme="dark"] .xs-msg.is-ok, [data-theme="dark"] .acct-verified { background: rgba(24, 121, 78, .22); color: #75e0a7; }
[data-theme="dark"] .xs-who.is-bad { color: #fda29b; }

/* Step / tab switcher (assets/js/steps.js) ---------------------------------
   Breaks a long action page into clear steps. Without JS every [data-step]
   panel shows; the .is-wiz class is added only once the script runs, so the
   hiding rules below never apply to a no-JS page. */
.wiz__nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 5px; list-style: none; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-soft); }
.wiz__navitem { display: flex; flex: 1 1 auto; margin: 0; }
.wiz__tab { display: inline-flex; flex: 1 1 auto; align-items: center; justify-content: center; gap: 9px; padding: 10px 16px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--muted); font: inherit; font-size: .92rem; font-weight: 650; line-height: 1.2; white-space: nowrap; cursor: pointer; transition: background-color .18s, color .18s, box-shadow .18s; }
.wiz__tab:hover { color: var(--heading); }
.wiz__tab.is-active { background: var(--surface); color: var(--heading); box-shadow: var(--shadow-sm, 0 1px 2px rgba(5, 28, 94, .12)); }
.wiz__tab:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.wiz__num { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--navy-soft); color: var(--heading); font-size: .8rem; font-weight: 750; }
.wiz__tab.is-active .wiz__num { background: var(--grad-accent); color: #fff; }
.is-wiz .wiz__panel:not(.is-active) { display: none; }
.wiz__panel:focus { outline: none; }
.wiz__panel:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 8px; }
.wiz__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-block-start: 22px; }
.wiz__foot .wiz__next { margin-inline-start: auto; }
@media (max-width: 560px) {
  .wiz__navitem { flex-basis: 100%; }
  .wiz__tab { justify-content: flex-start; }
}
