/* =========================================================
   Provident Funding — Platform skin (dashboard, admin, P-Trader, auth)
   Appearance only: colours, depth, light, motion. No layout changes.
   ========================================================= */
:root {
  --glass: linear-gradient(180deg, rgba(20, 38, 38, .72), rgba(10, 22, 22, .62));
  --glass-strong: linear-gradient(180deg, rgba(22, 42, 42, .9), rgba(12, 25, 25, .88));
  --hairline: rgba(255, 255, 255, .065);
  --hairline-2: rgba(255, 255, 255, .1);
  --glow: 0 0 0 1px rgba(19, 195, 148, .28), 0 10px 34px -10px rgba(19, 195, 148, .45);
  --lift: 0 18px 40px -18px rgba(0, 0, 0, .75), 0 2px 6px rgba(0, 0, 0, .25);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}

/* ---------- canvas ---------- */
body { background:
  radial-gradient(900px 600px at 0% -10%, rgba(2, 125, 95, .16), transparent 60%),
  radial-gradient(800px 600px at 110% 10%, rgba(19, 195, 148, .07), transparent 60%),
  radial-gradient(700px 500px at 50% 120%, rgba(2, 125, 95, .08), transparent 60%),
  var(--bg); background-attachment: fixed; font-feature-settings: 'cv11', 'ss01'; }
.value, .mono, td, .pt-metric b, .cred b, .stat .value, .summary-line, .px, .pt-in { font-variant-numeric: tabular-nums; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .08); border-radius: 99px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(19, 195, 148, .35); }
::-webkit-scrollbar-track { background: transparent; }
* { scrollbar-color: rgba(255, 255, 255, .1) transparent; scrollbar-width: thin; }
:focus-visible { outline: 2px solid rgba(46, 230, 180, .7); outline-offset: 2px; border-radius: 8px; }

/* ---------- motion: page content flows in on every route ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.995); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.view > * { animation: rise .6s var(--ease) both; }
.view > *:nth-child(2) { animation-delay: .05s; } .view > *:nth-child(3) { animation-delay: .1s; }
.view > *:nth-child(4) { animation-delay: .15s; } .view > *:nth-child(5) { animation-delay: .2s; }
.view > *:nth-child(n+6) { animation-delay: .25s; }
.grid > .stat, .grid > .acc-card, .grid > .card { animation: rise .7s var(--ease) both; }
.grid > :nth-child(2) { animation-delay: .06s; } .grid > :nth-child(3) { animation-delay: .12s; } .grid > :nth-child(4) { animation-delay: .18s; }
.grid > :nth-child(5) { animation-delay: .24s; } .grid > :nth-child(n+6) { animation-delay: .3s; }
tbody tr { animation: fadeIn .5s var(--ease) both; }

/* ---------- sidebar ---------- */
.sidebar { background: linear-gradient(180deg, rgba(8, 18, 17, .92), rgba(4, 10, 10, .96)); border-right: 1px solid var(--hairline); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.side-label { color: rgba(167, 188, 182, .55); }
.side-nav a { position: relative; transition: color .25s var(--ease), background .25s var(--ease), transform .25s var(--ease); }
.side-nav a svg { transition: transform .35s var(--spring), opacity .25s; }
.side-nav a:hover { background: rgba(255, 255, 255, .035); transform: translateX(2px); }
.side-nav a:hover svg { transform: scale(1.12); opacity: 1; }
.side-nav a.active { color: #eafff8; background: linear-gradient(90deg, rgba(19, 195, 148, .2), rgba(2, 125, 95, .08) 70%, transparent); box-shadow: inset 0 0 0 1px rgba(19, 195, 148, .18); }
.side-nav a.active::before { content: ''; position: absolute; left: -16px; top: 22%; bottom: 22%; width: 3px; border-radius: 0 4px 4px 0; background: var(--primary-2); box-shadow: 0 0 14px 2px rgba(46, 230, 180, .6); }
.side-nav a.active svg { color: var(--primary-2); opacity: 1; filter: drop-shadow(0 0 6px rgba(46, 230, 180, .5)); }
.side-cta { background: radial-gradient(120% 120% at 0% 0%, rgba(19, 195, 148, .22), transparent 60%), linear-gradient(160deg, rgba(2, 125, 95, .22), rgba(8, 18, 17, .6)); border: 1px solid rgba(19, 195, 148, .22); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05); }
.user-chip { background: var(--glass); border-color: var(--hairline); transition: border-color .3s; }
.user-chip:hover { border-color: rgba(19, 195, 148, .3); }
.avatar { box-shadow: 0 0 0 2px rgba(4, 10, 10, 1), 0 0 0 3px rgba(19, 195, 148, .45); }

/* ---------- topbar ---------- */
.topbar { background: linear-gradient(180deg, rgba(4, 10, 10, .82), rgba(4, 10, 10, .6)); border-bottom: 1px solid var(--hairline); backdrop-filter: blur(20px) saturate(140%); -webkit-backdrop-filter: blur(20px) saturate(140%); }
.topbar h2 { background: linear-gradient(180deg, #fff, #b9d6cd); -webkit-background-clip: text; background-clip: text; color: transparent; }
.topbar .crumb { letter-spacing: .14em; text-transform: uppercase; font-size: .66rem; color: var(--primary); opacity: .85; }
.icon-btn { background: rgba(255, 255, 255, .03); border-color: var(--hairline-2); transition: transform .3s var(--spring), border-color .25s, color .25s, box-shadow .25s; }
.icon-btn:hover { transform: translateY(-1px); box-shadow: var(--glow); }
.icon-btn .dot { box-shadow: 0 0 0 0 rgba(255, 77, 109, .6); animation: ping 2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(255, 77, 109, .55); } 70%, 100% { box-shadow: 0 0 0 7px rgba(255, 77, 109, 0); } }

/* ---------- surfaces ---------- */
.card, .stat, .acc-card, .table-wrap, .modal, .choice, .cred, .pay-box, .faq details, .payout-visual {
  background: var(--glass); border: 1px solid var(--hairline); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), var(--lift); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.card, .stat, .acc-card, .table-wrap { border-radius: 18px; }
.stat, .acc-card, .card { transition: transform .45s var(--ease), border-color .35s, box-shadow .45s var(--ease); }
.stat { overflow: hidden; }
.stat::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(260px 120px at 100% 0%, rgba(19, 195, 148, .1), transparent 70%); opacity: .8; transition: opacity .4s; }
.stat:hover { transform: translateY(-3px); border-color: rgba(19, 195, 148, .22); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 24px 50px -20px rgba(0, 0, 0, .8), 0 0 0 1px rgba(19, 195, 148, .08); }
.stat .label { text-transform: uppercase; letter-spacing: .09em; font-size: .7rem; font-weight: 600; color: rgba(167, 188, 182, .75); }
.stat .value { letter-spacing: -.03em; }
.stat .ico { background: linear-gradient(145deg, rgba(19, 195, 148, .25), rgba(2, 125, 95, .12)); border: 1px solid rgba(19, 195, 148, .25); box-shadow: 0 8px 22px -8px rgba(19, 195, 148, .5); color: var(--primary-2); }
.acc-card:hover { transform: translateY(-4px); border-color: rgba(19, 195, 148, .35); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 26px 60px -24px rgba(2, 125, 95, .55); }
.card-head h3, .card h3 { letter-spacing: -.01em; }
.banner { background: linear-gradient(100deg, rgba(19, 195, 148, .14), rgba(2, 125, 95, .06) 60%, rgba(255, 255, 255, .02)); border: 1px solid rgba(19, 195, 148, .22); border-radius: 16px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04); }
.banner.warn { background: linear-gradient(100deg, rgba(255, 176, 32, .12), rgba(255, 176, 32, .03) 60%, transparent); border-color: rgba(255, 176, 32, .25); }
.banner svg { color: var(--primary-2); flex-shrink: 0; }
.banner.warn svg { color: var(--warning); }
.notif { transition: background .25s; border-radius: 10px; }
.notif:hover { background: rgba(255, 255, 255, .02); }
.notif.unread .nd { box-shadow: 0 0 10px 1px rgba(46, 230, 180, .7); }
.objective { border-color: var(--hairline); }

/* ---------- buttons ---------- */
.btn { transition: transform .35s var(--spring), box-shadow .35s var(--ease), background .25s, border-color .25s, color .2s, filter .25s; will-change: transform; }
.btn:active { transform: translateY(0) scale(.97); transition-duration: .1s; }
.btn-primary { background: linear-gradient(135deg, #1fd3a2 0%, #0aa57c 45%, #027d5f 100%); background-size: 160% 160%; background-position: 0% 0%; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 10px 26px -8px rgba(19, 195, 148, .55); text-shadow: 0 1px 0 rgba(0, 0, 0, .15); }
.btn-primary:hover { background-position: 100% 100%; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 14px 34px -8px rgba(19, 195, 148, .7); }
.btn-outline { background: rgba(255, 255, 255, .02); border-color: var(--hairline-2); }
.btn-outline:hover { border-color: rgba(19, 195, 148, .5); background: rgba(19, 195, 148, .06); box-shadow: 0 0 0 4px rgba(19, 195, 148, .06); }
.btn-ghost:hover { background: rgba(255, 255, 255, .05); }
.btn-green { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 8px 20px -8px rgba(19, 195, 148, .6); }
.btn-danger { transition: all .25s var(--ease); }
.btn-danger:hover { box-shadow: 0 8px 22px -8px rgba(255, 77, 109, .6); }

/* ---------- forms ---------- */
.input, .field input, .field select, .field textarea { background: rgba(3, 8, 8, .6); border-color: var(--hairline-2); transition: border-color .25s, box-shadow .3s var(--ease), background .25s; }
.input:hover, .field input:hover, .field select:hover, .field textarea:hover { border-color: rgba(255, 255, 255, .16); }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { background: rgba(3, 10, 9, .85); border-color: rgba(19, 195, 148, .7); box-shadow: 0 0 0 4px rgba(19, 195, 148, .12), 0 0 24px -6px rgba(19, 195, 148, .5); }
.field label { letter-spacing: .01em; }
.choice { transition: border-color .25s, transform .3s var(--spring), background .25s; }
.choice:hover { transform: translateY(-1px); }
.choice.active { background: linear-gradient(135deg, rgba(19, 195, 148, .14), rgba(2, 125, 95, .06)); border-color: rgba(19, 195, 148, .6); box-shadow: 0 0 0 3px rgba(19, 195, 148, .1); }

/* ---------- tabs & sizes ---------- */
.tabs { background: rgba(3, 8, 8, .55); border-color: var(--hairline); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .4); }
.tab { transition: color .25s, background .3s var(--ease), box-shadow .3s; }
.tab.active { background: linear-gradient(135deg, #1fd3a2, #027d5f); box-shadow: 0 6px 18px -6px rgba(19, 195, 148, .6), inset 0 1px 0 rgba(255, 255, 255, .25); }
.size { transition: all .3s var(--spring); background: rgba(255, 255, 255, .02); }
.size:hover { transform: translateY(-2px); }
.size.active { box-shadow: 0 0 0 3px rgba(19, 195, 148, .12), 0 8px 22px -10px rgba(19, 195, 148, .6); }

/* ---------- tables ---------- */
.table-wrap { overflow: auto; }
th { background: rgba(8, 18, 17, .85); backdrop-filter: blur(8px); color: rgba(167, 188, 182, .7); border-bottom-color: var(--hairline); }
td { border-bottom-color: rgba(255, 255, 255, .04); transition: background .2s; }
tbody tr { transition: background .2s, box-shadow .2s; }
tbody tr:hover { background: linear-gradient(90deg, rgba(19, 195, 148, .06), rgba(19, 195, 148, .015) 60%, transparent); }
tr.click:hover td:first-child { box-shadow: inset 2px 0 0 var(--primary); }

/* ---------- badges, progress ---------- */
.badge { border: 1px solid rgba(255, 255, 255, .06); backdrop-filter: blur(6px); letter-spacing: .01em; }
.badge.green { border-color: rgba(19, 195, 148, .25); } .badge.red { border-color: rgba(255, 77, 109, .25); }
.badge.yellow { border-color: rgba(255, 176, 32, .25); } .badge.blue { border-color: rgba(63, 169, 255, .25); } .badge.gold { border-color: rgba(245, 185, 66, .3); }
.progress { background: rgba(255, 255, 255, .05); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .45); }
.progress > span { position: relative; overflow: hidden; background: linear-gradient(90deg, #027d5f, #13c394 60%, #2ee6b4); box-shadow: 0 0 14px rgba(19, 195, 148, .55); transition: width 1s var(--ease); }
.progress > span::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent); transform: translateX(-100%); animation: shimmer 2.6s var(--ease) infinite; }
.progress.red > span { background: linear-gradient(90deg, #ffb020, #ff4d6d); box-shadow: 0 0 12px rgba(255, 77, 109, .45); }
@keyframes shimmer { 60%, 100% { transform: translateX(100%); } }

/* ---------- modal & toast ---------- */
.modal-bg { background: radial-gradient(circle at 50% 30%, rgba(2, 30, 24, .55), rgba(1, 5, 5, .82)); backdrop-filter: blur(8px) saturate(120%); animation: fadeIn .3s var(--ease); }
.modal { background: var(--glass-strong); border: 1px solid var(--hairline-2); border-radius: 22px; box-shadow: 0 40px 100px -20px rgba(0, 0, 0, .9), 0 0 0 1px rgba(19, 195, 148, .08), inset 0 1px 0 rgba(255, 255, 255, .06); animation: modalIn .5s var(--spring); }
.modal-head { background: transparent; border-bottom-color: var(--hairline); }
.modal-x { transition: transform .3s var(--spring), color .2s; }
.modal-x:hover { color: var(--text); transform: rotate(90deg); }
@keyframes modalIn { from { opacity: 0; transform: translateY(18px) scale(.96); } }
.toast { background: var(--glass-strong); backdrop-filter: blur(16px); border: 1px solid var(--hairline-2); border-left: 3px solid var(--primary); border-radius: 14px; box-shadow: 0 20px 50px -12px rgba(0, 0, 0, .8), 0 0 30px -10px rgba(19, 195, 148, .4); animation: toastIn .55s var(--spring); }
.toast.err { border-left-color: var(--danger); box-shadow: 0 20px 50px -12px rgba(0, 0, 0, .8), 0 0 30px -10px rgba(255, 77, 109, .4); }
@keyframes toastIn { from { opacity: 0; transform: translateX(30px) scale(.95); } }

/* ---------- loader ---------- */
.spinner { border-color: rgba(255, 255, 255, .06); border-top-color: var(--primary-2); box-shadow: 0 0 24px -4px rgba(19, 195, 148, .5); }
.empty { color: rgba(167, 188, 182, .6); }

/* ---------- chat thread ---------- */
.msg { border-radius: 18px; background: var(--glass); border-color: var(--hairline); animation: rise .45s var(--ease) both; }
.msg.me { background: linear-gradient(135deg, rgba(19, 195, 148, .16), rgba(2, 125, 95, .08)); border-color: rgba(19, 195, 148, .25); }

/* ---------- auth pages ---------- */
.auth-side { background: radial-gradient(circle at 15% 15%, rgba(19, 195, 148, .22), transparent 50%), radial-gradient(circle at 85% 90%, rgba(2, 125, 95, .32), transparent 55%), linear-gradient(180deg, #061210, #030807); border-right-color: var(--hairline); }
.auth-main { animation: fadeIn .6s var(--ease); }
.auth-box { animation: rise .8s var(--ease) both; }
.err-box { border-radius: 12px; animation: rise .35s var(--ease); }

/* ---------- P-Trader ---------- */
.pt { background: radial-gradient(900px 500px at 50% -20%, rgba(2, 125, 95, .12), transparent 60%), #030807; }
.pt-top, .pt-watch, .pt-toolbar, .pt-bottom, .pt-order { background: linear-gradient(180deg, rgba(10, 22, 21, .9), rgba(6, 14, 13, .92)); backdrop-filter: blur(14px); }
.pt-sym { transition: background .2s, border-color .25s; }
.pt-sym.active { background: linear-gradient(90deg, rgba(19, 195, 148, .12), transparent); }
.pt-sym .px { transition: color .6s var(--ease); }
.pt-metric { background: rgba(255, 255, 255, .025); border-color: var(--hairline); transition: border-color .3s; }
.pt-metric:hover { border-color: rgba(19, 195, 148, .25); }
.pt-ba button { transition: transform .3s var(--spring), box-shadow .3s, background .25s; }
.pt-ba button:hover { transform: translateY(-2px); }
.pt-ba button:active { transform: scale(.97); }
.pt-tf button, .pt-seg button, .pt-tabs button, .pt-presets button { transition: color .2s, background .25s var(--ease), border-color .2s; }
.pt-tf button.on { box-shadow: inset 0 0 0 1px rgba(19, 195, 148, .3); }
.pt-seg button.on { background: linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .05)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); }
.pt-in { background: rgba(3, 8, 8, .7); transition: border-color .25s, box-shadow .3s; }
.pt-in:focus { box-shadow: 0 0 0 3px rgba(19, 195, 148, .12); }
.pt-exec { transition: transform .35s var(--spring), filter .25s, box-shadow .35s; }
.pt-exec.buy { background: linear-gradient(135deg, #1ddc95, #0fa36c); }
.pt-exec.sell { background: linear-gradient(135deg, #ff6b84, #e23655); }
.pt-exec:active { transform: scale(.98); }
.pt-info { background: rgba(255, 255, 255, .02); border-color: var(--hairline); }
.pt tbody tr, .pt .grid > * { animation: none; } /* live tables refresh every few seconds: no re-entrance flicker */
.pt-live:not(.off) { box-shadow: 0 0 18px -4px rgba(22, 199, 132, .6); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
