
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root{
  color-scheme: dark;
  --bg0:#07131f;
  --bg1:#0b2136;
  --card:#0f141b;
  --card2:#0c1016;
  --line: rgba(255,255,255,.10);
  --line2: rgba(255,255,255,.08);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.60);
  --danger: #ff4d5a;
  --ok: #28d17c;
  --blue0:#2f7bff;
  --blue1:#1f52d8;
  --shadow: 0 28px 90px rgba(0,0,0,.68);
  --r: 26px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: "Poppins", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  display:grid;
  place-items:center;
  padding: 26px;
  background:
    radial-gradient(820px 620px at 22% 12%, rgba(47,123,255,.22), transparent 60%),
    radial-gradient(820px 620px at 80% 14%, rgba(0,0,0,.35), transparent 60%),
    radial-gradient(1200px 900px at 50% 120%, rgba(0,0,0,.80), rgba(0,0,0,.25)),
    linear-gradient(180deg, var(--bg0), var(--bg1));
}

/* subtle vignette */

canvas#particles{ position:fixed; inset:0; width:100%; height:100%; z-index:0; pointer-events:none; }
body:before{
  content:"";
  position:fixed; inset:0;
  pointer-events:none;
  z-index:1;
  background: radial-gradient(circle at 50% 35%, transparent 40%, rgba(0,0,0,.55) 82%);
  opacity:.7;
}

.shell{
  width: min(420px, 100%);
  position:relative;
  z-index:2;
}

.card{
  position:relative;
  background: linear-gradient(180deg, rgba(15,20,27,.94), rgba(12,16,22,.94));
  border-radius: var(--r);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,.08);
  overflow: visible;
  padding: 62px 34px 28px;
}

.card:before{
  content:"";
  position:absolute;
  inset:-2px;
  border-radius: calc(var(--r) + 2px);
  background:
    radial-gradient(220px 220px at 25% 18%, rgba(47,123,255,.18), transparent 70%),
    radial-gradient(240px 240px at 78% 22%, rgba(255,255,255,.06), transparent 72%),
    linear-gradient(135deg, rgba(255,255,255,.10), rgba(255,255,255,0));
  filter: blur(18px);
  opacity:.55;
  pointer-events:none;
  z-index: 0;
}

.card > *{ position:relative; z-index:1; }

.avatar{
  position:absolute;
  left: 50%;
  top: -38px;
  transform: translateX(-50%);
  width: 78px;
  height: 78px;
  border-radius: 999px;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.20), rgba(255,255,255,.06) 40%, rgba(0,0,0,.55) 100%);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 18px 45px rgba(0,0,0,.65);
  display:grid;
  place-items:center;
}

.avatar:before{
  content:"";
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background: rgba(0,0,0,.40);
  border: 1px solid rgba(255,255,255,.10);
}

.avatar i{
  position:absolute;
  font-size: 22px;
  color: rgba(255,255,255,.78);
}

.h1{
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .9px;
}

.center{ text-align:center; }

.msg{
  margin-top: 8px;
  font-size: 12px;
  color: var(--danger);
  min-height: 18px;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 160ms ease, transform 160ms ease;
}
.msg.show{
  opacity: 1;
  transform: translateY(0);
}

.form{
  margin-top: 18px;
  display:flex;
  flex-direction:column;
  gap: 14px;
}

.field{
  position:relative;
  padding-top: 8px;
}

.input{
  width: 100%;
  height: 46px;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  padding: 0 42px 0 8px;
  border-bottom: 1px solid rgba(255,255,255,.16);
}

.input::placeholder{ color: rgba(255,255,255,.35); }

.field:after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:-1px;
  height: 2px;
  background: linear-gradient(90deg, rgba(47,123,255,.0), rgba(47,123,255,.75), rgba(47,123,255,.0));
  opacity: 0;
  transition: opacity 180ms ease;
}

.field.focus:after{ opacity: 1; }

.icoR{
  position:absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-35%);
  color: rgba(255,255,255,.42);
  font-size: 14px;
}

/* Inline SVG icons (CSP-friendly, no external icon fonts) */
.icoR svg,
.avatar svg{
  width: 16px;
  height: 16px;
  display: block;
  fill: currentColor;
}

.row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  margin-top: 2px;
}

.chk{
  display:flex;
  align-items:center;
  gap: 8px;
  font-size: 12px;
  color: rgba(255,255,255,.55);
  user-select:none;
}
.chk input{
  width: 14px; height: 14px;
  accent-color: var(--blue0);
}

a{
  color: rgba(255,255,255,.60);
  text-decoration:none;
  font-size: 12px;
}
a:hover{ color: rgba(255,255,255,.82); text-decoration: underline; }

.btn{
  margin: 10px auto 0;
  height: 38px;
  min-width: 112px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(47,123,255,.55);
  background: linear-gradient(180deg, rgba(47,123,255,.48), rgba(31,82,216,.48));
  color: rgba(255,255,255,.92);
  font-weight: 600;
  cursor:pointer;
  box-shadow: 0 18px 40px rgba(47,123,255,.14);
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
}
.btn:hover{ transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 22px 55px rgba(47,123,255,.18); }
.btn:active{ transform: translateY(0); }
.btn:disabled{
  opacity:.55; cursor:not-allowed; box-shadow:none;
}

.footer{
  margin-top: 26px;
  text-align:center;
  font-size: 12px;
  color: rgba(255,255,255,.45);
}
.footer a{ color: rgba(255,255,255,.68); font-weight: 500; }
.footer a:hover{ color: rgba(255,255,255,.86); }

/* captcha mock */
.cap{
  margin-top: 4px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 0 12px;
  cursor:pointer;
  user-select:none;
}
.cap .left{ display:flex; align-items:center; gap:10px; font-size:12px; color: rgba(255,255,255,.60); }
.cap .box{
  width: 16px; height: 16px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(0,0,0,.18);
}
.cap.ok{ border-color: rgba(40,209,124,.35); }
.cap.ok .box{ border-color: rgba(40,209,124,.70); background: rgba(40,209,124,.12); }
.cap .hint{ font-size: 11px; color: rgba(255,255,255,.35); }
.cap.ok .hint{ color: rgba(40,209,124,.75); }

/* toast */
.toast{
  position: fixed;
  right: 18px;
  bottom: 18px;
  background: rgba(0,0,0,.72);
  border: 1px solid rgba(255,255,255,.12);
  padding: 10px 12px;
  border-radius: 12px;
  color: rgba(255,255,255,.88);
  font-size: 13px;
  opacity:0;
  transform: translateY(10px);
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events:none;
  box-shadow: 0 14px 44px rgba(0,0,0,.60);
}
.toast.show{ opacity:1; transform: translateY(0); }

/* ---------- Admin page extras (same theme) ---------- */
.adminShell{ width: min(1120px, 100%); position:relative; z-index:2; }
.adminCard{
  background: linear-gradient(180deg, rgba(15,20,27,.94), rgba(12,16,22,.94));
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: var(--shadow);
  padding: 22px 22px;
  position:relative;
  overflow:hidden;
}
.adminCard:before{
  content:"";
  position:absolute; inset:-2px;
  background:
    radial-gradient(300px 240px at 18% 22%, rgba(47,123,255,.16), transparent 70%),
    radial-gradient(320px 260px at 78% 24%, rgba(255,255,255,.06), transparent 72%);
  filter: blur(18px);
  opacity:.55;
  pointer-events:none;
}
.adminCard > *{ position:relative; z-index:1; }

.adminTop{
  display:flex; align-items:flex-start; justify-content:space-between; gap: 18px; flex-wrap:wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.adminTitle{
  font-size: 16px;
  letter-spacing: .8px;
  font-weight: 600;
}
.adminSub{
  margin-top: 6px;
  font-size: 12px;
  color: rgba(255,255,255,.55);
  line-height: 1.45;
}
.statsRow{
  margin-top: 12px;
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
}
.statCard{
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
  border-radius: 14px;
  padding: 8px 12px;
  min-width: 110px;
}
.statLabel{
  font-size: 11px;
  color: rgba(255,255,255,.55);
  letter-spacing: .3px;
}
.statValue{
  margin-top: 2px;
  font-size: 16px;
  font-weight: 600;
}
.pills{ display:flex; gap:10px; flex-wrap:wrap; }
.pill{
  font-size: 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  padding: 7px 10px;
  color: rgba(255,255,255,.62);
  background: rgba(0,0,0,.18);
}
.grid{
  margin-top: 16px;
  display:grid;
  grid-template-columns: 360px 1fr;
  gap: 16px;
}
@media (max-width: 980px){ .grid{ grid-template-columns: 1fr; } }

.panel{
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.18);
  border-radius: 16px;
  padding: 14px;
}
.panel h3{
  margin:0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .7px;
}
.panel p{
  margin: 8px 0 0;
  font-size: 12px;
  color: rgba(255,255,255,.55);
  line-height: 1.45;
}

.adminField{
  margin-top: 12px;
  position:relative;
}
.adminField input{
  width:100%;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
  color: rgba(255,255,255,.90);
  padding: 0 12px;
  outline:none;
  font-size: 13px;
}
.adminField input:focus{ border-color: rgba(47,123,255,.55); box-shadow: 0 0 0 3px rgba(47,123,255,.12); }

.adminBtnRow{ display:flex; gap: 10px; margin-top: 12px; flex-wrap:wrap; }
.adminBtn{
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.86);
  padding: 0 12px;
  cursor:pointer;
  font-weight: 600;
}
.adminBtn.primary{
  border-color: rgba(47,123,255,.55);
  background: rgba(47,123,255,.18);
}
.adminBtn.danger{
  border-color: rgba(255,77,90,.35);
  background: rgba(255,77,90,.10);
}
.adminBtn:hover{ filter: brightness(1.05); }

.toolbar{
  margin-top: 10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  flex-wrap:wrap;
}
.filters{
  display:flex;
  gap: 8px;
  flex-wrap:wrap;
}
.pillBtn{
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.75);
  padding: 0 12px;
  cursor:pointer;
  font-size: 12px;
  font-weight: 600;
}
.pillBtn.active{
  border-color: rgba(47,123,255,.60);
  background: rgba(47,123,255,.18);
  color: rgba(255,255,255,.92);
}
.select{
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.22);
  color: rgba(255,255,255,.86);
  padding: 0 10px;
  font-size: 12px;
}

.tableWrap{
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  overflow:auto;
  max-height: 520px;
  background: rgba(0,0,0,.18);
}
table{ width:100%; border-collapse: collapse; font-size: 12px; }
thead th{
  position: sticky;
  top: 0;
  background: rgba(0,0,0,.36);
  color: rgba(255,255,255,.82);
  text-align:left;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(8px);
}
tbody td{
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  color: rgba(255,255,255,.78);
  vertical-align: top;
}
tbody tr:hover td{ background: rgba(47,123,255,.04); }
.rowExpired td{
  background: rgba(255,77,90,.08);
}
.rowSoon td{
  background: rgba(255,184,0,.08);
}
.daysBadge{
  display:inline-flex;
  align-items:center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.18);
  font-size: 11px;
  color: rgba(255,255,255,.82);
}
.daysBadge.warn{ border-color: rgba(255,184,0,.45); color: rgba(255,184,0,.95); }
.daysBadge.danger{ border-color: rgba(255,77,90,.55); color: rgba(255,77,90,.95); }
.mono{ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }

.tag{
  display:inline-flex; align-items:center; gap:8px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.20);
  font-size: 12px;
}
.tag .dot{ width:8px; height:8px; border-radius:999px; background: rgba(255,255,255,.35); }
.tag.active{ border-color: rgba(40,209,124,.25); }
.tag.active .dot{ background: rgba(40,209,124,.70); box-shadow: 0 0 0 3px rgba(40,209,124,.12); }
.tag.frozen{ border-color: rgba(255,184,0,.25); }
.tag.frozen .dot{ background: rgba(255,184,0,.75); box-shadow: 0 0 0 3px rgba(255,184,0,.12); }
.tag.revoked{ border-color: rgba(255,77,90,.25); }
.tag.revoked .dot{ background: rgba(255,77,90,.75); box-shadow: 0 0 0 3px rgba(255,77,90,.12); }

.actions{ display:flex; gap: 8px; flex-wrap:wrap; }
.mini{
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.82);
  padding: 0 10px;
  cursor:pointer;
  font-weight: 600;
  font-size: 12px;
}
.mini:hover{ filter: brightness(1.06); }
.mini.danger{ border-color: rgba(255,77,90,.35); background: rgba(255,77,90,.10); }
.note{
  margin-top: 10px;
  font-size: 12px;
  color: rgba(255,255,255,.55);
  line-height: 1.45;
}
.note.ok{ color: rgba(40,209,124,.85); }
.note.bad{ color: rgba(255,77,90,.85); }


/* ---- Autofill fix (Chrome/Edge) ---- */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus{
  -webkit-text-fill-color: rgba(255,255,255,.88) !important;
  caret-color: rgba(255,255,255,.88) !important;
  transition: background-color 9999s ease-in-out 0s;
  -webkit-box-shadow: 0 0 0px 1000px rgba(16,20,28,.78) inset !important;
  box-shadow: 0 0 0px 1000px rgba(16,20,28,.78) inset !important;
  border-color: rgba(255,255,255,.18) !important;
}

/* Firefox autofill */
input:-moz-autofill,
textarea:-moz-autofill,
select:-moz-autofill{
  box-shadow: 0 0 0px 1000px rgba(16,20,28,.78) inset !important;
  -moz-text-fill-color: rgba(255,255,255,.88) !important;
  border-color: rgba(255,255,255,.18) !important;
}


/* ---- Admin gate overlay ---- */
.gate{
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(10px);
  padding: 18px;
}
.gateCard{
  width: min(420px, 100%);
  border-radius: 20px;
  padding: 22px 20px;
  background: rgba(12,16,22,.88);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 22px 80px rgba(0,0,0,.65);
  color: rgba(255,255,255,.9);
}
.gateTitle{
  text-align:center;
  font-weight: 800;
  letter-spacing: 1.2px;
}
.gateSub{
  text-align:center;
  margin-top: 6px;
  font-size: 13px;
  color: rgba(255,255,255,.62);
}
