:root{
  --bg:#0b0613;
  --card:#120a22;
  --card2:#1a0f2e;
  --text:#f6f1ff;
  --muted:#b9a9d6;
  --primary:#8b5cf6;
  --primary2:#a855f7;
  --danger:#ef4444;
  --ok:#22c55e;
  --warning:#f59e0b;
  --border:rgba(255,255,255,.08);
  --shadow: 0 10px 40px rgba(0,0,0,.35);
}

*{box-sizing:border-box}
html,body{height:100%}

body{
  margin:0;
  font-family: ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,"Helvetica Neue",Arial;
  background:
    radial-gradient(1200px 600px at 20% 10%, rgba(139,92,246,.18), transparent 55%),
    radial-gradient(1000px 500px at 80% 20%, rgba(168,85,247,.16), transparent 60%),
    var(--bg);
  color:var(--text);
}

a{color:inherit;text-decoration:none}

.container{
  max-width:1100px;
  margin:0 auto;
  padding:18px;
}

/* Cards */
.card{
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  border:1px solid var(--border);
  border-radius:18px;
  box-shadow:var(--shadow);
}

/* Navbar */
.navbar{
  position:sticky; top:0; z-index:50;
  backdrop-filter: blur(14px);
  background: rgba(11,6,19,.72);
  border-bottom:1px solid var(--border);
}

.nav-inner{
  display:flex;
  align-items:center;
  gap:14px;
  justify-content:space-between;
  padding:14px 18px;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:800;
  letter-spacing:.4px;
}

.badge{
  font-size:12px;
  color:var(--muted);
  padding:4px 10px;
  border:1px solid var(--border);
  border-radius:999px;
}

/* Buttons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:10px 14px;
  border-radius:12px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.04);
  color:var(--text);
  cursor:pointer;
  transition: transform .06s ease;
}

.btn:active{transform: translateY(1px)}

.btn.primary{
  background: linear-gradient(90deg,var(--primary),var(--primary2));
  border-color:transparent;
}

.btn.danger{
  background: rgba(239,68,68,.12);
  border-color: rgba(239,68,68,.35);
}

.btn.warning{
  background: rgba(245,158,11,.12);
  border-color: rgba(245,158,11,.35);
}

/* Top right actions (mobile fit) */
.top-actions{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

@media (max-width:520px){
  .top-actions .btn{
    padding:8px 10px;
    font-size:12px;
    border-radius:10px;
  }
}

/* Grid */
.grid{display:grid;gap:14px}
.grid.cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.grid.cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.grid.cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}

@media (max-width:900px){
  .grid.cols-4{grid-template-columns:repeat(2,1fr)}
}

@media (max-width:720px){
  .grid.cols-3,.grid.cols-2{grid-template-columns:1fr}
}

/* Typography */
.h1{font-size:28px;font-weight:900;margin:0}
.h2{font-size:18px;font-weight:800;margin:0}
.p{color:var(--muted);margin:6px 0 0}

/* Inputs */
.input, select{
  width:100%;
  padding:12px 12px;
  border-radius:12px;
  background: rgba(255,255,255,.03);
  border:1px solid var(--border);
  color:var(--text);
  outline:none;
}

label{font-size:13px;color:var(--muted)}

.form-row{display:grid;gap:10px}
.form-actions{display:flex;gap:10px;flex-wrap:wrap}

/* Table */
.table{width:100%;border-collapse:collapse}
.table th,.table td{
  padding:12px 10px;
  border-bottom:1px solid var(--border);
  text-align:left
}
.table th{
  color:var(--muted);
  font-weight:700;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.8px
}

/* KPI boxes */
.kpi{padding:14px}
.kpi .val{font-size:24px;font-weight:900}
.kpi .lab{color:var(--muted);font-size:12px;margin-top:4px}

/* Alerts */
.alert{
  padding:12px 14px;
  border-radius:14px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.03);
}

.alert.success,
.alert.ok{
  border-color: rgba(34,197,94,.35);
  background: rgba(34,197,94,.09);
}

.alert.warning,
.alert.warn{
  border-color: rgba(245,158,11,.35);
  background: rgba(245,158,11,.10);
}

.alert.danger,
.alert.bad{
  border-color: rgba(239,68,68,.35);
  background: rgba(239,68,68,.10);
}

/* Footer navigation */
.footer-nav{
  position:fixed;
  left:0; right:0; bottom:0;
  background: rgba(11,6,19,.88);
  border-top:1px solid var(--border);
  backdrop-filter: blur(16px);
}

.footer-nav .wrap{
  max-width:1100px;
  margin:0 auto;
  display:flex;
  justify-content:space-around;
  padding:10px 12px;
}

.footer-nav a{
  font-size:12px;
  color:var(--muted);
  display:flex;
  flex-direction:column;
  gap:4px;
  align-items:center;
  min-width:64px;
}

.footer-nav a.active{color:var(--text)}

.nav-ico{
  font-size:16px;
  line-height:16px;
}

.spacer-bottom{padding-bottom:74px}

/* Wallet Modal */
.wallet-modal{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.6);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:9999;
}

.wallet-box{
  background:var(--card);
  padding:18px;
  border-radius:18px;
  width:92%;
  max-width:420px;
  border:1px solid var(--border);
  box-shadow: var(--shadow);
}

/* Support Floating button */
.support-float{
  position: fixed;
  right: 18px;
  bottom: 90px;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: linear-gradient(135deg,var(--primary),var(--primary2));
  color: white;
  font-size: 22px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,.10);
  z-index: 9999;
}

.support-float:active{transform:translateY(1px)}

/* =========================
   AUTH PAGES (LOGIN/REGISTER)
   ========================= */

.auth-wrap{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
}

.auth-box{
  width:100%;
  max-width:460px;
  padding:18px;
}

.auth-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
}

.auth-brand{
  display:flex;
  align-items:center;
  gap:12px;
}

.auth-circle{
  width:46px;
  height:46px;
  border-radius:999px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.06);
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  flex:0 0 auto;
}

.auth-circle img{
  width:78%;
  height:78%;
  object-fit:contain;
}

.auth-title{
  font-size:20px;
  font-weight:900;
  margin:0;
}

.auth-sub{
  color:var(--muted);
  font-size:13px;
  margin-top:2px;
}

.auth-form{
  margin-top:10px;
  display:grid;
  gap:12px;
}

.auth-links{
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin-top:10px;
  font-size:13px;
}

.auth-links a{
  color:var(--muted);
  text-decoration:underline;
}

.auth-divider{
  display:flex;
  align-items:center;
  gap:10px;
  margin:16px 0;
  color:var(--muted);
  font-size:12px;
}

.auth-divider:before,
.auth-divider:after{
  content:"";
  flex:1;
  height:1px;
  background:var(--border);
}

.auth-divider span{
  padding:2px 10px;
  border:1px solid var(--border);
  border-radius:999px;
  background:rgba(255,255,255,.03);
}

.auth-card{
  padding:14px;
  border-radius:16px;
}

@media(max-width:520px){
  .auth-box{
    max-width:520px;
    padding:16px;
  }
}

/* =========================
   TOGGLES / SWITCH
   ========================= */
.setting-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  padding:12px;
  border:1px solid var(--border);
  border-radius:14px;
  background: rgba(255,255,255,.03);
}

.switch{
  position:relative;
  width:52px;
  height:30px;
  display:inline-block;
}

.switch input{display:none}

.slider{
  position:absolute;
  cursor:pointer;
  top:0;left:0;right:0;bottom:0;
  background:rgba(255,255,255,.12);
  border:1px solid var(--border);
  transition:.2s;
  border-radius:999px;
}

.slider:before{
  position:absolute;
  content:"";
  width:22px;height:22px;
  left:4px;top:3px;
  background:linear-gradient(90deg,var(--primary),var(--primary2));
  transition:.2s;
  border-radius:999px;
}

.switch input:checked + .slider{
  background:rgba(139,92,246,.18);
}

.switch input:checked + .slider:before{
  transform:translateX(22px);
}
