/* JDRC_REFERRALS_V9 */
.ref-v9-panel,.ref-v9-admin{border:1px solid rgba(255,255,255,.12);background:linear-gradient(145deg,rgba(17,17,19,.98),rgba(8,8,10,.98));border-radius:18px;padding:22px;margin-top:16px}.ref-v9-head{display:flex;justify-content:space-between;gap:18px;align-items:flex-start}.ref-v9-head h2,.ref-v9-head h3{margin:.2rem 0}.ref-v9-code{font-size:clamp(28px,5vw,48px);font-weight:950;letter-spacing:.08em}.ref-v9-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:16px 0}.ref-v9-stats>div{border:1px solid rgba(255,255,255,.1);border-radius:12px;padding:12px;background:rgba(255,255,255,.025)}.ref-v9-stats span{display:block;font-size:12px;letter-spacing:.1em;text-transform:uppercase;color:#9c9ca6}.ref-v9-stats strong{font-size:24px}.ref-v9-actions{display:flex;gap:8px;flex-wrap:wrap}.ref-v9-link{word-break:break-all;color:#bfc0c8;font-size:13px}.ref-v9-qr{background:#fff;border-radius:12px;padding:10px;display:inline-block;min-width:140px;min-height:140px}.ref-v9-qr img{display:block;max-width:160px;height:auto}.ref-v9-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.ref-v9-list{display:grid;gap:9px}.ref-v9-row{border:1px solid rgba(255,255,255,.1);border-radius:12px;padding:12px;background:rgba(255,255,255,.025)}.ref-v9-row-head{display:flex;justify-content:space-between;gap:10px}.ref-v9-chip{display:inline-flex;padding:4px 8px;border-radius:999px;font-size:12px;font-weight:900;text-transform:uppercase;background:#24242a}.ref-v9-chip.approved{background:#113520;color:#83ecaa}.ref-v9-chip.pending{background:#403516;color:#f3d36d}.ref-v9-chip.rejected{background:#41191d;color:#ff8f96}.ref-v9-note{font-size:13px;color:#aaaab2}.ref-v9-admin .form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.ref-v9-admin label{display:grid;gap:6px}.ref-v9-admin input,.ref-v9-admin textarea{width:100%}.ref-v9-admin-table{display:grid;gap:10px}.ref-v9-admin-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}@media(max-width:760px){.ref-v9-stats{grid-template-columns:1fr 1fr}.ref-v9-grid,.ref-v9-admin .form-grid{grid-template-columns:1fr}.ref-v9-head{flex-direction:column}.ref-v9-actions .button{min-height:44px}}
/* JDRC_REFERRAL_QR_RESPONSIVE_V1
   Driver Pit referral QR sizing + responsive layout
*/
.ref-v9-head{
  grid-template-columns:minmax(0,1fr) 166px !important;
  gap:22px !important;
  align-items:start !important;
}

.ref-v9-head > div:first-child{
  min-width:0 !important;
}

.ref-v9-qr{
  width:150px !important;
  max-width:150px !important;
  margin:0 14px 0 auto !important;
  justify-self:end !important;
  align-self:start !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
}

.ref-v9-qr img,
.ref-v9-qr canvas,
.ref-v9-qr svg{
  display:block !important;
  width:142px !important;
  height:142px !important;
  max-width:142px !important;
  max-height:142px !important;
  aspect-ratio:1 / 1 !important;
  object-fit:contain !important;
}

.ref-v9-link{
  max-width:100% !important;
  overflow-wrap:anywhere !important;
  word-break:break-word !important;
}

.ref-v9-code{
  max-width:100% !important;
  overflow-wrap:anywhere !important;
  word-break:break-word !important;
}

/* Tablet / narrow desktop */
@media (max-width:1000px){
  .ref-v9-head{
    grid-template-columns:minmax(0,1fr) 146px !important;
    gap:18px !important;
  }

  .ref-v9-qr{
    width:136px !important;
    max-width:136px !important;
    margin-right:8px !important;
  }

  .ref-v9-qr img,
  .ref-v9-qr canvas,
  .ref-v9-qr svg{
    width:128px !important;
    height:128px !important;
    max-width:128px !important;
    max-height:128px !important;
  }
}

/* Phone */
@media (max-width:720px){
  .ref-v9-head{
    grid-template-columns:1fr !important;
    gap:16px !important;
  }

  .ref-v9-qr{
    width:132px !important;
    max-width:132px !important;
    margin:4px auto 0 !important;
    justify-self:center !important;
  }

  .ref-v9-qr img,
  .ref-v9-qr canvas,
  .ref-v9-qr svg{
    width:124px !important;
    height:124px !important;
    max-width:124px !important;
    max-height:124px !important;
  }

  .ref-v9-actions{
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    gap:10px !important;
  }

  .ref-v9-actions .button{
    width:100% !important;
    min-width:0 !important;
  }

  .ref-v9-stats{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
}

/* Small phone */
@media (max-width:430px){
  .ref-v9-qr{
    width:126px !important;
    max-width:126px !important;
  }

  .ref-v9-qr img,
  .ref-v9-qr canvas,
  .ref-v9-qr svg{
    width:118px !important;
    height:118px !important;
    max-width:118px !important;
    max-height:118px !important;
  }

  .ref-v9-actions{
    grid-template-columns:1fr !important;
  }

  .ref-v9-stats{
    grid-template-columns:1fr 1fr !important;
  }
}
/* /JDRC_REFERRAL_QR_RESPONSIVE_V1 */
