:root{
  color-scheme: dark;
  --bg:#0b0c10;
  --fg:rgba(255,255,255,.92);
  --muted:rgba(255,255,255,.62);
  --line:rgba(255,255,255,.12);
  --card:rgba(255,255,255,.06);
  --accent:#a855f7;
  --danger:#ef4444;
  --ok:#22c55e;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(900px 520px at 25% 0%, rgba(168,85,247,.12), transparent 55%), var(--bg);
  color: var(--fg);
}

a{ color:inherit; text-decoration:none; }

.topbar{
  position:sticky; top:0; z-index:20;
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:14px 16px;
  border-bottom:1px solid var(--line);
  backdrop-filter: blur(12px);
  background: rgba(0,0,0,.35);
}

.brand{ display:flex; gap:12px; align-items:center; }
.logo{
  width:40px; height:40px; border-radius:14px;
  display:grid; place-items:center;
  border:1px solid var(--line);
  background: rgba(255,255,255,.06);
  font-weight:900;
}
.title{ font-weight:900; letter-spacing:-.02em; }
.sub{ font-size:12px; color: var(--muted); margin-top:2px; }

.topActions{ display:flex; gap:8px; flex-wrap:wrap; }
.chip{
  padding:10px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.08);
  font-weight:800;
  cursor:pointer;
}
.chip:hover{ background: rgba(255,255,255,.12); }
.chip.ghost{ background: transparent; }
.chip.primary{ border-color: rgba(168,85,247,.35); background: rgba(168,85,247,.18); }
.chip.danger{ border-color: rgba(239,68,68,.35); background: rgba(239,68,68,.14); }

.card{
  width:min(920px, 92vw);
  margin: 28px auto;
  padding: 18px;
  border:1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.06);
}

.login h2{ margin:0 0 10px; }
.muted{ color: var(--muted); }
.msg{ margin-top:12px; font-size:13px; color: var(--muted); }

.grid2{ display:grid; grid-template-columns: 1fr 1fr; gap:12px; }
.grid3{ display:grid; grid-template-columns: 1fr 1fr 1fr; gap:12px; }
@media (max-width: 920px){
  .grid2,.grid3{ grid-template-columns: 1fr; }
}

.field label{ display:block; font-size:12px; color: var(--muted); margin-bottom:6px; }
.input, .textarea, .select{
  width:100%;
  border-radius: 14px;
  border:1px solid rgba(255,255,255,.16);
  background: rgba(0,0,0,.30);
  color: var(--fg);
  padding: 12px 12px;
  outline:none;
}
.textarea{ resize: vertical; line-height:1.55; }
.select{ cursor:pointer; }
.hint{ font-size:12px; margin-bottom:8px; }

.btn{
  border-radius: 14px;
  border:1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.08);
  color: var(--fg);
  padding: 12px 12px;
  cursor:pointer;
  font-weight:900;
}
.btn:hover{ background: rgba(255,255,255,.12); }
.btn.ghost{ background: transparent; }
.btn.small{ padding: 10px 10px; font-size:12px; }

.row{ display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.hidden{ display:none !important; }

.app{
  height: calc(100% - 70px);
  display:grid;
  grid-template-columns: 330px 1fr;
}

.side{
  border-right:1px solid var(--line);
  padding: 14px;
  background: rgba(0,0,0,.22);
  backdrop-filter: blur(12px);
  min-height: calc(100vh - 70px);
}

.sideHead{ display:flex; flex-direction:column; gap:12px; }
.who{ display:flex; gap:8px; flex-wrap:wrap; }
.pill{
  padding:8px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  font-size:12px;
}
.pill.faint{ opacity:.7; }

.controls{ display:grid; grid-template-columns: 1fr 1fr; gap:10px; }
.controls .input{ grid-column: 1 / -1; }

.list{
  margin-top: 14px;
  display:grid;
  gap:10px;
}

.item{
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  border-radius: 16px;
  padding: 12px;
  cursor:pointer;
}
.item:hover{ background: rgba(255,255,255,.10); }
.item.active{ border-color: rgba(168,85,247,.35); background: rgba(168,85,247,.14); }
.item .t{ font-weight:900; }
.item .m{ font-size:12px; color: var(--muted); margin-top:4px; }
.badges{ margin-top:8px; display:flex; gap:6px; flex-wrap:wrap; }
.badge{
  font-size:11px;
  padding:4px 8px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  opacity:.9;
}
.badge.ok{ border-color: rgba(34,197,94,.30); color: rgba(34,197,94,.95); background: rgba(34,197,94,.10); }
.badge.warn{ border-color: rgba(245,158,11,.30); color: rgba(245,158,11,.95); background: rgba(245,158,11,.10); }

.main{ padding: 14px; }
.panel{
  border:1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.06);
  padding: 16px;
}
.panelHead{
  display:flex; justify-content:space-between; align-items:flex-end; gap:10px; flex-wrap:wrap;
  padding-bottom: 12px;
  border-bottom:1px solid rgba(255,255,255,.10);
  margin-bottom: 12px;
}
.h{ font-weight:900; }
