/* =====================================================
   PrimeCopy — Shared styles for app pages
   (deposit, withdraw, referral, settings)
   Extends dashboard.css
   ===================================================== */

/* ---------- PAGE HEADER ---------- */
.page-head{
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--line);
}
.page-head .crumb{
  font-size: 12px; color: var(--text-mute);
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px;
}
.page-head .crumb a{ color: var(--text-dim); }
.page-head .crumb a:hover{ color: var(--white); }
.page-head h1{
  font-family: "Inter Tight", var(--font-sans);
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -.025em;
  color: var(--white); font-weight: 700;
  margin: 0;
}
.page-head .lead{
  color: var(--text-dim); font-size: 14px; margin: 6px 0 0;
  max-width: 540px;
}

/* ---------- TWO-COLUMN LAYOUT ---------- */
.page-body{
  padding: 24px 20px 80px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  max-width: 1100px;
  min-width: 0;
  width: 100%;
}
@media (min-width: 900px){
  .page-body{
    grid-template-columns: minmax(0,1.4fr) minmax(0,1fr);
    gap: 24px;
    padding: 28px 32px 80px;
  }
}

/* ---------- CARD ---------- */
.card{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
}
.card h2{
  font-size: 16px; color: var(--white); font-weight: 600;
  margin: 0 0 4px;
}
.card .sub{ font-size: 13px; color: var(--text-dim); margin: 0 0 18px; }

/* ---------- FORM ---------- */
.field{ margin-bottom: 16px; }
.field-l{
  display:flex; justify-content:space-between; align-items:center;
  font-size: 12px; color: var(--text-mute);
  text-transform: uppercase; letter-spacing: .05em;
  margin-bottom: 8px;
}
.field-l .hint{ text-transform: none; color: var(--text-dim); font-size: 12px; letter-spacing: 0; }
.input{
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--white);
  font: 500 16px/1.4 var(--font-sans);
  padding: 14px 16px;
  border-radius: 12px;
  outline: none;
  transition: border-color .15s ease, background .15s ease;
}
.input:focus{ border-color: var(--green); background: #050505; }
.input::placeholder{ color: var(--text-mute); }
.input.mono{ font-family: var(--font-mono); font-feature-settings: "tnum"; }

.input-wrap{ position: relative; }
.input-wrap .suffix{
  position: absolute; top: 50%; right: 14px; transform: translateY(-50%);
  display:flex; align-items:center; gap: 8px;
}
.input-wrap .max-btn{
  font-size: 11px; padding: 4px 10px;
  background: var(--surface-2); color: var(--green);
  border:1px solid var(--line); border-radius: 6px;
  font-weight: 600;
}
.input-wrap .max-btn:hover{ background: var(--green); color: #001a0d; border-color: var(--green); }
.input-wrap .currency{
  font-family: var(--font-mono); font-size: 13px; color: var(--text-dim);
  padding-left: 8px; border-left: 1px solid var(--line);
}

.row-fields{ display: grid; gap: 12px; }
@media (min-width: 500px){ .row-fields.two{ grid-template-columns: 1fr 1fr; } }

/* ---------- PILL CHOOSER (network / currency) ---------- */
.chips{
  display:flex; flex-wrap: wrap; gap: 8px;
}
.chip{
  padding: 9px 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--text);
  font-size: 13px; font-weight: 500;
  display:inline-flex; align-items:center; gap: 8px;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.chip:hover{ border-color: var(--surface-3); }
.chip.active{
  background: rgba(0,214,114,.08);
  border-color: var(--green);
  color: var(--white);
}
.chip .ic{ width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0; }

/* Compact deposit asset picker */
.card-h{ font-size:14px !important; margin-bottom:2px !important; }
.sub-sm{ font-size:11px !important; margin-bottom:10px !important; }
.asset-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:8px;
}
.asset-chip{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:5px;
  padding:10px 6px;
  background:var(--bg);
  border:1px solid var(--line);
  border-radius:12px;
  color:var(--text-dim);
  font-size:10px;
  font-weight:600;
  transition:border-color .15s ease, background .15s ease, color .15s ease;
}
.asset-chip:hover{ border-color:var(--surface-3); color:var(--white); }
.asset-chip.active{
  background:rgba(0,214,114,.07);
  border-color:var(--green);
  color:var(--white);
}
.asset-ic{ width:22px; height:22px; display:block; }
.net-grid{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}
.net-grid .chip{
  padding:6px 11px;
  font-size:11px;
}
.card .input{ font-size:16px; padding:12px 14px; }
.card .btn-full{ font-size:13px; padding:13px 16px; }
.card h2:not(.card-h){ font-size:14px; }
.card .sub:not(.sub-sm){ font-size:12px; }

/* History page */
.page-head-compact{ padding:16px 20px 12px; }
.page-head-compact h1{ font-size:22px; }
.page-head-compact .lead{ font-size:12px; margin-top:4px; }
.hist-filters{
  display:flex;
  gap:6px;
  padding:0 16px 12px;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}
.hist-filters .chip{
  padding:6px 12px;
  font-size:11px;
  flex-shrink:0;
}
.hist-list{ padding:0 16px 90px; }
.hist-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:11px 0;
  border-bottom:1px solid var(--line-soft);
}
.hist-left{ min-width:0; }
.hist-desc{
  display:block;
  font-size:12px;
  font-weight:700;
  color:var(--white);
  font-family:var(--font-mono);
  letter-spacing:.04em;
}
.hist-desc.tp{ color:var(--green); }
.hist-desc.sl{ color:var(--red); }
.hist-meta{
  display:block;
  font-size:10px;
  color:var(--text-mute);
  margin-top:2px;
}
.hist-right{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:4px;
  flex-shrink:0;
}
.hist-amt{
  font-family:var(--font-mono);
  font-size:12px;
  font-weight:700;
  font-feature-settings:"tnum";
}
.hist-empty{
  text-align:center;
  padding:48px 20px;
  color:var(--text-mute);
  font-size:12px;
}
.hist-right .status{ font-size:10px; padding:2px 7px; }

/* ---------- BUTTONS ---------- */
.btn-full{
  display:flex; align-items: center; justify-content:center; gap: 8px;
  width: 100%;
  background: var(--green);
  color: #001a0d;
  font-weight: 700; font-size: 15px;
  padding: 16px 20px;
  border-radius: 12px;
  border: none;
  transition: background .15s ease, transform .12s ease;
}
.btn-full:hover{ background: var(--green-bright); }
.btn-full:active{ transform: translateY(1px); }
.btn-full.ghost{
  background: var(--surface-2);
  color: var(--white);
  border: 1px solid var(--line);
}
.btn-full.ghost:hover{ background: var(--surface-3); }

.btn-small{
  display:inline-flex; align-items:center; gap: 6px;
  padding: 7px 12px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--white); font-size: 12px; font-weight: 500;
}
.btn-small:hover{ background: var(--surface-3); }

/* ---------- INFO ROW ---------- */
.info-rows{
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 12px;
  padding: 4px 16px;
  margin: 12px 0;
}
.info-row{
  display:flex; justify-content:space-between; align-items:center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13px;
}
.info-row:last-child{ border-bottom: none; }
.info-row .k{ color: var(--text-dim); }
.info-row .v{
  color: var(--white); font-weight: 500;
  font-family: var(--font-mono); font-feature-settings: "tnum";
}
.info-row .v.up{ color: var(--green); }
.info-row .v.dn{ color: var(--red); }

/* ---------- NOTICE ---------- */
.notice{
  display:flex; gap: 12px;
  padding: 14px 16px;
  background: rgba(0,214,114,.04);
  border: 1px solid rgba(0,214,114,.18);
  border-radius: 12px;
  font-size: 13px; color: var(--text);
  margin: 14px 0;
}
.notice.warn{
  background: rgba(255,179,0,.05);
  border-color: rgba(255,179,0,.22);
}
.notice .ic{
  width: 18px; height: 18px; color: var(--green); flex-shrink: 0; margin-top: 1px;
}
.notice.warn .ic{ color: #ffb300; }

/* ---------- QR / ADDRESS ---------- */
.qr-wrap{
  display:flex; flex-direction: column; align-items:center; gap: 14px;
  padding: 24px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.qr{
  width: 180px; height: 180px;
  background: var(--white);
  border-radius: 12px;
  display:grid; place-items:center;
  padding: 12px;
}
.qr svg{ width: 100%; height: 100%; }
.addr{
  font-family: var(--font-mono); font-size: 13px; color: var(--white);
  background: var(--surface-2); border: 1px solid var(--line);
  padding: 10px 12px; border-radius: 8px;
  display:flex; align-items:center; gap: 10px;
  width: 100%; max-width: 320px;
  word-break: break-all;
}
.addr .copy-ic{
  margin-left: auto; flex-shrink: 0;
  width: 16px; height: 16px; color: var(--text-dim);
  cursor: pointer;
}
.addr .copy-ic:hover{ color: var(--green); }

/* ---------- TABLE (history-style) ---------- */
.tbl{ width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl thead th{
  font-size: 11px; color: var(--text-mute);
  text-transform: uppercase; letter-spacing: .05em;
  font-weight: 500; text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.tbl thead th.r{ text-align: right; }
.tbl tbody td{
  padding: 14px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--text);
  vertical-align: middle;
}
.tbl tbody td.r{ text-align: right; font-family: var(--font-mono); font-feature-settings: "tnum"; }
.tbl tbody tr:hover{ background: var(--surface-2); }
.status{
  display:inline-flex; align-items:center; gap: 6px;
  padding: 3px 9px; font-size: 11px; border-radius: 100px;
  font-weight: 500;
}
.status .d{ width: 6px; height: 6px; border-radius: 50%; }
.status.done    { background: rgba(0,214,114,.07); border:1px solid rgba(0,214,114,.22); color: var(--green); }
.status.done    .d{ background: var(--green); }
.status.pending { background: rgba(255,179,0,.06); border:1px solid rgba(255,179,0,.22); color: #ffb300; }
.status.pending .d{ background: #ffb300; }
.status.fail    { background: rgba(255,77,77,.06); border:1px solid rgba(255,77,77,.22); color: var(--red); }
.status.fail    .d{ background: var(--red); }

/* ---------- SETTINGS GROUPS ---------- */
.settings-grid{
  padding: 16px 16px 90px;
  display: grid; grid-template-columns: 1fr; gap: 10px;
  max-width: 900px;
}
@media (min-width: 900px){ .settings-grid{ padding: 20px 32px 90px; gap: 12px; } }

.section-title{
  font-family: "Inter Tight", var(--font-sans);
  font-size: 10px; color: var(--text-mute);
  text-transform: uppercase; letter-spacing: .1em;
  font-weight: 600; margin: 14px 2px 6px;
}
.list-card{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.list-item{
  display:flex; align-items:center; gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-soft);
  transition: background .15s ease;
}
.list-item:last-child{ border-bottom: none; }
.list-item:hover{ background: var(--surface-2); }
.li-ic{
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--line);
  display:grid; place-items:center;
  color: var(--green); flex-shrink: 0;
}
.li-ic svg{ width: 15px; height: 15px; }
.li-body{ flex: 1; min-width: 0; }
.li-t{ font-size: 12px; color: var(--white); font-weight: 500; }
.li-d{ font-size: 10px; color: var(--text-dim); margin-top: 1px; }
.li-r{ font-size: 11px; color: var(--text-dim); }
.settings-grid .page-head{ display:none; }
.settings-top{
  padding:16px 16px 4px;
  border-bottom:1px solid var(--line);
}
.settings-top h1{
  font-family:"Inter Tight", var(--font-sans);
  font-size:20px;
  color:var(--white);
  font-weight:700;
  margin:0;
  letter-spacing:-.02em;
}
.settings-top p{
  font-size:11px;
  color:var(--text-dim);
  margin:4px 0 0;
}
.settings-grid .btn-small{
  font-size:10px;
  padding:5px 9px;
}
.li-r .chev{ color: var(--text-mute); margin-left: 4px; }

/* Toggle */
.toggle{ position: relative; width: 38px; height: 22px; flex-shrink: 0; }
.toggle input{ opacity:0; width:100%; height:100%; position:absolute; cursor: pointer; }
.toggle .track{
  position:absolute; inset:0;
  background: var(--surface-3);
  border-radius: 100px;
  transition: background .2s ease;
}
.toggle .track::after{
  content:""; position:absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--white);
  transition: transform .2s ease;
}
.toggle input:checked + .track{ background: var(--green); }
.toggle input:checked + .track::after{ transform: translateX(16px); }

/* ---------- REFERRAL BANNER ---------- */
.ref-banner{
  background:
    radial-gradient(600px 280px at 80% 0%, rgba(0,214,114,.14), transparent 60%),
    linear-gradient(180deg, rgba(0,214,114,.04), transparent 40%),
    var(--surface);
  border: 1px solid rgba(0,214,114,.22);
  border-radius: 18px;
  padding: 28px;
  position: relative;
  overflow: hidden;
}
.ref-banner h2{
  font-family: "Inter Tight", var(--font-sans);
  font-size: clamp(24px, 3vw, 36px);
  color: var(--white); font-weight: 700;
  letter-spacing: -.025em;
  margin: 0 0 6px;
}
.ref-banner h2 .gr{ color: var(--green); }
.ref-banner p{ color: var(--text-dim); margin: 0 0 18px; max-width: 460px; font-size: 14px; }

.ref-stats{
  display: grid; grid-template-columns: repeat(2,1fr); gap: 10px;
  margin-bottom: 18px;
}
@media (min-width: 720px){ .ref-stats{ grid-template-columns: repeat(4, 1fr); } }
.ref-stat{
  padding: 14px;
  background: var(--bg);
  border:1px solid var(--line);
  border-radius: 12px;
}
.ref-stat .l{ font-size: 11px; color: var(--text-mute); text-transform: uppercase; letter-spacing: .05em; }
.ref-stat .v{
  font-family: var(--font-mono); font-size: 18px; color: var(--white);
  margin-top: 4px; font-weight: 600; font-feature-settings: "tnum";
}
.ref-stat .v.up{ color: var(--green); }

/* Referral link copy */
.ref-link{
  display:flex; align-items: stretch; gap: 0;
  background: var(--bg);
  border:1px solid var(--line);
  border-radius: 10px;
  overflow:hidden;
  max-width: 100%;
}
.ref-link input{
  flex: 1; background: none; border: none; color: var(--white); outline: none;
  font: 500 13px/1 var(--font-mono);
  padding: 0 14px;
  min-width: 0;
}
.ref-link button{
  background: var(--green); color: #001a0d; font-weight: 700;
  padding: 12px 18px;
  font-size: 13px;
  display:inline-flex; align-items:center; gap: 6px;
  flex-shrink: 0;
}
.ref-link button:hover{ background: var(--green-bright); }

/* Share preview card */
.ref-share-preview{
  display:flex; align-items:flex-start; gap:14px;
  margin-bottom:14px;
  padding:14px;
  background:var(--bg);
  border:1px solid var(--line);
  border-radius:12px;
}
.ref-share-logo{
  width:52px; height:52px; border-radius:12px;
  object-fit:cover; flex-shrink:0;
  border:1px solid var(--line);
}
.ref-share-title{
  font-weight:700; font-size:14px; color:var(--white);
  margin-bottom:4px; line-height:1.3;
}
.ref-share-desc{
  font-size:12px; color:var(--text-dim); line-height:1.45; margin:0;
}

/* QR modal */
.ref-qr-modal{
  position:fixed; inset:0; z-index:9999;
  display:grid; place-items:center; padding:20px;
}
.ref-qr-backdrop{
  position:absolute; inset:0;
  background:rgba(0,0,0,.72); backdrop-filter:blur(4px);
}
.ref-qr-card{
  position:relative; z-index:1;
  width:min(100%,360px);
  background:var(--surface-2, #111);
  border:1px solid var(--line);
  border-radius:16px;
  padding:24px 20px 20px;
  text-align:center;
}
.ref-qr-close{
  position:absolute; top:10px; right:12px;
  background:none; border:none; color:var(--text-mute);
  font-size:22px; line-height:1; cursor:pointer;
}
.ref-qr-logo{ border-radius:12px; margin:0 auto 10px; display:block; }
.ref-qr-title{ font-weight:700; color:var(--white); font-size:15px; margin-bottom:6px; }
.ref-qr-desc{ font-size:12px; color:var(--text-dim); margin:0 0 14px; line-height:1.45; }
.ref-qr-img{ border-radius:10px; background:#fff; padding:8px; margin:0 auto 12px; display:block; }
.ref-qr-link{ font-size:11px; color:var(--text-mute); word-break:break-all; margin:0; }

/* Share row */
.share-row{ display:flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.share-ic{
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--surface-2); border:1px solid var(--line);
  display:grid; place-items:center;
  color: var(--white);
  transition: background .15s ease;
}
.share-ic:hover{ background: var(--surface-3); }
.share-ic svg{ width: 16px; height: 16px; }

/* Tier breakdown */
.tier-breakdown{ display:grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tier-cell{
  padding: 14px;
  background: var(--bg);
  border:1px solid var(--line);
  border-radius: 12px;
  text-align: center;
}
.tier-cell .l{ font-size: 11px; color: var(--text-mute); text-transform: uppercase; letter-spacing: .05em; }
.tier-cell .v{
  font-family: "Inter Tight", var(--font-sans);
  font-size: 26px; color: var(--green); font-weight: 700; margin-top: 6px;
}
.tier-cell .c{ font-size: 11px; color: var(--text-dim); margin-top: 4px; }

/* Deposit method tabs (Crypto / Mobile money) */
.pay-method-tabs{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin-bottom:18px;
}
.pay-method-tab{
  padding:11px 12px;
  background:var(--bg);
  border:1px solid var(--line);
  border-radius:12px;
  color:var(--text-dim);
  font-size:12px;
  font-weight:600;
  text-align:center;
  transition:border-color .15s ease, background .15s ease, color .15s ease;
}
.pay-method-tab:hover{ border-color:var(--surface-3); color:var(--white); }
.pay-method-tab.active{
  background:rgba(0,214,114,.07);
  border-color:var(--green);
  color:var(--white);
}
.pay-method-tab .pm-sub{
  display:block;
  margin-top:3px;
  font-size:10px;
  font-weight:500;
  color:var(--text-mute);
}
.pay-method-tab.active .pm-sub{ color:rgba(0,214,114,.75); }
.mm-ops{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin:8px 0 4px;
}
.mm-ops span{
  font-size:10px;
  font-weight:600;
  color:var(--text-dim);
  padding:5px 9px;
  border:1px solid var(--line);
  border-radius:100px;
  background:var(--bg);
}
.field-label{
  display:block;
  font-size:12px;
  font-weight:600;
  color:var(--text-dim);
  margin:14px 0 6px;
}
.tzs-hint{
  margin-top:8px;
  font-size:12px;
  color:var(--text-mute);
}
.tzs-hint b{ color:var(--white); font-weight:600; }

/* =====================================================
   Challenges / Funded — prop-firm style shop
   ===================================================== */
body.challenges-page{
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(0,214,114,.12), transparent 55%),
    radial-gradient(900px 420px at 100% 0%, rgba(255,210,74,.06), transparent 50%),
    #050505;
}
body.challenges-page .app{
  max-width: min(980px, 100%);
  background: transparent;
}
body.challenges-page .page-head{
  padding-top: 28px;
  border-bottom: 0;
}
body.challenges-page .page-head h1{
  font-size: clamp(28px, 4vw, 36px);
  letter-spacing: -.03em;
}
body.challenges-page .page-head .lead{
  max-width: 640px;
  font-size: 15px;
  line-height: 1.55;
}

.challenge-layout{
  display:grid;
  grid-template-columns: minmax(0,1.55fr) minmax(280px,.85fr);
  gap: 20px;
  align-items: start;
  max-width: 980px;
}
@media (max-width: 900px){
  .challenge-layout{ grid-template-columns: 1fr; }
}

.fund-shop,
.fund-checkout,
.fund-accounts{
  background: linear-gradient(180deg, rgba(22,22,22,.96), rgba(10,10,10,.98));
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 20px 50px rgba(0,0,0,.35);
}
.fund-accounts{ grid-column: 1 / -1; }

.fund-seg{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 5px;
  background: rgba(0,0,0,.45);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 14px;
  margin-bottom: 18px;
}
.fund-seg-btn{
  padding: 12px 10px;
  border-radius: 10px;
  text-align: center;
  font-weight: 650;
  font-size: 13px;
  color: var(--text-dim);
  transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}
.fund-seg-btn .pm-sub{
  display:block;
  margin-top: 3px;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-mute);
}
.fund-seg-btn.active{
  background: linear-gradient(180deg, rgba(0,214,114,.18), rgba(0,214,114,.08));
  color: var(--white);
  box-shadow: inset 0 0 0 1px rgba(0,214,114,.45);
}
.fund-seg-btn.active .pm-sub{ color: rgba(0,214,114,.85); }

.fund-rules-strip{
  display:grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 8px;
  margin-bottom: 18px;
}
@media (max-width: 640px){
  .fund-rules-strip{ grid-template-columns: 1fr 1fr; }
}
.fund-rule-chip{
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
}
.fund-rule-chip .k{
  display:block;
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 4px;
}
.fund-rule-chip .v{
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
}

.challenge-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 12px;
}
@media (max-width: 820px){
  .challenge-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 520px){
  .challenge-grid{ grid-template-columns: 1fr; }
}

.challenge-plan{
  position: relative;
  text-align: left;
  padding: 0;
  overflow: hidden;
  background:
    linear-gradient(165deg, rgba(28,28,28,.95), rgba(12,12,12,.98));
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  color: inherit;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.challenge-plan:hover{
  transform: translateY(-2px);
  border-color: rgba(0,214,114,.35);
  box-shadow: 0 12px 28px rgba(0,0,0,.35);
}
.challenge-plan.selected{
  border-color: rgba(0,214,114,.7);
  box-shadow:
    0 0 0 1px rgba(0,214,114,.35),
    0 16px 36px rgba(0,214,114,.12);
  background:
    linear-gradient(165deg, rgba(0,214,114,.14), rgba(12,12,12,.98));
}
.challenge-plan.popular{
  border-color: rgba(255,210,74,.35);
}
.challenge-plan.popular.selected{
  border-color: rgba(0,214,114,.7);
}
.cp-badge{
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255,210,74,.14);
  color: #ffd24a;
  border: 1px solid rgba(255,210,74,.28);
}
.cp-top{
  padding: 18px 16px 14px;
  border-bottom: 1px solid rgba(255,255,255,.05);
  background:
    radial-gradient(120px 60px at 0% 0%, rgba(0,214,114,.12), transparent 70%);
}
.cp-name{
  font-size: 12px;
  font-weight: 650;
  color: var(--text-dim);
  letter-spacing: .02em;
}
.cp-bal{
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -.03em;
  margin: 8px 0 4px;
  line-height: 1.05;
}
.cp-fee-row{
  display:flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
.cp-fee{
  font-size: 14px;
  color: var(--green-bright);
  font-weight: 700;
  margin: 0;
  font-family: var(--font-mono);
}
.cp-fee-label{
  font-size: 11px;
  color: var(--text-mute);
}
.cp-body{ padding: 12px 16px 16px; }
.cp-rules{
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: grid;
  gap: 7px;
}
.cp-rules li{
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.3;
}
.cp-rules li::before{
  content: "";
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Ccircle cx='8' cy='8' r='7' stroke='%2300d672' stroke-width='1.5'/%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' stroke='%2300d672' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / contain no-repeat;
}
.cp-cta{
  display: block;
  width: 100%;
  text-align: center;
  padding: 10px 12px;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  color: #04140c;
  background: linear-gradient(180deg, #1aee8c, #00d672);
  transition: filter .15s ease, transform .15s ease;
}
.challenge-plan:hover .cp-cta{ filter: brightness(1.05); }
.challenge-plan.selected .cp-cta{
  box-shadow: 0 0 0 1px rgba(255,255,255,.12);
}

.fund-checkout .card-h{
  font-family: var(--font-display);
  font-size: 18px !important;
  letter-spacing: -.02em;
}
.fund-checkout-summary{
  margin: 12px 0 4px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(0,214,114,.06);
  border: 1px solid rgba(0,214,114,.2);
}
.fund-checkout-summary .l{
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-mute);
}
.fund-checkout-summary .n{
  margin-top: 4px;
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
}
.fund-checkout-summary .p{
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--green-bright);
}

.fund-accounts-head{
  display:flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.fund-accounts-head .card-h{ margin-bottom: 0 !important; }
.prop-accounts-grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.prop-account-card{
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.07);
  background:
    linear-gradient(160deg, rgba(24,24,24,.95), rgba(10,10,10,.98));
  transition: border-color .2s ease, transform .2s ease;
}
.prop-account-card:hover{
  border-color: rgba(0,214,114,.3);
  transform: translateY(-1px);
}
.prop-account-card.is-failed{
  border-color: rgba(255,77,77,.28);
  background: linear-gradient(160deg, rgba(60,16,16,.35), rgba(10,10,10,.98));
}
.prop-account-card.is-funded{
  border-color: rgba(0,214,114,.25);
}
.pa-top{
  display:flex;
  gap: 12px;
  justify-content: space-between;
  flex-wrap: wrap;
  align-items: flex-start;
}
.pa-kicker{
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 4px;
}
.pa-title{
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--white);
  font-size: 16px;
  letter-spacing: -.02em;
}
.pa-meta{
  font-size: 12px;
  color: var(--text-mute);
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.pa-bal{
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--white);
}
.pa-actions{
  display:flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pa-actions .btn-mini{
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 9px;
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 650;
  color: var(--text);
}
.pa-actions .btn-mini.primary{
  background: rgba(0,214,114,.12);
  border-color: rgba(0,214,114,.35);
  color: var(--green-bright);
}
.pa-metrics{
  display:grid;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.pa-prog{
  font-size: 11px;
  color: var(--text-dim);
}
.pa-prog span{
  display:flex;
  justify-content: space-between;
  margin-bottom: 5px;
  gap: 8px;
}
.prop-bar{
  height: 7px;
  border-radius: 100px;
  background: rgba(255,255,255,.06);
  overflow: hidden;
}
.prop-bar i{
  display:block;
  height:100%;
  background: linear-gradient(90deg, #00d672, #1aee8c);
  border-radius: 100px;
  transition: width .35s ease;
}
.prop-bar.danger i{
  background: linear-gradient(90deg, #ff6b6b, #ff4d4d);
}
.pa-fail{
  margin-top: 10px;
  font-size: 12px;
  color: #ffb3b3;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255,77,77,.08);
  border: 1px solid rgba(255,77,77,.2);
}
.cred-box{
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.06);
}
.pill-status{
  display:inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: rgba(255,255,255,.06);
  color: var(--text-dim);
}
.pill-status.active,
.pill-status.delivered{ background:rgba(0,214,114,.12); color:var(--green); }
.pill-status.failed{ background:rgba(255,77,77,.12); color:#ff8f8f; }
.pill-status.passed{ background:rgba(255,210,74,.12); color:#ffd24a; }
.pill-status.pending_payment,
.pill-status.paid{ background:rgba(255,179,0,.12); color:#ffb300; }
.pill-status.fulfilled{ background:rgba(0,214,114,.12); color:var(--green); }

.fund-empty{
  text-align:center;
  padding: 28px 16px;
  color: var(--text-mute);
  border: 1px dashed rgba(255,255,255,.08);
  border-radius: 14px;
  background: rgba(255,255,255,.02);
}
