/* ============================================================
   PLAYER PAGES (css/player-pages.css)
   Shared look for the player self-service pages built on the
   layout.js player shell: player.html, wallet-user.html,
   profile-user.html, change-password-user.html,
   challenges-user.html, quests.html, raffle.html and the
   registration page. Builds on the casino.css tokens (--cz-*).
   ============================================================ */

.pp-wrap { max-width: 1100px; margin: 0 auto; padding: 18px 16px 56px; box-sizing: border-box; }
#playerRoot .pp-wrap { padding: 6px 0 40px; }
body.embed .pp-wrap { padding: 2px 12px 24px; max-width: none; }
.pp-narrow { max-width: 640px; }
[hidden] { display: none !important; }

/* ---------- headings ---------- */
.pp-head { margin: 4px 0 14px; }
.pp-kicker { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase;
             color: var(--cz-gold, #ffb01f); background: rgba(255, 176, 31, .12); border: 1px solid rgba(255, 176, 31, .35);
             padding: 4px 10px; border-radius: 999px; margin-bottom: 8px; }
.pp-title { font-size: 26px; font-weight: 900; color: var(--cz-text, #eef2ff); margin: 0 0 4px; line-height: 1.15; }
.pp-title em { font-style: normal; background: linear-gradient(180deg, #ffe9a8 0%, #ffb01f 45%, #ff7a00 100%);
               -webkit-background-clip: text; background-clip: text; color: transparent; }
.pp-sub { color: var(--cz-sub, #97a3c2); font-size: 13.5px; margin: 0; line-height: 1.5; }
.pp-h3 { font-size: 15px; font-weight: 800; color: var(--cz-text, #eef2ff); margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.pp-h3 i { color: var(--cz-gold, #ffb01f); }
.pp-h3 .pp-h3-side { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--cz-sub, #97a3c2); }
@media (max-width: 640px) { .pp-title { font-size: 22px; } }

/* ---------- cards & layout ---------- */
.pp-card { background: linear-gradient(160deg, #141b34, #0e1428); border: 1px solid #232c52; border-radius: 16px;
           padding: 18px; margin-bottom: 14px; box-sizing: border-box; min-width: 0; }
.pp-card-tight { padding: 14px; }
.pp-grid2 { display: grid; grid-template-columns: 1fr; gap: 14px; }
.pp-grid2 > .pp-card { margin-bottom: 0; }
@media (min-width: 900px) { .pp-grid2 { grid-template-columns: 1fr 1fr; } }
.pp-cols { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 1024px) { .pp-cols { grid-template-columns: minmax(0, 1fr) 320px; } }
.pp-stack > * + * { margin-top: 14px; }
.pp-row-flex { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pp-spacer { flex: 1; }
.pp-muted { color: var(--cz-sub, #97a3c2); font-size: 12.5px; }
.pp-small { font-size: 11.5px; color: var(--cz-sub, #97a3c2); line-height: 1.5; }
.pp-gold { color: #ffd257; }
.pp-green { color: #4ade80; }
.pp-red { color: #f87171; }
.pp-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .02em; }

/* ---------- stats ---------- */
.pp-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 900px) { .pp-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pp-stat { display: block; text-decoration: none; background: linear-gradient(160deg, #141b34, #0e1428);
           border: 1px solid #232c52; border-radius: 14px; padding: 13px 14px; min-width: 0; transition: border-color .15s, transform .15s; }
a.pp-stat:hover { border-color: rgba(255, 176, 31, .5); transform: translateY(-1px); }
.pp-stat-lbl { font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--cz-sub, #97a3c2);
               display: flex; align-items: center; gap: 6px; }
.pp-stat-lbl i { color: var(--cz-gold, #ffb01f); }
.pp-stat-val { font-size: 20px; font-weight: 900; color: var(--cz-text, #eef2ff); margin-top: 4px; white-space: nowrap;
               overflow: hidden; text-overflow: ellipsis; }
.pp-stat-sub { font-size: 11.5px; color: var(--cz-sub, #97a3c2); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* big balance card */
.pp-balance { position: relative; overflow: hidden; border-radius: 18px; padding: 20px; margin-bottom: 14px;
              background: radial-gradient(120% 140% at 100% 0%, rgba(255, 176, 31, .22), transparent 55%),
                          linear-gradient(150deg, #1b2546, #0e1428 70%); border: 1px solid rgba(255, 176, 31, .32);
              box-shadow: 0 14px 36px rgba(0, 0, 0, .45); }
.pp-balance-lbl { font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: #cdb27a; }
.pp-balance-amt { font-size: 34px; font-weight: 900; line-height: 1.1; margin: 6px 0 4px;
                  background: linear-gradient(180deg, #fff6d8 0%, #ffd257 45%, #ff9a1f 100%);
                  -webkit-background-clip: text; background-clip: text; color: transparent; word-break: break-all; }
.pp-balance-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: #aab3d4; }
.pp-balance-meta b { color: #eef2ff; }
.pp-balance-btns { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.pp-balance-btns .cz-btn { flex: 1 1 140px; }
@media (max-width: 640px) { .pp-balance-amt { font-size: 28px; } }

/* ---------- quick links ---------- */
.pp-quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 768px) { .pp-quick { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.pp-quick a { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 13px 6px; border-radius: 14px;
              text-decoration: none; color: #cdd6f2; font-size: 12px; font-weight: 700; text-align: center;
              background: linear-gradient(160deg, #141b34, #0e1428); border: 1px solid #232c52; transition: border-color .15s, transform .15s; }
.pp-quick a:hover { border-color: rgba(255, 176, 31, .5); transform: translateY(-1px); }
.pp-quick i { font-size: 19px; color: var(--cz-gold, #ffb01f); }

/* ---------- tabs (segmented) ---------- */
.pp-tabs { display: flex; gap: 6px; padding: 5px; border-radius: 14px; background: #0b1124; border: 1px solid #232c52;
           margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.pp-tabs::-webkit-scrollbar { display: none; }
.pp-tab { flex: 1 0 auto; border: 0; cursor: pointer; background: transparent; color: #97a3c2; font-weight: 800; font-size: 13px;
          padding: 10px 12px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
          white-space: nowrap; font-family: inherit; }
.pp-tab:hover { color: #eef2ff; }
.pp-tab.on { color: #241300; background: linear-gradient(180deg, #ffd257 0%, #ffb01f 45%, #ff7a00 100%);
             box-shadow: 0 4px 14px rgba(255, 138, 20, .3); }
.pp-tab .pp-count { background: rgba(0, 0, 0, .25); border-radius: 999px; padding: 1px 7px; font-size: 11px; }
.pp-pane { display: none; }
.pp-pane.on { display: block; }

/* ---------- chips / filters ---------- */
.pp-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.pp-chip { border: 1px solid #2a355f; background: #101736; color: #aab3d4; border-radius: 999px; padding: 6px 12px;
           font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit; }
.pp-chip.on { border-color: rgba(255, 176, 31, .7); color: #ffd257; background: rgba(255, 176, 31, .1); }

/* ---------- forms ---------- */
.pp-form .cz-field label, .pp-label { display: block; font-size: 12.5px; font-weight: 800; margin-bottom: 6px; color: #c6d0ea; }
.pp-form .cz-field { margin-bottom: 14px; }
.pp-form-grid { display: grid; grid-template-columns: 1fr; gap: 0 14px; }
@media (min-width: 640px) { .pp-form-grid { grid-template-columns: 1fr 1fr; } .pp-form-grid .pp-span2 { grid-column: 1 / -1; } }
.pp-form select.cz-input { appearance: auto; }
.pp-input-wrap { position: relative; }
.pp-input-wrap .cz-input { padding-right: 44px; }
.pp-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: transparent; border: 0; color: #8b93b5;
          cursor: pointer; width: 34px; height: 34px; border-radius: 8px; }
.pp-eye:hover { color: #eef2ff; }
.pp-prefix { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #ffd257; font-weight: 800; pointer-events: none; }
.pp-input-wrap .cz-input.pp-has-prefix { padding-left: 30px; }
.pp-hint { font-size: 11.5px; color: var(--cz-sub, #97a3c2); margin-top: 5px; line-height: 1.45; }
.pp-input-locked { opacity: .7; cursor: not-allowed; }
.pp-check { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; color: #c6d0ea; line-height: 1.5; cursor: pointer; }
.pp-check input { margin-top: 3px; accent-color: #ffb01f; width: 16px; height: 16px; flex: 0 0 auto; }
.pp-check a { color: #ffd257; text-decoration: underline; }
.pp-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.pp-actions .cz-btn { min-width: 140px; }
.pp-btn-block { width: 100%; }
.pp-file { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px dashed #2f3b68;
           background: #0d1528; cursor: pointer; color: #aab3d4; font-size: 13px; }
.pp-file:hover { border-color: rgba(255, 176, 31, .6); }
.pp-file i { color: #ffb01f; font-size: 18px; }
.pp-file input { display: none; }
.pp-file .pp-file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* amount presets */
.pp-presets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
@media (min-width: 640px) { .pp-presets { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.pp-preset { border: 1px solid #2a355f; background: #101736; color: #dbe3ff; border-radius: 10px; padding: 9px 4px;
             font-weight: 800; font-size: 13px; cursor: pointer; font-family: inherit; }
.pp-preset:hover, .pp-preset.on { border-color: rgba(255, 176, 31, .7); color: #ffd257; background: rgba(255, 176, 31, .1); }

/* payment method cards */
.pp-methods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.pp-method { position: relative; border: 1px solid #2a355f; background: #101736; border-radius: 12px; padding: 12px 8px; cursor: pointer;
             text-align: center; color: #c6d0ea; font-size: 12.5px; font-weight: 800; font-family: inherit; }
.pp-method i { display: block; font-size: 20px; margin-bottom: 6px; color: #5f8dff; }
.pp-method small { display: block; font-weight: 600; color: #8b93b5; font-size: 10.5px; margin-top: 3px; }
.pp-method.on { border-color: rgba(255, 176, 31, .8); background: rgba(255, 176, 31, .09); color: #ffd257; box-shadow: 0 0 0 3px rgba(255, 176, 31, .12); }
.pp-method.on i { color: #ffb01f; }
.pp-paybox { border-radius: 12px; padding: 12px 14px; background: rgba(47, 107, 255, .1); border: 1px solid rgba(95, 141, 255, .35);
             font-size: 13px; color: #dbe7ff; margin-bottom: 14px; line-height: 1.6; }
.pp-paybox b { color: #fff; }
.pp-copy { border: 0; background: rgba(255, 255, 255, .1); color: #fff; border-radius: 8px; padding: 2px 8px; font-size: 11px;
           cursor: pointer; margin-left: 6px; font-family: inherit; }

/* ---------- messages ---------- */
.pp-msg { display: none; border-radius: 12px; padding: 11px 13px; font-size: 13px; line-height: 1.5; margin: 0 0 14px; }
.pp-msg.show { display: block; }
.pp-msg.err { background: rgba(239, 68, 68, .12); border: 1px solid rgba(239, 68, 68, .4); color: #fca5a5; }
.pp-msg.ok { background: rgba(34, 197, 94, .12); border: 1px solid rgba(34, 197, 94, .4); color: #86efac; }
.pp-msg.info { background: rgba(47, 107, 255, .12); border: 1px solid rgba(95, 141, 255, .4); color: #c7d7ff; }
.pp-note { border-radius: 12px; padding: 14px; text-align: center; color: #8b93b5; font-size: 13px; background: #101736;
           border: 1px dashed #2a355f; }
.pp-note a { color: #ffd257; font-weight: 700; }
.pp-empty { text-align: center; color: #8b93b5; font-size: 13px; padding: 26px 10px; }
.pp-empty i { display: block; font-size: 26px; color: #2f3b68; margin-bottom: 8px; }
.pp-loading { text-align: center; color: #8b93b5; font-size: 13px; padding: 26px 0; }
.pp-loading i { color: #ffb01f; margin-right: 6px; }

/* ---------- lists (transactions, requests, bets) ---------- */
.pp-list { display: flex; flex-direction: column; }
.pp-item { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-bottom: 1px solid rgba(255, 255, 255, .06); min-width: 0; }
.pp-item:last-child { border-bottom: 0; }
.pp-item-ico { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
               background: rgba(255, 255, 255, .06); color: #aab3d4; font-size: 15px; }
.pp-item-ico.in { background: rgba(34, 197, 94, .14); color: #4ade80; }
.pp-item-ico.out { background: rgba(239, 68, 68, .14); color: #f87171; }
.pp-item-ico.gold { background: rgba(255, 176, 31, .14); color: #ffb01f; }
.pp-item-main { flex: 1; min-width: 0; }
.pp-item-title { font-size: 13.5px; font-weight: 700; color: #e6ebff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-item-sub { font-size: 11.5px; color: #8b93b5; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-item-side { text-align: right; flex: 0 0 auto; }
.pp-item-amt { font-size: 14px; font-weight: 800; white-space: nowrap; }
.pp-item-amt.in { color: #4ade80; }
.pp-item-amt.out { color: #f87171; }
.pp-more { display: block; width: 100%; margin-top: 10px; }

/* ---------- badges ---------- */
.pp-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 800; letter-spacing: .06em;
            text-transform: uppercase; border-radius: 999px; padding: 3px 8px; border: 1px solid transparent; white-space: nowrap; }
.pp-badge.pending { background: rgba(245, 158, 11, .14); color: #fbbf24; border-color: rgba(245, 158, 11, .35); }
.pp-badge.approved, .pp-badge.ok { background: rgba(34, 197, 94, .14); color: #4ade80; border-color: rgba(34, 197, 94, .35); }
.pp-badge.rejected, .pp-badge.bad { background: rgba(239, 68, 68, .14); color: #f87171; border-color: rgba(239, 68, 68, .35); }
.pp-badge.cancelled, .pp-badge.muted { background: rgba(148, 163, 184, .12); color: #94a3b8; border-color: rgba(148, 163, 184, .3); }
.pp-badge.gold { background: rgba(255, 176, 31, .14); color: #ffd257; border-color: rgba(255, 176, 31, .4); }
.pp-linkbtn { border: 0; background: transparent; color: #f87171; font-size: 11.5px; font-weight: 700; cursor: pointer; padding: 4px 0 0;
              font-family: inherit; text-decoration: underline; }

/* ---------- progress ---------- */
.pp-progress { height: 9px; background: #060a17; border-radius: 6px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .08); }
.pp-progress > span { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #b8860b, #ffd257);
                      box-shadow: 0 0 10px rgba(255, 210, 87, .35); transition: width .4s ease; }
.pp-progress.done > span { background: linear-gradient(90deg, #16a34a, #4ade80); }

/* ---------- key/value rows ---------- */
.pp-kv { display: grid; grid-template-columns: auto 1fr; gap: 9px 14px; font-size: 13px; }
.pp-kv dt { color: #8b93b5; }
.pp-kv dd { margin: 0; color: #e6ebff; font-weight: 700; text-align: right; min-width: 0; overflow-wrap: anywhere; }

/* ---------- avatar / profile head ---------- */
.pp-avatar { width: 58px; height: 58px; border-radius: 50%; flex: 0 0 58px; display: flex; align-items: center; justify-content: center;
             font-size: 22px; font-weight: 900; color: #241300; background: linear-gradient(180deg, #ffd257, #ffb01f 55%, #ff7a00);
             box-shadow: 0 6px 18px rgba(255, 138, 20, .35); text-transform: uppercase; }
.pp-menu { display: flex; flex-direction: column; }
.pp-menu a, .pp-menu button { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border: 0; border-bottom: 1px solid rgba(255, 255, 255, .06);
                              background: transparent; color: #dbe3ff; text-decoration: none; font-size: 13.5px; font-weight: 700; cursor: pointer;
                              font-family: inherit; text-align: left; width: 100%; }
.pp-menu a:last-child, .pp-menu button:last-child { border-bottom: 0; }
.pp-menu i.fa-fw { color: #ffb01f; }
.pp-menu .pp-chev { margin-left: auto; color: #4b587f; }
.pp-menu .pp-danger { color: #f87171; }
.pp-menu .pp-danger i.fa-fw { color: #f87171; }

/* ---------- toast ---------- */
.pp-toast { position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%) translateY(20px); z-index: 99990; opacity: 0;
            background: #18213f; color: #eef2ff; border: 1px solid #2f3b68; border-radius: 12px; padding: 11px 16px; font-size: 13px;
            font-weight: 700; box-shadow: 0 12px 30px rgba(0, 0, 0, .5); transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px);
            pointer-events: none; }
.pp-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.pp-toast.ok { border-color: rgba(34, 197, 94, .55); }
.pp-toast.err { border-color: rgba(239, 68, 68, .6); }
@media (min-width: 1024px) { .pp-toast { bottom: 28px; } }

/* ---------- light player theme ---------- */
#playerRoot[data-theme="light"] .pp-card, #playerRoot[data-theme="light"] .pp-stat, #playerRoot[data-theme="light"] .pp-quick a {
    background: #fff; border-color: #e5e7eb; }
#playerRoot[data-theme="light"] .pp-title, #playerRoot[data-theme="light"] .pp-h3, #playerRoot[data-theme="light"] .pp-stat-val,
#playerRoot[data-theme="light"] .pp-item-title, #playerRoot[data-theme="light"] .pp-kv dd, #playerRoot[data-theme="light"] .pp-menu a,
#playerRoot[data-theme="light"] .pp-menu button { color: #1f2433; }
#playerRoot[data-theme="light"] .pp-quick a { color: #374151; }
#playerRoot[data-theme="light"] .pp-tabs { background: #f3f4f6; border-color: #e5e7eb; }
#playerRoot[data-theme="light"] .pp-form .cz-field label, #playerRoot[data-theme="light"] .pp-label { color: #374151; }
#playerRoot[data-theme="light"] .pp-method, #playerRoot[data-theme="light"] .pp-preset, #playerRoot[data-theme="light"] .pp-chip,
#playerRoot[data-theme="light"] .pp-file, #playerRoot[data-theme="light"] .pp-note { background: #f9fafb; border-color: #d1d5db; color: #374151; }
#playerRoot[data-theme="light"] .pp-item { border-color: #eef0f4; }
