:root{
  --bg:#f8fafc;
  --text:#0f172a;
  --muted:#6b7280;
  --border:#e5e7eb;
  --panel:#ffffff;
  --accent:#2563eb;
  --accent-hover:#1d4ed8;
}
*{box-sizing:border-box}
html,body{height:100%;margin:0}
body{
  background:var(--bg);
  color:var(--text);
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  line-height:1.5;
}
a{color:var(--accent);text-decoration:none}
a:hover{text-decoration:underline}
.muted{color:var(--muted)}

header{
  position:sticky;
  top:0;
  z-index:10;
  background:var(--panel);
  border-bottom:1px solid var(--border);
}
.nav{
  margin:0 auto;
  width:min(1100px, 92vw);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 0;
  gap:12px;
}
.nav-actions{display:flex;gap:10px;align-items:center}
.user-stack{display:flex;flex-direction:column;gap:2px;line-height:1.1}
.brand{
  display:flex;
  align-items:center;
  gap:10px;
}
.electric{
  font-weight:700;
  letter-spacing:.04em;
  font-size:20px;
  text-transform:uppercase;
  color:var(--text);
}
.pill,.cta,button,.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 16px;
  border-radius:8px;
  border:1px solid var(--border);
  background:var(--accent);
  color:#fff;
  font-weight:600;
  cursor:pointer;
  transition:background .15s, border-color .15s;
  text-decoration:none;
}
.pill:hover,.cta:hover,button:hover,.btn:hover{background:var(--accent-hover);text-decoration:none}
.pill.primary{background:var(--accent)}
.pill.primary:hover{background:var(--accent-hover)}
.menu{position:relative}
.menu-toggle{
  width:40px;height:40px;
  padding:0;
  border-radius:8px;
  background:#fff;
  color:var(--text);
}
.menu-panel{
  position:absolute;
  right:0;top:46px;
  min-width:220px;
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:8px;
  padding:10px;
  display:none;
  flex-direction:column;
  gap:8px;
  box-shadow:0 8px 20px rgba(15,23,42,.08);
  z-index:20;
}
.menu-panel.active{display:flex;}
.menu-section-title{
  font-size:11px;
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:.06em;
}
.menu-link{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:8px 10px;
  border-radius:6px;
  color:var(--text);
  border:1px solid transparent;
}
.menu-link:hover{background:#f1f5f9;border-color:var(--border);text-decoration:none}
.avatar{
  width:44px;height:44px;border-radius:8px;
  background:#e2e8f0;
  display:grid;place-items:center;
  font-weight:700;
  color:var(--text);
  overflow:hidden;
}
.avatar img{width:100%;height:100%;object-fit:cover;border-radius:8px}
.credit-badge{
  padding:4px 8px;
  border:1px solid var(--border);
  border-radius:999px;
  background:#f8fafc;
  font-size:12px;
  color:var(--text);
  white-space:nowrap;
  display:inline-flex;
  align-items:center;
  gap:6px;
}
.credit-badge::before{
  content:"$";
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:16px;height:16px;
  border-radius:999px;
  background:#fde68a;
  border:1px solid #f59e0b;
  color:#92400e;
  font-size:11px;
  line-height:1;
}
.avatar-sm{width:42px;height:42px;border-radius:8px}
.avatar-lg{width:110px;height:110px;border-radius:12px}

.page{
  margin:0 auto;
  width:min(1100px, 92vw);
  padding:20px 0 40px;
  display:grid;
  gap:16px;
}
.panel,.shell,.card,.hero{
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:12px;
  padding:16px;
  box-shadow:0 1px 2px rgba(15,23,42,.04);
}
.center{text-align:center}
.actions{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin-top:12px}
.shell{
  width:min(520px, 92vw);
  margin:40px auto;
  display:grid;
  gap:12px;
}
.logo{text-align:center;display:grid;gap:6px}
.toggle{
  display:flex;
  gap:8px;
  background:#f1f5f9;
  border:1px solid var(--border);
  border-radius:8px;
  padding:6px;
}
.toggle button{
  flex:1;
  background:transparent;
  color:var(--text);
  border:1px solid transparent;
}
.toggle button.active{
  background:#fff;
  border-color:var(--border);
}
form{display:grid;gap:10px}
label{color:var(--muted);font-size:13px;display:flex;flex-direction:column;gap:6px;text-align:left}
input,select,textarea,.form-control{
  background:#fff;
  border:1px solid var(--border);
  border-radius:8px;
  padding:10px;
  color:var(--text);
  font-size:14px;
  outline:none;
  width:100%;
}
input:focus,select:focus,textarea:focus,.form-control:focus{
  border-color:#cbd5f5;
  box-shadow:0 0 0 3px rgba(37,99,235,.1);
}
textarea{min-height:80px;resize:vertical}
.msg{margin-top:10px;font-weight:600}
.error{color:#b91c1c}
.success{color:#15803d}

.hero{
  display:grid;
  grid-template-columns:1.2fr 1fr;
  gap:16px;
}
.profile{
  display:grid;
  grid-template-columns:auto 1fr;
  gap:14px;
  align-items:center;
}
.profile-details{display:grid;gap:6px}
.label{color:var(--muted);font-size:12px;letter-spacing:.04em;text-transform:uppercase}
.badges{display:flex;flex-wrap:wrap;gap:8px}
.badge{
  display:inline-flex;
  align-items:center;
  padding:4px 10px;
  border-radius:999px;
  background:#f1f5f9;
  border:1px solid var(--border);
  color:var(--text);
  font-size:12px;
}
.badge.success{background:#ecfdf3;border-color:#bbf7d0;color:#166534}
.badge.error{background:#fef2f2;border-color:#fecaca;color:#b91c1c}
.grid{display:grid;gap:14px;grid-template-columns:repeat(auto-fit, minmax(260px,1fr))}
.card h4{margin:0}
.card p{margin:0;color:var(--muted)}
.card{position:relative}
.lock{
  position:absolute;
  top:12px;right:12px;
  padding:4px 8px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#fff;
  color:var(--muted);
  font-size:11px;
}
.lock.success{border-color:#bbf7d0;color:#166534}
.card .tag{
  display:inline-flex;
  align-items:center;
  padding:3px 8px;
  border-radius:999px;
  background:#eef2ff;
  color:#1e3a8a;
  border:1px solid #e0e7ff;
  font-size:12px;
}

table{width:100%;border-collapse:collapse}
th,td{text-align:left;padding:10px 8px;border-bottom:1px solid var(--border)}
th{color:var(--muted);text-transform:uppercase;letter-spacing:.04em;font-size:11px}

.alert{
  padding:10px 12px;
  border-radius:8px;
  border:1px solid var(--border);
  background:#f8fafc;
}
.alert-danger{border-color:#fecaca;background:#fef2f2;color:#b91c1c}
.btn-block{width:100%}
.notice{
  padding:14px;
  border:1px solid var(--border);
  border-radius:8px;
  background:#f8fafc;
  color:var(--text);
}
.modal-backdrop{
  position:fixed;
  inset:0;
  background:rgba(15,23,42,.35);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:50;
  padding:20px;
}
.modal{
  width:min(1100px, 94vw);
  max-height:88vh;
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:12px;
  box-shadow:0 20px 60px rgba(15,23,42,.2);
  overflow:hidden;
  display:flex;
  flex-direction:column;
}
.modal-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:14px 16px;
  border-bottom:1px solid var(--border);
}
.modal-body{
  padding:16px;
  overflow:auto;
}
.modal-backdrop.active{display:flex;}

.hero-wrap{
  display:grid;
  gap:14px;
  text-align:left;
}
.hero-title{
  font-size:28px;
  font-weight:700;
  margin:0;
}
.hero-sub{
  margin:0;
  color:var(--muted);
}
.stat-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:12px;
}
.stat{
  padding:12px;
  border:1px solid var(--border);
  border-radius:10px;
  background:#f8fafc;
}
.stat .label{margin:0 0 6px 0}
.cta-row{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.outline-btn{
  background:#fff;
  color:var(--text);
}
.section-title{
  margin:0;
  font-size:18px;
}
.muted-block{color:var(--muted)}
.stealth-link{
  position:fixed;
  right:12px;
  bottom:12px;
  width:44px;
  height:44px;
  opacity:0;
  background:#fff;
  border-radius:10px;
  z-index:40;
}
.stealth-link:focus{
  opacity:1;
  outline:2px solid #2563eb;
  outline-offset:2px;
}

.input-group{display:grid;gap:8px}
.input-row{display:grid;grid-template-columns:1fr auto;gap:8px}
.btn-inline{width:auto}
.results,.resp{
  border:1px dashed var(--border);
  border-radius:8px;
  padding:10px;
  background:#fff;
}
.result{
  padding:8px;
  border:1px solid var(--border);
  border-radius:8px;
  margin-bottom:8px;
  background:#fff;
  display:grid;
  grid-template-columns:56px 1fr;
  gap:10px;
  align-items:center;
  cursor:pointer;
}
.result:last-child{margin-bottom:0}
.result img{
  width:56px;height:56px;border-radius:6px;object-fit:cover;background:#f1f5f9;
}
.result.selected{border-color:#c7d2fe;background:#eef2ff}
.meta{font-size:12px;color:var(--muted)}
.avatar-preview{
  width:120px;height:120px;border-radius:12px;
  background:#e2e8f0;
  border:1px solid var(--border);
  display:grid;place-items:center;
  overflow:hidden;
}
.avatar-preview img{width:100%;height:100%;object-fit:cover}

.grain,.bg-anim,.orb,.sparks,svg .bolt,.bolt,.spark{display:none}

@media(max-width:900px){
  .hero{grid-template-columns:1fr}
}
