:root{
  --bg0:#070a12;
  --bg1:#0b1224;
  --card: rgba(255,255,255,.06);
  --card2: rgba(255,255,255,.10);
  --text:#eaf0ff;
  --muted:#b3c0ee;
  --border: rgba(255,255,255,.12);
  --shadow: 0 18px 50px rgba(0,0,0,.45);
  --btn: rgba(255,255,255,.10);
  --btnHover: rgba(255,255,255,.16);
  --radius: 18px;
  --w: 720px;
  --focus: 0 0 0 4px rgba(114,170,255,.22);

  --accent:#2f6bff;
  --accent2:#7b3dff;
}

html[data-theme="light"]{
  --bg0:#f6f8ff;
  --bg1:#eef2ff;
  --card: rgba(0,0,0,.04);
  --card2: rgba(0,0,0,.06);
  --text:#0b1224;
  --muted:#4d587c;
  --border: rgba(0,0,0,.10);
  --shadow: 0 18px 50px rgba(11,18,36,.14);
  --btn: rgba(0,0,0,.05);
  --btnHover: rgba(0,0,0,.08);
  --focus: 0 0 0 4px rgba(47,107,255,.16);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans";
  color: var(--text);
  background:
    radial-gradient(900px 520px at 12% 12%, rgba(47,107,255,.30), transparent 60%),
    radial-gradient(900px 520px at 88% 18%, rgba(123,61,255,.22), transparent 58%),
    linear-gradient(160deg, var(--bg0), var(--bg1));
  display:flex;
  justify-content:center;
  padding: 28px 16px 40px;
}

.wrap{ width:min(var(--w), 100%); display:flex; flex-direction:column; gap:14px; }

.card{
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  overflow:hidden;
}

.topbar{ display:flex; align-items:center; justify-content:space-between; gap:10px; padding:12px; }

.brand{ display:flex; align-items:center; gap:10px; min-width:0; }
.logo{
  width:36px; height:36px; border-radius:14px;
  border:1px solid var(--border);
  background: linear-gradient(135deg, rgba(47,107,255,.35), rgba(123,61,255,.22)), rgba(255,255,255,.05);
  display:grid; place-items:center; flex:0 0 auto; position:relative; overflow:hidden;
}
.logo::after{
  content:""; position:absolute; inset:-30%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.25), transparent 55%);
  opacity:.55;
}
.logo svg{ width:18px; height:18px; z-index:1; opacity:.95; }

.btext{ min-width:0; display:flex; flex-direction:column; }
.brandTitle{ font-weight:800; letter-spacing:.2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.brandSub{ margin-top:2px; font-size:12.5px; color: var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

.actions{ display:flex; align-items:center; gap:8px; }
.iconbtn{
  display:inline-flex; align-items:center; justify-content:center;
  width:40px; height:40px; border-radius:12px;
  border:1px solid var(--border); background: var(--btn); color: var(--text);
  cursor:pointer; transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.iconbtn:hover{ background: var(--btnHover); transform: translateY(-1px); }
.iconbtn:focus-visible{ outline:none; box-shadow: var(--focus); }
.iconbtn svg{ width:18px; height:18px; }

.profile{ padding:18px 18px 10px; display:flex; gap:14px; align-items:center; }

.avatar{
  width:64px; height:64px; border-radius:18px;
  border:1px solid var(--border);
  background: var(--card);
  display:grid; place-items:center; overflow:hidden; flex:0 0 auto;
}
.avatar img{ width:100%; height:100%; object-fit:cover; display:block; }
.avatar .fallback{ font-weight:900; letter-spacing:.3px; }

.pinfo{ min-width:0; flex:1 1 auto; }
.name{ margin:0; font-size:18px; font-weight:900; letter-spacing:.2px; line-height:1.1; }
.bio{ margin:6px 0 0; color: var(--muted); font-size:13.5px; line-height:1.45; }

.badges{ padding:0 18px 16px; display:flex; flex-wrap:wrap; gap:8px; }
.badge{
  display:inline-flex; align-items:center; gap:8px;
  padding:7px 10px; border-radius:999px;
  border:1px solid var(--border); background: var(--card);
  font-size:12.5px;
}
.badge i{
  width:8px; height:8px; border-radius:999px; display:inline-block;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 0 0 4px rgba(255,255,255,.06);
}
.badge .muted{ color: var(--muted); font-weight:700; }

.links{ padding:12px; display:flex; flex-direction:column; gap:10px; }

.link{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:14px; border-radius:16px;
  border:1px solid var(--border);
  background: var(--btn);
  text-decoration:none; color: var(--text);
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
  position:relative; overflow:hidden;
}
.link::before{
  content:""; position:absolute; inset:-2px;
  background: linear-gradient(135deg, rgba(47,107,255,.25), rgba(123,61,255,.18));
  opacity:0; transition: opacity .12s ease; pointer-events:none;
}
.link:hover{ background: var(--btnHover); transform: translateY(-1px); border-color: rgba(255,255,255,.18); }
.link:hover::before{ opacity:.55; }
.link:focus-visible{ outline:none; box-shadow: var(--focus); }

.lleft{ display:flex; align-items:center; gap:12px; min-width:0; z-index:1; }
.licon{
  width:38px; height:38px; border-radius:14px;
  background: var(--card2); border:1px solid var(--border);
  display:grid; place-items:center; flex:0 0 auto;
}
.licon svg{ width:20px; height:20px; opacity:.95; }

.ltext{ min-width:0; display:flex; flex-direction:column; gap:2px; }
.ltitle{ font-weight:900; letter-spacing:.1px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.lsub{ font-size:12.5px; color: var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

.lright{ display:flex; align-items:center; gap:10px; z-index:1; flex:0 0 auto; }
.tag{
  font-size:12px; padding:6px 10px; border-radius:999px;
  border:1px solid var(--border); background: var(--card);
  color: var(--muted); font-weight:700;
}
.tag.primary{ color: var(--text); border-color: rgba(47,107,255,.35); background: rgba(47,107,255,.10); }
.tag.status{ color: var(--text); border-color: rgba(40,209,124,.35); background: rgba(40,209,124,.10); }
.tag.docs{ color: var(--text); border-color: rgba(255,206,74,.35); background: rgba(255,206,74,.10); }

.arrow{ width:16px; height:16px; opacity:.85; }

.grid2{ display:grid; grid-template-columns: 1fr 1fr; gap:10px; padding:0 12px 12px; }
.mini{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:12px 14px; border-radius:16px;
  border:1px solid var(--border); background: var(--card);
  text-decoration:none; color: var(--text);
  transition: transform .12s ease, background .12s ease;
}
.mini:hover{ transform: translateY(-1px); background: var(--card2); }
.mini:focus-visible{ outline:none; box-shadow: var(--focus); }

.mleft{ display:flex; align-items:center; gap:10px; min-width:0; }
.micon{
  width:34px; height:34px; border-radius:14px;
  border:1px solid var(--border);
  display:grid; place-items:center;
  background: rgba(255,255,255,.06);
  flex:0 0 auto;
}
.micon svg{ width:18px; height:18px; opacity:.95; }
.mtxt{ min-width:0; }
.mtitle{ font-weight:900; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.msub{ font-size:12.5px; color: var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

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

.footer{ text-align:center; color: var(--muted); font-size:12.5px; padding:8px 0 0; }

.toast{
  position: fixed; left: 50%; bottom: 18px;
  transform: translateX(-50%);
  background: rgba(0,0,0,.55);
  color:#fff;
  padding:10px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 40px rgba(0,0,0,.35);
  opacity:0; pointer-events:none;
  transition: opacity .18s ease, transform .18s ease;
  font-size:13px;
}
html[data-theme="light"] .toast{ background: rgba(11,18,36,.85); }
.toast.show{ opacity:1; transform: translateX(-50%) translateY(-6px); }
