/* ============================================================
   BYP REUSABLE SIDE PANEL SYSTEM  —  visual layer
   ------------------------------------------------------------
   BLACK base, WHITE text, ELECTRIC PINK / BLUE / PURPLE accents.
   NO NAVY anywhere.

   Desktop: a substantial right-hand column sliding in over the app.
   Mobile:  effectively full-bleed, still clearly a panel.
   ============================================================ */

/* ---- overlay + surface ---- */
.byp-panel-overlay{position:fixed;inset:0;z-index:940;background:rgba(0,0,0,.62);opacity:0;transition:opacity .18s ease;display:flex;justify-content:flex-end}
.byp-panel-overlay[hidden]{display:none}
.byp-panel-overlay.is-open{opacity:1}

.byp-panel{
  position:relative;height:100%;width:460px;max-width:100vw;
  background:#050506;
  border-left:1px solid rgba(124,233,255,.26);
  box-shadow:-30px 0 80px rgba(0,0,0,.82), inset 1px 0 0 rgba(255,46,196,.16);
  display:flex;flex-direction:column;min-height:0;
  transform:translateX(16px);opacity:.6;
  transition:transform .2s cubic-bezier(.22,.8,.3,1), opacity .2s ease;
  outline:none;
}
.byp-panel-overlay.is-open .byp-panel{transform:translateX(0);opacity:1}

/* A hairline brand edge so the panel reads as part of BYP chrome. */
.byp-panel::before{content:"";position:absolute;left:0;top:0;bottom:0;width:2px;
  background:linear-gradient(180deg,var(--pink,#ff2ec4),var(--bridge,#a855ff),var(--blue,#00e5ff));opacity:.9}

/* ---- header (identical on EVERY panel) ---- */
.byp-panel-head{
  display:flex;align-items:flex-start;gap:10px;flex:0 0 auto;
  padding:16px 16px 13px 18px;
  border-bottom:1px solid rgba(255,255,255,.09);
  background:linear-gradient(180deg,rgba(255,255,255,.045),transparent);
  position:sticky;top:0;z-index:2;
}
.byp-panel-headtext{flex:1 1 auto;min-width:0}
.byp-panel-title{
  margin:0;font-size:14.5px;font-weight:900;letter-spacing:.14em;text-transform:uppercase;
  color:#fff;line-height:1.25;word-break:break-word;
}
.byp-panel-sub{
  margin-top:3px;font-size:11px;font-weight:700;letter-spacing:.08em;
  color:var(--softblue,#7ce9ff);text-transform:uppercase;
}
.byp-panel-back,.byp-panel-close{
  flex:0 0 auto;width:34px;height:34px;border-radius:10px;padding:0;
  display:inline-flex;align-items:center;justify-content:center;
  background:rgba(255,255,255,.05);border:1px solid var(--line,rgba(255,255,255,.14));
  color:#fff;font-size:17px;font-weight:900;line-height:1;cursor:pointer;
  transition:border-color .15s ease,color .15s ease,background .15s ease;
}
.byp-panel-back:hover,.byp-panel-close:hover{
  border-color:var(--pink,#ff2ec4);color:var(--pink,#ff2ec4);background:rgba(255,46,196,.10);
}
.byp-panel-back:focus-visible,.byp-panel-close:focus-visible{
  outline:2px solid var(--blue,#00e5ff);outline-offset:2px;
}

/* ---- scrolling body: the panel owns its own scroll ---- */
.byp-panel-body{
  flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;
  -webkit-overflow-scrolling:touch;overscroll-behavior:contain;
  padding:16px 18px 30px;
  outline:none;
}
.byp-panel-body > *:first-child{margin-top:0}

/* The underlying page must not scroll while the panel scrolls. */
html.byp-panel-lock,html.byp-panel-lock body{overflow:hidden}

/* ---- generic in-panel blocks ---- */
.byp-panel-block{
  background:var(--surf-1,#0b0b0c);border:1px solid var(--line,rgba(255,255,255,.12));
  border-radius:14px;padding:13px 14px;margin:0 0 12px;
}
.byp-panel-block > .byp-panel-block-label,
.byp-panel-label{
  display:block;font-size:10.5px;font-weight:900;letter-spacing:.14em;text-transform:uppercase;
  color:var(--pink,#ff2ec4);margin:0 0 9px;
}
.byp-panel-note{font-size:11.5px;line-height:1.5;color:var(--dim,#9a9aa6);margin:8px 0 0}

/* Member identity strip (ME + BYP CODE panels) */
.byp-panel-ident{text-align:center;padding:16px 14px}
.byp-panel-ident .byp-me-name{font-size:17px}
.byp-panel-code{
  display:inline-flex;align-items:center;gap:8px;margin-top:8px;
  font-family:ui-monospace,Menlo,Consolas,monospace;font-size:15px;font-weight:800;
  letter-spacing:.06em;color:#fff;
}
.byp-panel-code b{color:var(--blue,#00e5ff)}

/* ---- navigation rows: clean horizontal, never a stretched pill ---- */
.byp-panel-row{
  display:flex;align-items:center;gap:10px;width:100%;min-height:52px;
  padding:0 12px;margin:0 0 8px;text-align:left;
  background:var(--surf-1,#0b0b0c);
  border:1px solid var(--line,rgba(255,255,255,.12));
  border-radius:13px;color:#fff;cursor:pointer;
  font:inherit;font-size:12.5px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;
  transition:border-color .15s ease,background .15s ease,color .15s ease;
}
.byp-panel-row:hover,.byp-panel-row:focus-visible{
  border-color:rgba(255,46,196,.55);
  background:linear-gradient(90deg,rgba(255,46,196,.10),rgba(0,229,255,.06));
  outline:none;color:#fff;
}
.byp-panel-row:focus-visible{outline:2px solid var(--blue,#00e5ff);outline-offset:2px}
.byp-panel-row-label{flex:1 1 auto;min-width:0;word-break:break-word}
.byp-panel-row-value{
  flex:0 0 auto;font-size:11.5px;font-weight:800;letter-spacing:.06em;
  color:var(--softblue,#7ce9ff);text-transform:none;
}
.byp-panel-row-chev{
  flex:0 0 auto;color:var(--dim2,#8a8a96);font-size:16px;font-weight:900;line-height:1;
  transition:color .15s ease,transform .15s ease;
}
.byp-panel-row:hover .byp-panel-row-chev{color:var(--pink,#ff2ec4);transform:translateX(2px)}
/* A destructive/attention row (SIGN OUT) — pink, never gold/red. */
.byp-panel-row.is-danger{border-color:rgba(255,46,196,.42)}
.byp-panel-row.is-danger .byp-panel-row-label{color:var(--pink,#ff2ec4)}
.byp-panel-row.is-danger:hover{border-color:var(--pink,#ff2ec4)}

/* A value-forward row (CURRENT BALANCE) reads as a stat, not a button. */
.byp-panel-caption{
  font-size:10.5px;font-weight:900;letter-spacing:.14em;text-transform:uppercase;
  color:var(--dim2,#8a8a96);margin:2px 2px 6px;
}
.byp-panel-stat{
  display:flex;align-items:baseline;gap:9px;padding:13px 14px;margin:0 0 12px;
  border-radius:14px;border:1px solid rgba(0,229,255,.30);
  background:linear-gradient(135deg,rgba(0,229,255,.09),rgba(168,85,255,.05));
}
.byp-panel-stat b{font-size:26px;font-weight:900;color:#fff;letter-spacing:.02em;line-height:1}
.byp-panel-stat span{font-size:11px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:var(--softblue,#7ce9ff)}
.byp-panel-stat.is-unlimited{border-color:rgba(255,46,196,.42);background:linear-gradient(135deg,rgba(255,46,196,.12),rgba(0,229,255,.05))}
.byp-panel-stat.is-unlimited span{color:var(--pink,#ff2ec4)}

/* Pricing rows — same horizontal rhythm as nav rows. */
.byp-panel-price{display:flex;align-items:center;gap:10px;padding:12px;margin:0 0 8px;
  border-radius:13px;border:1px solid var(--line,rgba(255,255,255,.12));background:var(--surf-1,#0b0b0c)}
.byp-panel-price-main{flex:1 1 auto;min-width:0}
.byp-panel-price-name{font-size:12.5px;font-weight:900;letter-spacing:.1em;text-transform:uppercase;color:#fff}
.byp-panel-price-sub{font-size:11px;color:var(--dim,#9a9aa6);margin-top:2px}
.byp-panel-price-amt{flex:0 0 auto;font-size:14px;font-weight:900;color:var(--blue,#00e5ff)}
.byp-panel-price .cbtn{flex:0 0 auto;min-height:38px}

/* ---- form controls (bounded to the panel so nothing overflows) ---- */
.byp-panel-body input[type="text"],
.byp-panel-body input[type="search"],
.byp-panel-body input[type="email"],
.byp-panel-body input[type="tel"],
.byp-panel-body input[type="date"],
.byp-panel-body select,
.byp-panel-body textarea{
  width:100%;max-width:100%;box-sizing:border-box;
  background:#0f0f0f;border:1px solid var(--line,rgba(255,255,255,.14));border-radius:10px;
  color:#fff;padding:10px 11px;font:inherit;font-size:13px;
}
.byp-panel-body input:focus-visible,
.byp-panel-body select:focus-visible,
.byp-panel-body textarea:focus-visible{outline:2px solid var(--blue,#00e5ff);outline-offset:1px}
.byp-panel-body img{max-width:100%;height:auto}
.byp-panel-body .cbtn{max-width:100%}
.byp-panel-body table{max-width:100%}

/* ---- history rows: compact card, never a stretched pill ---- */
.byp-hist-row{
  display:block;width:100%;text-align:left;box-sizing:border-box;
  background:var(--surf-1,#0b0b0c);border:1px solid var(--line,rgba(255,255,255,.12));
  border-radius:13px;padding:12px 13px;margin:0 0 10px;color:#fff;font:inherit;cursor:pointer;
  transition:border-color .15s ease,background .15s ease;
}
.byp-hist-row:hover,.byp-hist-row:focus-visible{
  border-color:rgba(0,229,255,.5);
  background:linear-gradient(135deg,rgba(0,229,255,.07),rgba(255,46,196,.04));
  outline:none;
}
.byp-hist-row:focus-visible{outline:2px solid var(--blue,#00e5ff);outline-offset:2px}
.byp-hist-top{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
.byp-hist-name{font-size:14px;font-weight:900;letter-spacing:.05em;text-transform:uppercase;color:#fff}
.byp-hist-code{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:11.5px;font-weight:800;color:var(--softblue,#7ce9ff)}
.byp-hist-theme{font-size:11px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:var(--dim2,#8a8a96);margin-top:3px}
.byp-hist-scores{display:flex;flex-wrap:wrap;gap:6px 12px;margin-top:9px}
.byp-hist-score{font-size:11px;font-weight:800;letter-spacing:.06em;color:var(--dim,#9a9aa6);text-transform:uppercase}
.byp-hist-score b{color:#fff;font-size:13px;margin-left:3px}
.byp-hist-score.is-harmony b{color:var(--blue,#00e5ff)}
.byp-hist-decision{
  display:inline-block;margin-top:9px;padding:4px 10px;border-radius:999px;
  font-size:10.5px;font-weight:900;letter-spacing:.12em;text-transform:uppercase;
  border:1px solid rgba(255,46,196,.45);color:var(--pink,#ff2ec4);
}
.byp-hist-decision.is-go{border-color:rgba(0,229,255,.5);color:var(--blue,#00e5ff)}
.byp-hist-decision.is-wait{border-color:rgba(168,85,255,.5);color:var(--bridge,#a855ff)}
.byp-hist-open{margin-top:10px;font-size:10.5px;font-weight:900;letter-spacing:.12em;text-transform:uppercase;color:var(--softblue,#7ce9ff)}

/* Filter chips — small, horizontal, wrapping. */
.byp-panel-chips{display:flex;flex-wrap:wrap;gap:7px;margin:10px 0 12px}
.byp-panel-chip{
  font:inherit;font-size:10.5px;font-weight:900;letter-spacing:.1em;text-transform:uppercase;
  padding:7px 11px;border-radius:999px;cursor:pointer;
  background:rgba(255,255,255,.04);border:1px solid var(--line,rgba(255,255,255,.14));color:var(--dim,#9a9aa6);
  transition:border-color .15s ease,color .15s ease,background .15s ease;
}
.byp-panel-chip:hover{border-color:var(--blue,#00e5ff);color:#fff}
.byp-panel-chip.is-on{border-color:var(--pink,#ff2ec4);color:var(--pink,#ff2ec4);background:rgba(255,46,196,.10)}
.byp-panel-chip:focus-visible{outline:2px solid var(--blue,#00e5ff);outline-offset:2px}

/* ---- notice list / long-form document text ---- */
.byp-panel-doc{font-size:12.5px;line-height:1.65;color:var(--dim,#9a9aa6);white-space:pre-wrap;word-break:break-word}
.byp-panel-doc strong{color:#fff}
.byp-panel-doc h3{font-size:12.5px;font-weight:900;letter-spacing:.1em;text-transform:uppercase;color:#fff;margin:16px 0 6px}

/* ---- in-panel loading / error states ---- */
.byp-panel-state{padding:34px 12px;text-align:center}
.byp-panel-state-text{font-size:12px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:var(--dim,#9a9aa6);margin-top:12px;white-space:pre-line}
.byp-panel-spinner{
  width:26px;height:26px;margin:0 auto;border-radius:50%;
  border:2px solid rgba(255,255,255,.14);border-top-color:var(--pink,#ff2ec4);
  animation:bypPanelSpin .7s linear infinite;
}
.byp-panel-state.is-error .byp-panel-state-text{color:var(--pink,#ff2ec4)}
.byp-panel-state .cbtn{margin-top:14px}
@keyframes bypPanelSpin{to{transform:rotate(360deg)}}

/* ---- MOBILE: a panel, not a website page ---- */
@media (max-width:760px){
  .byp-panel{
    width:100%;max-width:100vw;
    border-left:none;
    border-top:1px solid rgba(124,233,255,.26);
    border-radius:18px 18px 0 0;
    margin-top:6vh;
    box-shadow:0 -24px 70px rgba(0,0,0,.8);
    transform:translateY(18px);
  }
  .byp-panel-overlay.is-open .byp-panel{transform:translateY(0)}
  .byp-panel::before{
    left:18px;right:18px;top:0;bottom:auto;width:auto;height:2px;border-radius:0 0 3px 3px;
  }
  .byp-panel-head{padding:14px 14px 12px 16px}
  .byp-panel-body{padding:14px 15px 34px}
  /* The header stays put while the content scrolls. */
  .byp-panel-head{position:sticky;top:0}
  .byp-panel-row{min-height:54px}
}
@media (max-width:380px){
  .byp-panel-title{font-size:13.5px}
  .byp-panel-row{font-size:12px}
}

/* ---- Home secondary access: opens the global side panel ---- */
.entry-foot{display:flex;align-items:center;justify-content:center;gap:10px;margin:16px 0 24px;flex-wrap:wrap}
.entry-foot-link{
  background:none;border:none;padding:6px 2px;cursor:pointer;font:inherit;
  font-size:11px;font-weight:800;letter-spacing:.14em;color:var(--dim2,#8a8a96);
  transition:color .15s ease;
}
.entry-foot-link:hover,.entry-foot-link:focus-visible{color:var(--pink,#ff2ec4);outline:none}
.entry-foot-sep{color:var(--dim2,#8a8a96);font-size:11px}

/* ---- reduced motion: no slide, no fade ---- */
@media (prefers-reduced-motion: reduce){
  .byp-panel,.byp-panel-overlay{transition:none!important}
  .byp-panel{transform:none!important;opacity:1!important}
  .byp-panel-spinner{animation:none;border-top-color:var(--pink,#ff2ec4)}
}


/* MOBILE SCROLL SAFETY
   Full-screen panels already intercept touch input themselves. Locking the
   root document with overflow:hidden on iOS can leave the page stuck after the
   panel closes or after Safari restores the page. Keep the panel independently
   scrollable while leaving the document recoverable. */
@media (max-width:919px){
  html.byp-panel-lock,
  html.byp-panel-lock body{
    overflow:auto!important;
    height:auto!important;
    position:static!important;
  }
  .byp-panel-overlay{
    overscroll-behavior:contain;
    touch-action:pan-y;
  }
  .byp-panel{
    height:100dvh;
    max-height:100dvh;
  }
  .byp-panel-body{
    touch-action:pan-y;
    overscroll-behavior-y:contain;
    -webkit-overflow-scrolling:touch;
  }
}


/* Governance status on the signed-in member identity. This reads the SAME
   members.role value used by Access Team/auth — no decorative duplicate role. */
.byp-governance-role{
  display:inline-flex;align-items:center;margin-top:7px;padding:4px 9px;
  border-radius:999px;border:1px solid rgba(255,46,196,.48);
  background:rgba(255,46,196,.08);color:var(--pink,#ff2ec4);
  font-size:9.5px;font-weight:900;letter-spacing:.12em;text-transform:uppercase;
  box-shadow:0 0 14px rgba(255,46,196,.10)
}


/* ME account list uses the BYP color rhythm instead of one flat border. */
.byp-me-account-list .byp-panel-row:nth-child(3n+1){border-color:rgba(0,229,255,.34);background:linear-gradient(90deg,rgba(0,229,255,.055),rgba(0,0,0,0))}
.byp-me-account-list .byp-panel-row:nth-child(3n+2){border-color:rgba(168,85,255,.36);background:linear-gradient(90deg,rgba(168,85,255,.06),rgba(0,0,0,0))}
.byp-me-account-list .byp-panel-row:nth-child(3n){border-color:rgba(255,46,196,.34);background:linear-gradient(90deg,rgba(255,46,196,.055),rgba(0,0,0,0))}
.byp-me-account-list .byp-panel-row:nth-child(3n+1):hover{border-color:rgba(0,229,255,.72)}
.byp-me-account-list .byp-panel-row:nth-child(3n+2):hover{border-color:rgba(168,85,255,.72)}
.byp-me-account-list .byp-panel-row:nth-child(3n):hover{border-color:rgba(255,46,196,.72)}
