:root{
  --bg:#0b0f14;
  --panel:#0f1722;
  --panel2:#111c2a;
  --text:#e8eef8;
  --muted:#9aa8bd;
  --line:rgba(255,255,255,.10);
  --accent:#7dd3fc;
  --accent2:#a78bfa;
  --good:#34d399;
  --warn:#fbbf24;
  --bad:#fb7185;
  --shadow:0 10px 30px rgba(0,0,0,.35);
  --radius:16px;
  --radius2:22px;
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Apple Color Emoji","Segoe UI Emoji";
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family:var(--font);
  background: radial-gradient(1200px 800px at 20% -20%, rgba(125,211,252,.15), transparent 60%),
              radial-gradient(900px 600px at 110% 10%, rgba(167,139,250,.12), transparent 55%),
              var(--bg);
  color:var(--text);
}

a{ color:var(--accent); text-decoration:none; }
a:hover{ text-decoration:underline; }

.layout{
  display:grid;
  grid-template-columns: 320px 1fr;
  height:100vh;
}

.sidebar{
  border-right:1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.02), transparent 30%), var(--panel);
  padding:18px 14px;
  overflow:auto;
}

.brand{
  display:flex; gap:10px; align-items:center;
  padding:10px 12px;
  border-radius: var(--radius);
  background: rgba(255,255,255,.03);
  box-shadow: var(--shadow);
  border:1px solid var(--line);
}
.logo{
  width:40px; height:40px; border-radius:14px;
  background: radial-gradient(circle at 30% 30%, var(--accent), var(--accent2));
  box-shadow: 0 10px 24px rgba(125,211,252,.22);
}
.brand h1{
  font-size:14px;
  line-height:1.2;
  margin:0;
}
.brand .sub{ color:var(--muted); font-size:12px; margin-top:2px; }

.search{
  margin:14px 0 10px 0;
  position:sticky; top:0;
  background: linear-gradient(180deg, var(--panel) 70%, transparent);
  padding:10px 0;
  z-index:5;
}
.search input{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  background: rgba(255,255,255,.03);
  border:1px solid var(--line);
  color:var(--text);
  outline:none;
}
.search input:focus{ border-color: rgba(125,211,252,.55); box-shadow: 0 0 0 4px rgba(125,211,252,.12); }

.nav{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.nav button{
  all:unset;
  cursor:pointer;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.02);
  transition: transform .08s ease, background .15s ease, border-color .15s ease;
}
.nav button:hover{ transform: translateY(-1px); background: rgba(255,255,255,.04); }
.nav button.active{
  border-color: rgba(125,211,252,.55);
  background: linear-gradient(90deg, rgba(125,211,252,.12), rgba(167,139,250,.10));
}
.nav .title{ font-size:13px; font-weight:650; }
.nav .meta{ font-size:12px; color:var(--muted); margin-top:4px; display:flex; justify-content:space-between; }

.main{
  overflow:auto;
  padding:22px;
}

.header{
  max-width: 1100px;
  margin:0 auto;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
}
.header h2{
  margin:0;
  font-size:24px;
  letter-spacing:.2px;
}
.header .hint{
  color:var(--muted);
  font-size:13px;
  margin-top:6px;
}

.pills{ display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; }
.pill{
  font-size:12px; color:var(--muted);
  padding:7px 10px;
  border:1px solid var(--line);
  border-radius:999px;
  background: rgba(255,255,255,.02);
}

.progressWrap{
  min-width: 250px;
  padding:12px 14px;
  border-radius: var(--radius);
  background: rgba(255,255,255,.02);
  border:1px solid var(--line);
}
.progressLabel{ display:flex; justify-content:space-between; font-size:12px; color:var(--muted); margin-bottom:8px; }
.bar{
  height:10px;
  border-radius:999px;
  background: rgba(255,255,255,.06);
  overflow:hidden;
}
.bar > div{
  height:100%;
  width:0%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius:999px;
}

.content{
  max-width: 1100px;
  margin:18px auto 80px auto;
  display:flex;
  flex-direction:column;
  gap:14px;
}

.card{
  border:1px solid var(--line);
  border-radius: var(--radius2);
  background: linear-gradient(180deg, rgba(255,255,255,.02), transparent 30%), rgba(255,255,255,.015);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.cardHeader{
  padding:14px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  border-bottom:1px solid var(--line);
}
.cardHeader h3{ margin:0; font-size:14px; }
.cardHeader .small{ color:var(--muted); font-size:12px; }

.cardBody{ padding:14px 16px; }

details.section{
  border:1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.02);
  margin:10px 0;
  overflow:hidden;
}
details.section[open]{ background: rgba(255,255,255,.03); }
details.section summary{
  cursor:pointer;
  list-style:none;
  padding:12px 12px;
  display:flex; align-items:flex-start; gap:10px;
}
details.section summary::-webkit-details-marker{ display:none; }
.chk{
  margin-top:2px;
}
.sumText{ flex:1; }
.sumTitle{ font-size:13px; font-weight:650; }
.sumSub{ font-size:12px; color:var(--muted); margin-top:3px; }
.sectionContent{
  padding:0 12px 12px 12px;
  border-top:1px solid var(--line);
}
pre.text{
  white-space: pre-wrap;
  word-break: break-word;
  margin:0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size:12.5px;
  line-height:1.45;
  color: var(--text);
}
.text a{ word-break: break-all; }

.gallery{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap:10px;
  margin-top:12px;
}
.gallery img{
  width:100%;
  height:140px;
  object-fit:contain;
  background: rgba(0,0,0,.25);
  border:1px solid var(--line);
  border-radius:14px;
}

.actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:10px;
}
.btn{
  all:unset;
  cursor:pointer;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.02);
  font-size:12px;
  color:var(--text);
}
.btn:hover{ background: rgba(255,255,255,.04); }
.btn.danger{ border-color: rgba(251,113,133,.4); }
.btn.danger:hover{ background: rgba(251,113,133,.08); }

.footer{
  max-width:1100px;
  margin:20px auto 0 auto;
  color:var(--muted);
  font-size:12px;
  line-height:1.5;
  opacity:.95;
}

@media (max-width: 980px){
  .layout{ grid-template-columns: 1fr; height:auto; }
  .sidebar{ position: sticky; top:0; z-index:10; border-right:none; border-bottom:1px solid var(--line); }
  .main{ padding:16px; }
  .header{ flex-direction:column; align-items:stretch; }
  .progressWrap{ width:100%; min-width:unset; }
}
