:root{
  --bg:#070b14;
  --card:rgba(12,18,34,.78);
  --card2:rgba(12,18,34,.62);
  --ink:#eaf0ff;
  --muted:#aab6d6;
  --muted2:#7f8bb0;
  --line:rgba(255,255,255,.10);

  --green:#22C55E;
  --teal:#1EAE98;
  --gold:#F4C542;
  --danger:#EF4444;

  --shadow: 0 22px 70px rgba(0,0,0,.62);
  --shadow2: 0 10px 28px rgba(0,0,0,.42);
  --radius: 24px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color:var(--ink);
  background:var(--bg);
  overflow-x:hidden;
}

/* Background */
.bg{position:fixed; inset:0; z-index:-1; overflow:hidden; pointer-events:none;}
.grid{
  position:absolute; inset:-2px;
  background:
    linear-gradient(to right, rgba(255,255,255,.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 68px 68px;
  opacity:.18;
}
.glow{
  position:absolute;
  width:780px; height:780px;
  filter: blur(85px);
  opacity:.55;
}
.glow-a{
  left:-260px; top:-320px;
  background: radial-gradient(circle, rgba(34,197,94,.55), transparent 62%);
}
.glow-b{
  right:-300px; bottom:-340px;
  background: radial-gradient(circle, rgba(30,174,152,.55), transparent 64%);
}
.noise{
  position:absolute; inset:0;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='.25'/%3E%3C/svg%3E");
  opacity:.06;
}

/* Topbar */
.topbar{
  position:fixed; inset:0 0 auto 0;
  display:flex; align-items:center; justify-content:space-between;
  padding: 14px 18px;
  background: rgba(7,11,20,.64);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
  z-index:10;
}
.brand{
  display:flex; align-items:center; gap:12px;
  text-decoration:none; color:inherit;
}
.logoRing{
  width:42px; height:42px;
  border-radius: 999px;
  padding:2px;
  background: linear-gradient(135deg, rgba(34,197,94,.95), rgba(30,174,152,.95));
  box-shadow: var(--shadow2);
}
.logoInner{
  width:100%; height:100%;
  border-radius:999px;
  display:flex; align-items:center; justify-content:center;
  background: rgba(11,18,32,.92);
  border: 1px solid rgba(255,255,255,.12);
  font-weight:900;
  letter-spacing:.5px;
}
.brandText{display:flex; flex-direction:column; line-height:1.06}
.brandName{font-weight:900; font-size:14px}
.brandTag{font-size:12px; color:var(--muted2)}
.topRight{display:flex; gap:10px; align-items:center;}
.pill{
  display:inline-flex; align-items:center; gap:10px;
  border-radius:999px;
  padding: 8px 12px;
  background: rgba(255,255,255,.045);
  border:1px solid rgba(255,255,255,.12);
  color: rgba(234,240,255,.86);
  font-size: 13px;
}
.pill .dot{
  width:8px; height:8px; border-radius:999px;
  background: var(--teal);
  box-shadow: 0 0 0 6px rgba(30,174,152,.14);
}
.iconBtn{
  width:40px; height:40px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  color: var(--ink);
  cursor:pointer;
  font-size: 16px;
  box-shadow: 0 8px 18px rgba(0,0,0,.22);
}
.iconBtn:hover{filter: brightness(1.06);}
.iconBtn:active{transform: translateY(1px);}

/* Layout */
.wrap{
  width:min(1180px, calc(100% - 34px));
  margin:0 auto;
  padding: 92px 0 44px;
}
.card{
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--card), var(--card2));
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: var(--shadow);
  overflow:hidden;
  position:relative;
}
.card::before{
  content:"";
  position:absolute; inset:-1px;
  border-radius: var(--radius);
  padding:1px;
  background: linear-gradient(135deg, rgba(34,197,94,.22), rgba(30,174,152,.16), rgba(244,197,66,.14));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events:none;
}
.head{padding: 20px 20px 12px;}
.statusRow{display:flex; gap:14px; align-items:center;}
.spinner{
  width:18px; height:18px; border-radius:999px;
  border: 2px solid rgba(255,255,255,.14);
  border-top-color: rgba(255,255,255,.9);
  animation: spin 1s linear infinite;
}
@keyframes spin{to{transform: rotate(360deg)}}
.title{margin:0; font-size: 22px; letter-spacing:-.3px;}
.subtitle{margin:5px 0 0; color: var(--muted); line-height: 1.45; max-width: 70ch;}

.banner{
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  display:flex; align-items:center; gap:10px;
}
.bDot{
  width:10px; height:10px; border-radius:999px;
  background: var(--gold);
  box-shadow: 0 0 0 6px rgba(244,197,66,.14);
}
.bannerText{color: rgba(234,240,255,.78); font-size: 13px;}

.actions{margin-top: 14px; display:flex; gap:12px; flex-wrap:wrap;}

.toolbar{
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.10);
  display:flex; gap:12px; justify-content:space-between; align-items:center;
}
.who{color: var(--muted2); font-size: 13px;}
.toolbarRight{display:flex; gap:10px; align-items:center; flex-wrap:wrap;}
.searchWrap{min-width: 260px; flex:1;}
.input{
  width:100%;
  padding: 11px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  color: var(--ink);
  outline:none;
  box-shadow: 0 10px 22px rgba(0,0,0,.18) inset;
}
.input::placeholder{color: rgba(169,180,208,.62);}
.input:focus{border-color: rgba(34,197,94,.40);}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding: 11px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  color: var(--ink);
  font-weight: 900;
  font-size: 13px;
  cursor:pointer;
  background: rgba(255,255,255,.05);
  transition: transform .12s ease, filter .12s ease, opacity .12s ease;
  box-shadow: 0 10px 22px rgba(0,0,0,.18);
}
.btn:hover{transform: translateY(-1px); filter: brightness(1.06);}
.btn:active{transform: translateY(0); filter: brightness(.98);}
.btn:disabled{opacity:.55; cursor:not-allowed; transform:none;}
.btn.primary{background: linear-gradient(135deg, rgba(34,197,94,.95), rgba(30,174,152,.95)); border-color: rgba(255,255,255,.14);}
.btn.danger{background: linear-gradient(135deg, rgba(239,68,68,.95), rgba(239,68,68,.72)); border-color: rgba(255,255,255,.14);}
.btn.ghost{background: rgba(255,255,255,.045);}

/* List */
.list{
  padding: 16px 20px 20px;
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 12px;
}
.item{
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.045);
  padding: 14px;
  display:flex;
  gap:14px;
  align-items:flex-start;
  box-shadow: 0 16px 40px rgba(0,0,0,.22);
  transition: transform .14s ease, filter .14s ease, border-color .14s ease;
}
.item:hover{transform: translateY(-2px); filter: brightness(1.03); border-color: rgba(34,197,94,.18);}
.thumb{
  width: 60px; height: 60px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.12);
  overflow:hidden;
  background: rgba(255,255,255,.06);
  display:flex; align-items:center; justify-content:center;
  flex: 0 0 auto;
  box-shadow: 0 10px 26px rgba(0,0,0,.30);
}
.thumb img{width:100%; height:100%; object-fit:cover; transform: scale(1.02);}

/* ✅ missing helper used by JS */
.thumbLetter{
  width:100%; height:100%;
  display:flex; align-items:center; justify-content:center;
  font-weight: 950;
  font-size: 20px;
  color: rgba(234,240,255,.92);
  background: rgba(255,255,255,.06);
}

.itemMain{flex: 1 1 auto; min-width: 0;}
.itemTitle{font-weight:950; font-size: 15px; margin: 1px 0 8px; letter-spacing:-.2px;}
.meta{display:flex; gap:8px; flex-wrap:wrap;}
.chip{
  font-size: 12px;
  color: rgba(234,240,255,.92);
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
}
.itemActions{display:flex; flex-direction:column; gap:10px; align-items:stretch;}
.itemActions .btn{width: 118px;}

/* Empty */
.empty{padding: 18px 20px 10px; color: var(--muted);}
.emptyTitle{font-weight:950; color: rgba(234,240,255,.92); margin-bottom: 6px;}
.emptyText{color: var(--muted);}

/* Fineprint + footer */
.fineprint{padding: 14px 20px 18px; border-top: 1px solid rgba(255,255,255,.10); color: var(--muted2); font-size: 13px;}
.footer{
  margin-top: 18px;
  padding: 18px 2px 0;
  border-top: 1px solid rgba(255,255,255,.10);
  color: var(--muted2);
  font-size: 13px;
  display:flex;
  gap: 10px;
  flex-wrap:wrap;
  align-items:center;
}
.sep{opacity:.55}
.link{color: rgba(234,240,255,.9); text-decoration:none; border-bottom: 1px dashed rgba(234,240,255,.35);}
.link:hover{border-bottom-color: rgba(234,240,255,.8);}

/* Reject modal */
.modal{
  position:fixed; inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  padding: 18px;
  background: rgba(0,0,0,.62);
  backdrop-filter: blur(12px);
  z-index: 99;
}
.modal.show{display:flex;}
.modalCard{
  width:min(560px, 100%);
  border-radius: 22px;
  background: rgba(11,18,32,.94);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.modalHead{padding: 14px 14px; display:flex; align-items:center; justify-content:space-between; border-bottom: 1px solid rgba(255,255,255,.10);}
.modalTitle{font-weight:950;}
.modalBody{padding: 14px;}
.muted{color: var(--muted2); font-size: 13px; margin-bottom: 10px;}
.textarea{
  width:100%;
  min-height: 120px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  color: var(--ink);
  outline:none;
  resize: vertical;
}
.textarea:focus{border-color: rgba(239,68,68,.35);}
.modalActions{margin-top: 12px; display:flex; justify-content:flex-end; gap: 10px;}

/* ✅ LOCK OVERLAY (simple, bulletproof) */
.lockOverlay{
  position:fixed;
  inset:0;
  z-index: 999999;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 20px;
  background: rgba(0,0,0,.62);
  backdrop-filter: blur(12px);
}
.lockOverlay.hidden{ display:none !important; }

.lockCard{
  width: min(380px, 100%);
  background: rgba(11,18,32,.94);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.lockTitle{font-size: 20px; font-weight: 900; margin-bottom: 12px;}
.lockMuted{color: var(--muted2); font-size: 13px; margin-bottom: 10px;}
.lockInput{
  width: 100%;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  color: var(--ink);
  font-size: 18px;
  outline: none;
}
.lockInput:focus{border-color: rgba(34,197,94,.40);}
.lockErr{margin-top: 8px; margin-bottom: 10px; color: var(--danger); display:none;}
.lockRow{margin-top: 14px; display:flex; justify-content:flex-end; gap: 10px;}
.lockHint{margin-top: 10px; color: rgba(234,240,255,.55); font-size: 12px;}

/* Focus */
:focus-visible{
  outline: 2px solid rgba(34,197,94,.55);
  outline-offset: 3px;
  border-radius: 14px;
}

/* Responsive */
@media (max-width: 760px){
  .wrap{width: calc(100% - 28px); padding-top: 88px;}
  .head{padding: 18px 16px 12px;}
  .list{padding: 14px 16px 16px;}
  .item{padding: 12px;}
  .itemActions{flex-direction:row;}
  .itemActions .btn{width:auto;}
  .searchWrap{min-width: 200px;}
}
