/* ============================================================
   P.E.S.T Web App — screen-specific styles
   Login · Dashboard (orbit) · Members · Projects · Profile · Admin
   ============================================================ */

/* ---------------- LOGIN ---------------- */
.login {
  position: relative; z-index: 1; min-height: 100svh;
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.login-card {
  width: min(440px, 100%);
  background: var(--panel); border: 1px solid var(--line-2);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
}
.login-bar {
  display: flex; align-items: center; gap: 9px; padding: 12px 18px; border-bottom: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; color: var(--tx-faint);
}
.login-bar .dots { display: flex; gap: 6px; }
.login-bar .dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-3); }
.login-body { padding: 34px 32px 32px; }
.login-emblem { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-bottom: 26px; text-align: center; }
.login-emblem img { height: 58px; }
.login-emblem .wm {
  font-weight: 700; letter-spacing: 0.14em; font-size: 30px;
  position: relative; display: inline-block;
}
.login-emblem .wm::before, .login-emblem .wm::after {
  content: "P.E.S.T"; position: absolute; inset: 0; opacity: 0.0; pointer-events: none;
}
.login-glitch .wm::before { color: var(--c-cyan); animation: lgl 3s infinite steps(2); mix-blend-mode: screen; }
.login-glitch .wm::after { color: var(--c-magenta); animation: lgl 3.6s infinite reverse steps(2); mix-blend-mode: screen; }
@keyframes lgl { 0%,92%,100% { transform: translate(0,0); opacity: 0; } 93% { transform: translate(-2px,1px); opacity: .6; } 96% { transform: translate(2px,-1px); opacity: .6; } }
.login-emblem .sub { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--tx-faint); }
.login-form { display: grid; gap: 16px; }
.login-note {
  margin-top: 18px; padding: 12px 14px; border: 1px dashed var(--line-2);
  font-family: var(--font-mono); font-size: 11px; line-height: 1.7; color: var(--tx-faint);
}
.login-note b { color: var(--tx-dim); }
.login-err { color: #ff8298; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.04em; }
.demo-chip {
  position: absolute; top: 16px; right: 16px; z-index: 2;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  padding: 5px 9px; border: 1px solid var(--line-2); color: var(--tx-faint);
}
.guest-link {
  display: block; width: 100%; margin-top: 16px; padding: 10px; text-align: center;
  background: none; border: none; cursor: pointer;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--tx-faint); transition: color 0.2s;
}
.guest-link span { color: var(--c-cyan); }
.guest-link:hover { color: var(--tx-dim); }

/* ---------------- DASHBOARD (orbit) ---------------- */
.dash { display: flex; flex-direction: column; min-height: calc(100svh - 94px); }
.dash-greet { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.dash-greet h1 { margin: 6px 0 0; font-size: clamp(24px, 3.2vw, 34px); font-weight: 600; }
.dash-clock { font-family: var(--font-mono); font-size: 12px; color: var(--tx-faint); letter-spacing: 0.1em; text-align: right; }
.dash-clock b { display: block; color: var(--tx-dim); font-size: 20px; font-weight: 500; letter-spacing: 0.04em; }

.orbit-stage {
  position: relative; flex: 1; min-height: 460px;
  display: flex; align-items: center; justify-content: center; margin: 8px 0;
}
.orbit {
  position: relative; width: min(620px, 88vw); aspect-ratio: 1 / 0.82;
}
.orbit-ring {
  position: absolute; inset: 0; border: 1px solid var(--line); border-radius: 50%;
  pointer-events: none;
}
.orbit-ring.r2 { inset: 13%; opacity: 0.6; }
.orbit-lines { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.orbit-lines line { stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 3 5; }

/* center pfp */
.orbit-core {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 5;
  width: clamp(128px, 22vw, 176px); aspect-ratio: 1;
}
.orbit-core .ring {
  position: absolute; inset: -10px; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--c-cyan), var(--c-violet), var(--c-magenta), var(--c-cyan));
  opacity: 0.85; animation: spin 14s linear infinite; filter: blur(0.3px);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
}
@keyframes spin { to { transform: rotate(360deg); } }
.orbit-core .pfp {
  position: absolute; inset: 4px; border-radius: 50%; overflow: hidden;
  border: 2px solid var(--bg); background: var(--bg-2); box-shadow: 0 0 40px rgba(123,63,228,0.3);
}
.orbit-core .pfp img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.8s var(--ease); }
.orbit-core .pfp img.show { opacity: 1; }
.orbit-core .glow { position: absolute; inset: -30px; border-radius: 50%; background: radial-gradient(circle, rgba(123,63,228,0.28), transparent 70%); z-index: -1; pointer-events: none; }
.orbit-core .uname {
  position: absolute; left: 50%; bottom: -34px; transform: translateX(-50%); white-space: nowrap;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--tx-dim);
}

/* orbiting project nodes */
.orbit-node {
  position: absolute; transform: translate(-50%, -50%); z-index: 6;
  width: clamp(54px, 9vw, 72px); aspect-ratio: 1; cursor: pointer;
}
.orbit-node .nlogo {
  width: 100%; height: 100%; border: 1px solid var(--line-2); background: var(--bg-2);
  display: flex; align-items: center; justify-content: center; overflow: hidden; transition: all 0.24s var(--ease);
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}
.orbit-node .nlogo img { width: 100%; height: 100%; object-fit: cover; }
.orbit-node:hover .nlogo { border-color: var(--line-3); box-shadow: var(--glow-cyan); transform: scale(1.08); }
.orbit-node .nlabel {
  position: absolute; left: 50%; top: calc(100% + 6px); transform: translateX(-50%); white-space: nowrap;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; color: var(--tx-dim);
  opacity: 0; transition: opacity 0.2s; pointer-events: none;
}
.orbit-node:hover .nlabel { opacity: 1; }
.orbit-add {
  position: absolute; transform: translate(-50%, -50%); z-index: 6;
  width: clamp(54px, 9vw, 72px); aspect-ratio: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  border: 1px dashed var(--line-2); color: var(--tx-faint); background: rgba(255,255,255,0.01);
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
  transition: all 0.2s var(--ease);
}
.orbit-add:hover { color: var(--tx); border-color: var(--c-violet); }
.orbit-add svg { width: 22px; height: 22px; }

.dash-empty { text-align: center; max-width: 38ch; }
.dash-empty p { color: var(--tx-dim); font-size: 14px; line-height: 1.6; }

/* quick-access popover (node click) */
.qa-pop { display: flex; flex-direction: column; gap: 4px; }
.qa-head { display: flex; align-items: center; gap: 13px; padding: 4px 2px 14px; }
.qa-head .logo-tile { width: 46px; height: 46px; }
.qa-head h3 { margin: 0; font-size: 18px; font-weight: 600; }
.qa-head .tag { margin-top: 5px; }
.qa-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.qa-links .pill { justify-content: center; }
.qa-actions { margin-top: 14px; display: flex; gap: 8px; }

/* mobile: orbit becomes calmer */
@media (max-width: 560px) {
  .orbit { width: 94vw; aspect-ratio: 1 / 1; }
  .orbit-node, .orbit-add { width: 50px; }
  .orbit-node .nlabel { display: none; }
}

/* ---------------- TOKENS (watchlist + ticker) ---------------- */
.tok-tile {
  width: 38px; height: 38px; flex: none; display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: var(--font-mono); font-weight: 600; font-size: 11px; letter-spacing: 0.02em;
  clip-path: polygon(5px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px);
}
.tok-tile.sm { width: 30px; height: 30px; font-size: 9.5px; }

.tok-card { margin: 4px auto 0; width: 100%; max-width: 720px; padding: 18px 20px 14px; }
.tok-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.tok-head h2 { margin: 4px 0 0; font-size: 20px; font-weight: 600; }
.tok-empty { text-align: center; padding: 14px 0 18px; }
.tok-empty p { color: var(--tx-faint); font-size: 13px; margin: 0 0 12px; }

.tok-list { display: flex; flex-direction: column; }
.tok-row {
  display: flex; align-items: center; gap: 13px; padding: 11px 4px;
  border-top: 1px solid var(--line); transition: background 0.2s;
}
.tok-row:first-child { border-top: none; }
.tok-row:hover { background: rgba(255,255,255,0.018); }
.tok-id { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.tok-id b { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.04em; color: var(--tx); }
.tok-id span { font-size: 11.5px; color: var(--tx-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tok-price { text-align: right; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.3; }
.tok-price b { font-family: var(--font-mono); font-size: 14px; color: var(--tx); font-variant-numeric: tabular-nums; }

.tok-chg {
  display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-mono);
  font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.tok-chg.up { color: var(--ok); }
.tok-chg.down { color: var(--danger); }
.tok-arrow { width: 0; height: 0; display: inline-block; }
.tok-arrow.up { border-left: 3.5px solid transparent; border-right: 3.5px solid transparent; border-bottom: 6px solid var(--ok); }
.tok-arrow.down { border-left: 3.5px solid transparent; border-right: 3.5px solid transparent; border-top: 6px solid var(--danger); }

/* picker modal */
.tok-note { color: var(--tx-faint); font-size: 12.5px; line-height: 1.55; margin: 0 0 14px; }
.tok-pick-list { display: flex; flex-direction: column; gap: 8px; max-height: 46vh; overflow-y: auto; }
.tok-pick {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer;
  padding: 9px 12px; background: var(--bg); border: 1px solid var(--line-2); color: var(--tx);
  transition: all 0.18s var(--ease); border-radius: var(--r);
}
.tok-pick:hover { border-color: var(--line-3); }
.tok-pick.on { border-color: var(--c-violet); box-shadow: var(--glow-violet); }
.tok-pick-state {
  flex: none; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-2); color: var(--tx-faint);
}
.tok-pick-state svg { width: 15px; height: 15px; }
.tok-pick.on .tok-pick-state { background: var(--accent-grad-h); border-color: transparent; color: #fff; }
.tok-pick.is-disabled { opacity: 0.4; cursor: not-allowed; }
.tok-pick.is-disabled:hover { border-color: var(--line-2); }

/* guest ticker strip */
.tok-strip { margin: 6px 0 20px; }
.tok-strip-label { margin-bottom: 10px; }
.tok-strip-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.tok-tick {
  display: flex; align-items: center; gap: 9px; padding: 10px 11px;
  background: var(--bg-2); border: 1px solid var(--line);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
}
.tok-tick-id { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.tok-tick-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.tok-tick-top b { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; }
.tok-tick-price { font-family: var(--font-mono); font-size: 11px; color: var(--tx-dim); font-variant-numeric: tabular-nums; }
.tok-tick .tok-chg { font-size: 10px; }

@media (max-width: 920px) { .tok-strip-row { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .tok-strip-row { grid-template-columns: repeat(2, 1fr); } }

/* ---------------- MEMBERS ---------------- */
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.m-card {
  position: relative; cursor: pointer; background: var(--bg-2); border: 1px solid var(--line);
  padding: 14px; text-align: center; transition: all 0.26s var(--ease); overflow: hidden;
}
.m-card:hover { border-color: var(--line-2); transform: translateY(-3px); box-shadow: var(--glow-cyan); }
.m-av { position: relative; aspect-ratio: 1; border: 1px solid var(--line); overflow: hidden; margin-bottom: 12px; background: var(--bg-1); }
.m-av img { width: 100%; height: 100%; object-fit: cover; }
.m-av .ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 26px; color: var(--tx-faint); }
.m-nick { font-size: 15px; font-weight: 600; }
.m-role { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--tx-faint); margin-top: 3px; }
.m-badges { position: absolute; top: 8px; left: 8px; z-index: 3; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.m-badge { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.1em; text-transform: uppercase; padding: 3px 6px; font-weight: 600; line-height: 1; white-space: nowrap; }
.m-badge.lead { background: var(--accent-grad-h); color: #fff; }
.m-badge.co { background: rgba(8,8,14,0.82); border: 1px solid var(--c-violet); color: #c9b8ff; }
.m-badge.oracle { background: rgba(8,8,14,0.82); border: 1px solid var(--c-cyan); color: #9fdcff; }
.m-badge.gcoder { background: rgba(8,8,14,0.82); border: 1px solid var(--c-magenta); color: #ff9fd6; }

/* referral badges (on card) */
.ref-badges { position: absolute; top: 8px; right: 8px; z-index: 3; display: flex; flex-direction: column; gap: 5px; }
.ref-badge {
  width: 26px; height: 26px; border: 1px solid var(--line-2); background: var(--bg-1);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.ref-badge img { width: 100%; height: 100%; object-fit: cover; }
.ref-badge .lt { font-family: var(--font-mono); font-size: 10px; font-weight: 700; color: #fff; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }

/* member modal */
.mm-top { position: relative; padding: 26px; display: flex; gap: 18px; align-items: center; border-bottom: 1px solid var(--line); background: radial-gradient(120% 140% at 0 0, rgba(27,157,245,0.1), transparent 55%); flex: none; }
.mm-av { width: 96px; height: 96px; flex: none; border: 1px solid var(--line-2); overflow: hidden; background: var(--bg-1); }
.mm-av img { width: 100%; height: 100%; object-fit: cover; }
.mm-av .ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 30px; color: var(--tx-faint); }
.mm-role { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--c-cyan); }
.mm-nick { font-size: 26px; font-weight: 700; margin: 5px 0; }
.mm-pfp { font-family: var(--font-mono); font-size: 11px; color: var(--tx-faint); }
.mm-pfp b { color: var(--tx-dim); font-weight: 500; }
.mm-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.pfp-strip { margin-bottom: 20px; }
.pfp-strip .lbl { display: block; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--tx-faint); margin-bottom: 9px; }
.pfp-thumbs { display: flex; gap: 9px; flex-wrap: wrap; }
.pfp-thumb { width: 48px; height: 48px; border: 1px solid var(--line-2); overflow: hidden; cursor: pointer; background: var(--bg-1); padding: 0; transition: all 0.2s; }
.pfp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pfp-thumb.on { border-color: transparent; box-shadow: 0 0 0 2px var(--c-cyan); }
.mm-section-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--tx-faint); margin: 22px 0 11px; }
.mm-desc { color: var(--tx-dim); font-size: 14.5px; line-height: 1.7; white-space: pre-line; }
.mm-desc.faint { color: var(--tx-faint); font-style: italic; }
.mm-socials { display: flex; gap: 8px; flex-wrap: wrap; }

/* referral rows in member modal */
.ref-row { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border: 1px solid var(--line); background: var(--bg-2); transition: all 0.2s var(--ease); }
.ref-row + .ref-row { margin-top: 8px; }
.ref-row .logo-tile { width: 38px; height: 38px; }
.ref-row .ri { flex: 1; min-width: 0; }
.ref-row .ri b { display: block; font-size: 14px; font-weight: 600; }
.ref-row .ri span { font-family: var(--font-mono); font-size: 10px; color: var(--tx-faint); }

/* ---------------- PROJECTS ---------------- */
.proj-toolbar { display: flex; flex-direction: column; gap: 16px; margin-bottom: 22px; }
.search-wrap { position: relative; max-width: 420px; }
.search-wrap svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--tx-faint); pointer-events: none; }
.search-wrap .input { padding-left: 40px; }
.cat-row { display: flex; gap: 8px; flex-wrap: wrap; }
.shelf { margin-bottom: 28px; }
.shelf-head { display: flex; align-items: center; gap: 10px; margin-bottom: 13px; }
.shelf-head .eyebrow { color: var(--tx-dim); }
.shelf-scroll { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(210px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.shelf-card { display: flex; align-items: center; gap: 12px; padding: 13px; }
.shelf-card .logo-tile { width: 42px; height: 42px; }
.shelf-card b { font-size: 14px; font-weight: 600; }
.shelf-card .when { font-family: var(--font-mono); font-size: 10px; color: var(--tx-faint); }

.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.p-card { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 18px; }
.p-card .p-top { display: flex; align-items: flex-start; gap: 13px; }
.p-card .logo-tile { width: 50px; height: 50px; }
.p-card .p-id { flex: 1; min-width: 0; }
.p-card h3 { margin: 0 0 6px; font-size: 17px; font-weight: 600; }
.p-card .p-desc { color: var(--tx-dim); font-size: 13px; line-height: 1.55; flex: 1; }
.p-card .p-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.p-links { display: flex; gap: 6px; }
.icon-link { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line-2); color: var(--tx-dim); transition: all 0.2s; }
.icon-link:hover { color: var(--tx); border-color: var(--line-3); }
.icon-link svg { width: 15px; height: 15px; }
.pin-btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; background: none; border: 1px solid var(--line-2); color: var(--tx-dim); cursor: pointer; transition: all 0.2s var(--ease); }
.pin-btn svg { width: 14px; height: 14px; }
.pin-btn:hover { border-color: var(--line-3); color: var(--tx); }
.pin-btn.pinned { color: var(--c-cyan); border-color: rgba(27,157,245,0.4); background: rgba(27,157,245,0.08); }
.pin-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.empty-note { text-align: center; padding: 60px 20px; color: var(--tx-faint); font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.04em; }

/* ---------------- PROFILE ---------------- */
.prof-grid { display: flex; flex-direction: column; gap: 18px; max-width: 600px; margin: 0 auto; }
.prof-grid > div:last-child { display: flex; flex-direction: column; gap: 18px; }
.prof-card { padding: 30px 26px; text-align: center; }
.prof-pfp { width: 132px; height: 132px; margin: 0 auto 16px; position: relative; border: 1px solid var(--line-2); overflow: hidden; background: var(--bg-1); }
.prof-pfp img { width: 100%; height: 100%; object-fit: cover; }
.prof-name { font-size: 24px; font-weight: 700; }
.prof-role { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--c-cyan); margin-top: 5px; }
.prof-uname { font-family: var(--font-mono); font-size: 12px; color: var(--tx-faint); margin-top: 12px; }
.prof-uname b { color: var(--tx-dim); }
.panel { padding: 24px; }
.prof-grid .panel + .panel { margin-top: 0; }
.panel + .panel { margin-top: 18px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.panel-head h2 { margin: 0; font-size: 17px; font-weight: 600; }
.panel-head .eyebrow { margin-bottom: 4px; }
.form-row { display: grid; gap: 14px; }
.form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .form-2 { grid-template-columns: 1fr; } }
.form-actions { margin-top: 16px; display: flex; gap: 10px; }

/* referral list (profile) */
.reflist { display: grid; gap: 10px; }
.refitem { display: flex; align-items: center; gap: 13px; padding: 13px 14px; border: 1px solid var(--line); background: var(--bg-2); }
.refitem .logo-tile { width: 40px; height: 40px; }
.refitem .ri { flex: 1; min-width: 0; }
.refitem .ri b { display: block; font-size: 14px; font-weight: 600; }
.refitem .ri span { font-family: var(--font-mono); font-size: 10px; color: var(--tx-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.ref-slots-note { font-family: var(--font-mono); font-size: 11px; color: var(--tx-faint); letter-spacing: 0.06em; }
.ref-empty { padding: 22px; border: 1px dashed var(--line-2); text-align: center; color: var(--tx-faint); font-family: var(--font-mono); font-size: 12px; }

/* ---------------- ADMIN ---------------- */
.admin-grid { display: grid; gap: 22px; align-items: start; }
.admin-grid .panel { max-width: 100%; }
.adm-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.adm-form .span2 { grid-column: 1 / -1; }
@media (max-width: 600px) { .adm-form { grid-template-columns: 1fr; } }
.admin-list { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
@media (max-width: 760px) { .admin-list { grid-template-columns: 1fr; } }
.admin-row { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border: 1px solid var(--line); background: var(--bg-2); transition: all 0.2s; }
.admin-row:hover { border-color: var(--line-2); }
.admin-row .logo-tile { width: 38px; height: 38px; }
.admin-row .ar { flex: 1; min-width: 0; }
.admin-row .ar b { font-size: 14px; font-weight: 600; color: var(--tx); line-height: 1.3; }
.admin-row .ar > span { display: block; font-family: var(--font-mono); font-size: 11px; color: var(--tx-dim); margin-top: 2px; }
.admin-row .del { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line-2); background: none; color: var(--tx-faint); cursor: pointer; transition: all 0.2s; }
.admin-row .del:hover { color: var(--danger); border-color: var(--danger); }
.admin-row .del svg { width: 15px; height: 15px; }
.admin-row .del:disabled { opacity: 0.35; cursor: not-allowed; }
.admin-row .del:disabled:hover { color: var(--tx-faint); border-color: var(--line-2); }

/* scroll-contained admin lists so 100+ rows don't make an endless page */
.admin-scroll { max-height: 62vh; overflow-y: auto; padding-right: 6px; }
.admin-scroll::-webkit-scrollbar { width: 8px; }
.admin-scroll::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 4px; }
.admin-scroll::-webkit-scrollbar-track { background: transparent; }

/* richer admin rows: category chips + description + meta */
.admin-row .ar-cats { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 3px; }
.mini-tag { font-family: var(--font-mono); font-size: 9px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 2px 6px; color: var(--tx-dim); border: 1px solid var(--line-2); border-radius: 3px; }
.mini-tag.muted { color: var(--tx-faint); border-style: dashed; }
.admin-row .ar .ar-desc { font-family: var(--font-display); font-size: 11.5px; color: var(--tx-dim);
  letter-spacing: 0; line-height: 1.4; margin-bottom: 3px;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; }

/* admin checkbox row + admin badge */
.admin-check { display: flex; align-items: center; gap: 9px; cursor: pointer; font-size: 13px; color: var(--tx-dim); user-select: none; }
.admin-check input { width: 16px; height: 16px; accent-color: var(--c-violet, #7b3fe4); cursor: pointer; }
.admin-badge { display: inline-block; margin-left: 8px; padding: 1px 6px; border-radius: 3px; font-family: var(--font-mono);
  font-size: 8.5px; font-weight: 700; letter-spacing: 0.1em; color: #fff; background: var(--accent-grad-h); vertical-align: middle; }

/* clearer project category tags on cards */
.p-card .p-cats { display: flex; flex-wrap: wrap; gap: 5px; }
.p-card .p-cats .tag { border-radius: 4px; }

.logo-preview { display: flex; align-items: center; gap: 12px; }
.logo-preview .logo-tile { width: 48px; height: 48px; }
.m-av, .mm-av, .prof-pfp { position: relative; overflow: visible; }
.hb-medals {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
  transform: translateY(50%);
  display: flex; justify-content: center; gap: 4px; pointer-events: none;
}
.hb-medal {
  width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(7,7,13,0.92); border: 1px solid currentColor;
  box-shadow: 0 2px 7px rgba(0,0,0,0.55), 0 0 10px -3px currentColor; pointer-events: auto;
}
.hb-medal svg { width: 11px; height: 11px; }
.hb-medals.big { gap: 6px; }
.hb-medals.big .hb-medal { width: 26px; height: 26px; }
.hb-medals.big .hb-medal svg { width: 14px; height: 14px; }
.hb-genius { color: #2ec5ff; }
.hb-supervisor { color: #9a7bff; }
.hb-curator { color: #ff5bc4; }
.hb-eventhost { color: #ffab3d; }
.hb-moderator { color: #16d39a; }
.mm-chips.hbadges { margin-top: 8px; }
.hb-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 4px 9px; border: 1px solid currentColor; background: rgba(255,255,255,0.02);
}
.hb-chip svg { width: 12px; height: 12px; }

/* segmented toggle pill (admin Projects | Tokens | Members) */
.seg {
  display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 22px;
  background: var(--bg-2); border: 1px solid var(--line);
  clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px);
}
.seg-opt {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 22px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--tx-faint); background: none; border: none; cursor: pointer; transition: all 0.2s var(--ease);
}
.seg-opt svg { width: 15px; height: 15px; }
.seg-opt:hover { color: var(--tx-dim); }
.seg-opt.on {
  background: var(--accent-grad-h); color: #fff;
  clip-path: polygon(4px 0, 100% 0, 100% calc(100% - 4px), calc(100% - 4px) 100%, 0 100%, 0 4px);
}

/* ---------------- VOTES ---------------- */
.vote-tabs { display: flex; gap: 8px; margin-bottom: 22px; }
.vote-list { display: grid; gap: 14px; }
.vote-card { padding: 20px; display: grid; gap: 16px; }
.vote-card .vc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.vote-card h3 { margin: 0 0 6px; font-size: 18px; font-weight: 600; }
.vote-card .vc-desc { color: var(--tx-dim); font-size: 13.5px; line-height: 1.55; }
.vc-state { font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; padding: 4px 9px; border: 1px solid var(--line-2); white-space: nowrap; }
.vc-state.live { color: var(--ok); border-color: rgba(22,211,154,0.4); }
.vc-state.closed { color: var(--tx-faint); }
.vc-state.passed { color: var(--ok); border-color: rgba(22,211,154,0.4); }
.vc-state.failed { color: #ff8298; border-color: rgba(255,77,109,0.4); }
.vc-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-family: var(--font-mono); font-size: 11px; color: var(--tx-faint); letter-spacing: 0.04em; }
.vc-meta b { color: var(--tx-dim); font-weight: 500; }
.vc-options { display: grid; gap: 9px; }
.vc-opt { position: relative; padding: 12px 14px; border: 1px solid var(--line-2); cursor: pointer; overflow: hidden; transition: border-color 0.2s; background: var(--bg-2); color: var(--tx); }
.vc-opt:hover { border-color: var(--line-3); }
.vc-opt.chosen { border-color: var(--c-cyan); }
.vc-opt[disabled] { cursor: default; }
.vc-opt .fill { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(123,63,228,0.16); transition: width 0.6s var(--ease); z-index: 0; }
.vc-opt.chosen .fill { background: rgba(27,157,245,0.2); }
.vc-opt .vo-row { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.vc-opt .vo-label { font-size: 14px; font-weight: 500; color: var(--tx); display: flex; align-items: center; gap: 9px; }
.vc-opt .vo-pct { font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--tx); }
.vc-opt .vo-votes { font-family: var(--font-mono); font-size: 10px; color: var(--tx-faint); }
.vc-quorum { display: grid; gap: 7px; }
.quorum-bar { position: relative; height: 8px; background: var(--bg); border: 1px solid var(--line); overflow: hidden; }
.quorum-bar .qf { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent-grad-h); transition: width 0.6s var(--ease); }
.quorum-bar .qt { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--tx); opacity: 0.7; }
.quorum-row { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 10.5px; color: var(--tx-faint); letter-spacing: 0.04em; }
.quorum-row b { color: var(--tx-dim); font-weight: 500; }
.vote-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.voted-tag { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 11px; color: var(--ok); letter-spacing: 0.06em; }
.voted-tag svg { width: 14px; height: 14px; }
.opt-builder { display: grid; gap: 8px; }
.opt-builder-row { display: flex; gap: 8px; align-items: center; }
.opt-builder-row .input { flex: 1; }
.opt-builder-row .del { width: 40px; flex: none; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line-2); background: none; color: var(--tx-faint); cursor: pointer; }
.opt-builder-row .del:hover { color: var(--danger); border-color: var(--danger); }
.opt-builder-row .del svg { width: 15px; height: 15px; }

/* ---------------- GUEST / PUBLIC ---------------- */
.guest-top { position: fixed; top: 0; left: 0; right: 0; height: var(--topbar-h); z-index: 40; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; background: rgba(7,7,13,0.9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.guest-top .tb-brand { display: flex; align-items: center; gap: 9px; }
.guest-top .tb-brand img { height: 26px; }
.guest-top .tb-brand .wm { font-weight: 600; letter-spacing: 0.24em; font-size: 14px; }
.guest-wrap { position: relative; z-index: 1; min-height: 100svh; padding: calc(var(--topbar-h) + 20px) 24px 60px; max-width: 1180px; margin: 0 auto; }
.guest-cta { margin: 40px auto 0; max-width: 560px; text-align: center; padding: 26px; position: relative; z-index: 10; }
.guest-cta h2 { font-size: clamp(22px, 3vw, 30px); font-weight: 700; margin: 0 0 10px; }
.guest-cta p { color: var(--tx-dim); line-height: 1.6; margin: 0 0 18px; }
.guest-badge { display: inline-flex; margin: 0 auto 14px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--tx-faint); padding: 4px 10px; background: var(--bg); border: 1px solid var(--line-2); }

/* ---------- legal footer links (login + sidebar) ---------- */
.login-legal { margin-top: 18px; text-align: center; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; }
.login-legal a { color: var(--tx-faint); text-decoration: none; transition: color 160ms ease; }
.login-legal a:hover { color: var(--tx); }
.login-legal span { color: var(--tx-faint); margin: 0 4px; }

.sb-legal { padding: 10px 18px 14px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; color: var(--tx-faint); text-align: center; }
.sb-legal a { color: var(--tx-faint); text-decoration: none; transition: color 160ms ease; }
.sb-legal a:hover { color: var(--tx); }
