:root{
  --bg1:#061826;
  --bg2:#0b2433;
  --card:#0b1a28cc;
  --line:#16334a;
  --text:#e8f1ff;
  --muted:#9fb6cc;
  --ok:#19c37d;
  --warn:#ffb020;
  --bad:#ff4d4f;
  --btn:#173a55;
  --btn2:#0f2a40;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius: 16px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:var(--sans);
  color:var(--text);
  background:
    radial-gradient(900px 600px at 20% 30%, #1a4b7a55, transparent 60%),
    radial-gradient(900px 700px at 70% 40%, #0ea5a555, transparent 60%),
    radial-gradient(800px 700px at 55% 90%, #7c3aed33, transparent 65%),
    linear-gradient(135deg, var(--bg1), var(--bg2));
}

.topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:18px 28px;
  border-bottom:1px solid rgba(255,255,255,.06);
  background: linear-gradient(180deg, rgba(0,0,0,.25), transparent);
}
.brand-title{font-weight:700; font-size:18px; letter-spacing:.2px}
.brand-sub{color:var(--muted); font-size:12px; margin-top:2px}
.topbar-right{display:flex; gap:10px; align-items:center}

.page{max-width:1100px; margin:0 auto; padding:34px 24px 16px}

.card{
  background: var(--card);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 22px;
  backdrop-filter: blur(10px);
}

.login-card{max-width:820px; margin: 30px auto 18px}
.card-title{font-size:22px; font-weight:800; margin-bottom:6px}
.card-sub{color:var(--muted); margin-bottom:14px; line-height:1.4}
.hint{
  border:1px dashed rgba(255,255,255,.16);
  background: rgba(0,0,0,.18);
  padding:10px 12px;
  border-radius: 12px;
  color: var(--muted);
  margin-bottom:16px;
  font-size: 13px;
}

.login-row{display:grid; grid-template-columns: 1fr 240px; gap:14px}
.tg-box{
  border:1px solid rgba(255,255,255,.08);
  border-radius:14px;
  padding:14px;
  background: rgba(0,0,0,.14);
}
.tg-title{font-weight:700; margin-bottom:4px}
.tg-sub{color:var(--muted); font-size:12px; margin-bottom:10px}
.tg-widget{min-height:46px}
.side-box{
  border:1px solid rgba(255,255,255,.08);
  border-radius:14px;
  padding:14px;
  background: rgba(0,0,0,.14);
  display:flex;
  flex-direction:column;
  gap:10px;
  justify-content:center;
  align-items:flex-start;
}
.muted{color:var(--muted); font-size:12px}

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

.footer{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding: 14px 10px;
  max-width: 820px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 12px;
}
.footer .links a{color:#cfe6ff; text-decoration:none}
.footer .links a:hover{text-decoration:underline}

.pill{
  display:inline-flex;
  align-items:center;
  padding:7px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.12);
  color: var(--muted);
}
.pill.ok{border-color: rgba(25,195,125,.35); color: #bff5df}
.pill.warn{border-color: rgba(255,176,32,.35); color: #ffe0b3}
.pill.bad{border-color: rgba(255,77,79,.35); color: #ffd0d0}

.btn{
  border: 1px solid rgba(255,255,255,.14);
  background: linear-gradient(180deg, var(--btn), var(--btn2));
  color: var(--text);
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
}
.btn:hover{filter:brightness(1.08)}
.btn:active{transform: translateY(1px)}
.btn.small{padding:8px 10px; font-size:12px}
.btn.ghost{background: rgba(0,0,0,.18)}

.hidden{display:none !important}

/* Dashboard */
.dash-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}
.welcome-title{font-size:18px; font-weight:800}
.welcome-sub{color:var(--muted); font-size:12px; margin-top:2px}
.tabs{display:flex; gap:8px; flex-wrap:wrap}
.tab{
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.14);
  color: var(--muted);
  cursor:pointer;
  font-size:12px;
  font-weight:700;
}
.tab.active{
  color: var(--text);
  background: rgba(25,195,125,.12);
  border-color: rgba(25,195,125,.25);
}
.dash-body{margin-top:16px; display:grid; gap:12px}
.panel{
  border:1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.12);
  border-radius:14px;
  padding:14px;
}
.panel-title{font-weight:800; margin-bottom:10px}
.panel-title-row{display:flex; justify-content:space-between; align-items:center; gap:10px}
.code{
  font-family: var(--mono);
  font-size: 12px;
  color: #d7e9ff;
  background: rgba(0,0,0,.22);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 12px;
  overflow:auto;
  max-height: 280px;
}

/* Toast */
.toast{
  position: fixed;
  top: 20px;
  right: 20px;
  width: min(520px, calc(100% - 40px));
  background: rgba(10,20,30,.95);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 12px 14px;
  opacity: 0;
  pointer-events:none;
  transform: translateY(-8px);
  transition: all .2s ease;
}
.toast.show{
  opacity:1;
  pointer-events:auto;
  transform: translateY(0);
}
.toast.ok{border-color: rgba(25,195,125,.25)}
.toast.bad{border-color: rgba(255,77,79,.25)}
.toast.warn{border-color: rgba(255,176,32,.25)}
.toast-title{font-weight:800; margin-bottom:6px}
.toast-body{color: var(--muted); font-size: 12px; line-height: 1.35}
.toast-x{
  position:absolute;
  top: 8px;
  right: 10px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
}



/* ===========================
   Plans + Notifications
=========================== */

.plans-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap:14px;
  margin-top:12px;
}

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

.plan-card{
  display:flex;
  align-items:center;
  gap:12px;
  padding:14px 14px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
}

.plan-card.current{
  border-color: rgba(46, 204, 113, 0.45);
  box-shadow: 0 0 0 2px rgba(46,204,113,0.10) inset;
}

.plan-ico{
  width:38px;
  height:38px;
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.10);
}

.plan-meta{ flex:1; min-width: 0; }
.plan-title{ font-weight: 700; }
.plan-sub{ font-size: 12px; margin-top:2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plan-right{ display:flex; align-items:center; gap:10px; }
.plan-badge{
  font-size: 12px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
}

.plan-current{ display:flex; align-items:center; gap:10px; margin-top:6px; }

.section-title{
  font-weight:700;
  margin-bottom:10px;
}

.pay-card .pay-head{ margin-bottom:12px; }
.pay-title{ font-weight:700; font-size: 18px; }
.pay-row{
  display:grid;
  grid-template-columns: 1fr 2fr auto;
  gap:12px;
  margin-top:12px;
  align-items:end;
}
.pay-col{ min-width:0; }
.pay-actions{ display:flex; justify-content:flex-end; align-items:center; gap:10px; }

.input{
  width:100%;
  height:40px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.20);
  color:#fff;
  padding:0 12px;
  outline:none;
}
.input:focus{
  border-color: rgba(255,255,255,0.28);
}

.note{
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
}
.note.warn{
  border-color: rgba(255, 193, 7, 0.35);
  background: rgba(255, 193, 7, 0.06);
}
.note-title{ font-weight:700; margin-bottom:4px; }
.error{ border-color: rgba(231,76,60,0.4)!important; background: rgba(231,76,60,0.06)!important; }

.notif{
  padding:14px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.notif:last-child{ border-bottom:none; }
.notif.read{ opacity: 0.72; }
.notif-head{ display:flex; justify-content:space-between; gap:12px; }
.notif-title{ font-weight:700; }
.notif-body{ margin-top:8px; white-space: pre-wrap; }

/* --- Added for Wallet/Referrals/Security UI --- */
.muted{opacity:.75;font-size:0.95em}
.hr{height:1px;background:rgba(0,0,0,.08);margin:16px 0}
.row{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid rgba(0,0,0,.06)}
.row:last-child{border-bottom:none}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px;align-items:center}
.badge{display:inline-block;padding:4px 10px;border-radius:999px;font-size:12px;border:1px solid rgba(0,0,0,.15);background:rgba(0,0,0,.03)}
.btn.danger{border-color:rgba(220,0,0,.45)}
