/* ==========================================================================
   partner-account.css — Partner dashboard (sign in + earnings + profile)
   Page-specific styles on top of the shared sales.css design system.
   Used by:  /sales/partner-account.html
   ========================================================================== */

body { background: var(--bg); }

/* --------------------------------------------------------------------------
   Top bar
   -------------------------------------------------------------------------- */
.pbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--navy);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.pbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
}

.pbar .who { color: #cdd8ee; font-size: 13.5px; }
.pbar .who b { color: #fff; }

.pbar .out {
  color: #cdd8ee;
  font-size: 13.5px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  padding: 7px 14px;
}

.pbar .out:hover { background: rgba(255, 255, 255, .1); }

/* Smartphone: hide the "Signed in as …" text so the header isn't cramped. */
@media (max-width: 560px) {
  .pbar .who { display: none; }
}

.shell {
  max-width: 1000px;
  margin: 26px auto 60px;
  padding: 0 22px;
}

/* --------------------------------------------------------------------------
   Tabs + panels
   -------------------------------------------------------------------------- */
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.tabs button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
  padding: 9px 18px;
  border-radius: 999px;
  cursor: pointer;
}

.tabs button.on {
  background: #7a3df0;
  color: #fff;
  border-color: #7a3df0;
  box-shadow: 0 6px 16px rgba(122, 61, 240, .28);
}

.panel { display: none; }
.panel.on { display: block; }

.pcard {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
  margin-bottom: 20px;
}

.pcard h2 {
  font-size: 18px;
  margin: 0 0 16px;
  font-weight: 850;
}

/* --------------------------------------------------------------------------
   Partner-code box
   -------------------------------------------------------------------------- */
.codebox {
  background: linear-gradient(165deg, #f3edff, #ffffff);
  border: 1px dashed #c4a8ff;
  border-radius: 14px;
  padding: 20px;
  text-align: center;
}

.codebox .lbl {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.codebox .code {
  font-size: 30px;
  font-weight: 850;
  letter-spacing: 3px;
  color: #7a3df0;
  margin: 8px 0;
}

.codebox .copy {
  background: #7a3df0;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 9px 20px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

.codebox .copy:hover { background: #6a2fd8; }

.codebox .cbtns {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2px;
}

.codebox .copy.share {
  background: #fff;
  color: #7a3df0;
  border: 1px solid #c4a8ff;
}

.codebox .copy.share:hover { background: #f3edff; }

.codebox .sharelink {
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--muted);
  word-break: break-all;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Stat tiles (per currency)
   -------------------------------------------------------------------------- */
.curcard {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 14px 16px;
  margin-top: 16px;
  background: #faf9ff;
}

.curhead {
  font-weight: 800;
  font-size: 13.5px;
  color: var(--navy);
  margin-bottom: 4px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 10px 0 4px;
}

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

.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  text-align: center;
}

.stat .v {
  font-size: 26px;
  font-weight: 850;
  letter-spacing: -.5px;
}

.stat .v.violet { color: #7a3df0; }
.stat .v.green { color: var(--ok); }

.stat .k {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

.withdraw {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 14px;
}

.withdraw .btn-w {
  background: var(--ok);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
}

.withdraw .note {
  color: var(--muted);
  font-size: 13px;
}

/* --------------------------------------------------------------------------
   Earnings table
   -------------------------------------------------------------------------- */
.etable {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-top: 6px;
  min-width: 640px;
}

.etable th,
.etable td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.etable thead th {
  background: #f3edff;
  color: var(--navy);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: .4px;
  font-weight: 800;
}

.etable td.amt {
  font-weight: 800;
  color: #7a3df0;
  text-align: right;
  white-space: nowrap;
}

.etable th.amt { text-align: right; }
.etable tbody tr:hover { background: #faf7ff; }

.pill-st {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
}

.pill-st.active { background: #dcfce7; color: #15803d; }
.pill-st.pending { background: #fef9c3; color: #a16207; }
.pill-st.ended { background: #fee2e2; color: #b91c1c; }

.tnote {
  color: var(--muted);
  font-size: 13px;
  margin-top: 12px;
}

.escroll { overflow-x: auto; }

/* --------------------------------------------------------------------------
   Profile form
   -------------------------------------------------------------------------- */
.fld input { background: #fff; }

.saved {
  color: var(--ok);
  font-weight: 700;
  font-size: 13px;
}

/* --------------------------------------------------------------------------
   Login gate
   -------------------------------------------------------------------------- */
.loginwrap {
  max-width: 420px;
  margin: 60px auto;
  padding: 0 22px;
}

.vbtn {
  background: #7a3df0;
  box-shadow: 0 8px 22px rgba(122, 61, 240, .34);
}

.vbtn:hover { background: #6a2fd8; }

/* --------------------------------------------------------------------------
   Inline withdraw form
   -------------------------------------------------------------------------- */
.wform {
  margin-top: 16px;
  padding: 16px;
  border: 1px dashed #c4a8ff;
  border-radius: 12px;
  background: #faf7ff;
  display: none;
}

.wform.on { display: block; }

.muted-sm {
  color: var(--muted);
  font-size: 13px;
}

.wlist {
  margin-top: 6px;
  font-size: 14px;
}

.wlist .wrow {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.wlist .wrow:last-child { border-bottom: none; }

.badge-w {
  font-size: 12px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
}

.badge-w.req { background: #fef9c3; color: #a16207; }
.badge-w.paid { background: #dcfce7; color: #15803d; }
.badge-w.rej { background: #fee2e2; color: #b91c1c; }

.hide { display: none; }
