/* ══════════════════════════════════════════════════════════════════════════
   Poker Super League — Account page.

   Loads on top of styles.css + app.css. A sticky tab rail (Overview / Settings)
   beside a content column. Reuses the shared .panel, .stat and segmented
   patterns; adds the tab rail and settings forms.
   (Tournament history and hand review moved to analysis.css.)
   ══════════════════════════════════════════════════════════════════════════ */

.account-header { padding-bottom: 6px; }
.account-main { padding: 26px 0 clamp(56px, 9vw, 88px); }

.acct-layout { display: grid; grid-template-columns: 224px 1fr; gap: 28px; align-items: start; }

/* ─────────────────────────  Tab rail  ───────────────────────── */
.acct-rail { position: sticky; top: 18px; }
.acct-tabs { display: flex; flex-direction: column; gap: 4px; }
.acct-tab {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer;
  padding: 12px 14px; border-radius: 11px; border: 0; background: transparent;
  font-family: var(--font-heading); font-weight: 600; font-size: 15px;
  color: color-mix(in srgb, var(--color-text) 70%, transparent); transition: background .13s, color .13s;
}
.acct-tab svg { color: color-mix(in srgb, var(--color-text) 55%, transparent); flex: none; }
.acct-tab:hover { background: color-mix(in srgb, var(--color-text) 6%, transparent); color: #fff; }
.acct-tab[aria-selected="true"] {
  background: var(--color-surface); color: #fff; box-shadow: inset 3px 0 0 var(--psl-red);
}
.acct-tab[aria-selected="true"] svg { color: var(--psl-blue); }

/* ─────────────────────────  Panels  ───────────────────────── */
.acct-content { min-width: 0; }
.acct-panel:not([hidden]) { display: flex; flex-direction: column; gap: 18px; }
.acct-section-h { font-family: var(--font-heading); font-weight: 800; font-size: clamp(19px, 3vw, 23px); color: #fff; margin: 6px 0 0; letter-spacing: -.01em; }
.acct-section-sub { font-size: 14.5px; margin: 6px 0 0; color: color-mix(in srgb, var(--color-text) 60%, transparent); }

/* ─────────────────────────  Overview — identity  ───────────────────────── */
.acct-identity { display: flex; align-items: center; gap: 20px; }
.acct-id-avatar {
  width: 76px; height: 76px; border-radius: 50%; flex: none; display: grid; place-items: center;
  color: #fff; font-size: 38px; line-height: 1; text-shadow: 0 1px 2px rgba(0, 0, 0, .4);
  box-shadow: 0 0 0 1px var(--color-divider);
}
.acct-id-main { min-width: 0; }
.acct-id-name { font-family: var(--font-heading); font-weight: 800; font-size: clamp(22px, 4vw, 28px); color: #fff; letter-spacing: -.02em; margin: 0; }
.acct-id-email { font-size: 14px; color: color-mix(in srgb, var(--color-text) 60%, transparent); margin-top: 2px; }
.acct-id-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.acct-chip {
  font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--color-text) 8%, transparent);
  color: color-mix(in srgb, var(--color-text) 75%, transparent);
}
.acct-chip.blue { background: color-mix(in srgb, var(--psl-blue) 16%, transparent); color: #8ed6f2; }

/* Stat grid */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat-card { padding: 18px 18px 20px; border-radius: 14px; background: var(--color-surface); box-shadow: var(--shadow-sm); }
.stat-label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: color-mix(in srgb, var(--color-text) 58%, transparent); }
.stat-value { font-family: var(--font-heading); font-weight: 800; font-size: clamp(24px, 4vw, 30px); color: #fff; letter-spacing: -.02em; margin: 8px 0 4px; font-variant-numeric: tabular-nums; }
.stat-value.up { color: #7ce6b4; }
.stat-sub { font-size: 12px; color: color-mix(in srgb, var(--color-text) 55%, transparent); min-height: 1em; }

@media (max-width: 700px) { .stat-grid { grid-template-columns: 1fr 1fr; } }

/* ─────────────────────────  Settings  ───────────────────────── */
.acct-card { }
.acct-card-title { font-family: var(--font-heading); font-weight: 800; font-size: 19px; color: #fff; margin: 0; }
.acct-card-sub { font-size: 14px; margin: 6px 0 18px; color: color-mix(in srgb, var(--color-text) 60%, transparent); }
.acct-credits { display: flex; align-items: baseline; gap: 10px; }
.acct-credits-n { font-family: var(--font-heading); font-weight: 800; font-size: 34px; color: #fff; line-height: 1; }
.acct-credits-word { font-size: 14px; color: color-mix(in srgb, var(--color-text) 70%, transparent); }
.acct-field { margin-bottom: 16px; }
.acct-lbl { display: block; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: color-mix(in srgb, var(--color-text) 70%, transparent); margin-bottom: 7px; }
.acct-input { min-height: 44px; font-size: 15px; }
.acct-input:focus-visible { border-color: var(--psl-blue); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--psl-blue) 22%, transparent); }
.acct-hint { font-size: 12.5px; margin: 6px 0 0; color: color-mix(in srgb, var(--color-text) 52%, transparent); }
.acct-card-foot { margin-top: 4px; display: flex; justify-content: flex-end; }
.acct-card-note { font-size: 13px; margin: 12px 0 0; color: color-mix(in srgb, var(--color-text) 60%, transparent); }
#acct-country { flex: 1 1 auto; min-width: 0; }
#acct-country + .app-btn { flex: none; white-space: nowrap; }


/* ─────────────────────────  Responsive rail  ───────────────────────── */
@media (max-width: 820px) {
  .acct-layout { grid-template-columns: 1fr; gap: 18px; }
  .acct-rail { position: static; }
  /* Segmented control: every tab shares the row, so none hides off-screen. */
  .acct-tabs {
    flex-direction: row; overflow-x: auto; gap: 4px; padding: 4px; -webkit-overflow-scrolling: touch;
    border-radius: 14px; border: 1px solid color-mix(in srgb, var(--color-text) 12%, transparent);
    background: color-mix(in srgb, var(--color-text) 4%, transparent);
  }
  .acct-tab { flex: 1 0 auto; width: auto; justify-content: center; padding: 10px 14px; }
  .acct-tab[aria-selected="true"] { box-shadow: inset 0 -3px 0 var(--psl-red); }
}

/* Coaching level (Settings) */
.seg-btn-sub { display: block; margin-top: 4px; font-size: 13px; color: color-mix(in srgb, var(--color-text) 70%, transparent); }

/* Display name card: the on/off switch sits between the field and Save. */
.acct-dn-switch { margin: 4px 0 16px; }
