:root{
  --bg:#0b1020;
  --panel:#111827;
  --card:#0f172a;
  --text:#e5e7eb;
  --muted:#9ca3af;
  --accent:#60a5fa;
  --danger:#ef4444;
  --border:rgba(255,255,255,.08);
}
*{box-sizing:border-box}
body{
  margin:0;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  background:linear-gradient(180deg,var(--bg),#050814);
  color:var(--text);
}
a{color:var(--accent)}
.app-header{
  position:sticky; top:0; z-index:10;
  background:rgba(17,24,39,.92);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--border);
  padding:12px 14px;
}
.brand{display:flex; gap:12px; align-items:center; margin-bottom:10px}
.logo{width:44px; height:44px}
.title{font-weight:700; font-size:18px}
.subtitle{color:var(--muted); font-size:12px}
.tabs{display:flex; gap:8px; flex-wrap:wrap}
.tab{
  border:1px solid var(--border);
  background:transparent;
  color:var(--text);
  padding:8px 10px;
  border-radius:10px;
}
.tab.active{background:rgba(96,165,250,.16); border-color:rgba(96,165,250,.35)}
.container{padding:16px; max-width:1100px; margin:0 auto}
.panel{display:none}
.panel.active{display:block}
.panel-head{display:flex; align-items:center; justify-content:space-between; gap:12px}
.actions{display:flex; gap:8px; flex-wrap:wrap}
h2{margin:6px 0 14px}
button{cursor:pointer}
.primary{
  background:var(--accent);
  color:#0b1020;
  border:none;
  padding:10px 12px;
  border-radius:12px;
  font-weight:700;
}
.ghost{
  border:1px solid var(--border);
  background:transparent;
  color:var(--text);
  padding:10px 12px;
  border-radius:12px;
}
.icon-btn{
  border:1px solid var(--border);
  background:transparent;
  color:var(--text);
  width:34px; height:34px;
  border-radius:10px;
}
.filters{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:10px;
  align-items:end;
  padding:12px;
  border:1px solid var(--border);
  border-radius:14px;
  background:rgba(15,23,42,.6);
  margin-bottom:12px;
}
@media (max-width: 860px){
  .filters{grid-template-columns:repeat(2,minmax(0,1fr))}
}
label{display:grid; gap:6px; font-size:12px; color:var(--muted)}
input, select, textarea{
  border:1px solid var(--border);
  background:rgba(17,24,39,.7);
  color:var(--text);
  padding:10px 10px;
  border-radius:12px;
  font-size:14px;
}
textarea{min-height:80px; resize:vertical}
.list{display:grid; gap:10px}
.item{
  border:1px solid var(--border);
  background:rgba(15,23,42,.65);
  border-radius:14px;
  padding:12px;
}
.item-top{display:flex; justify-content:space-between; gap:10px; align-items:flex-start}
.item-title{font-weight:700}
.item-sub{color:var(--muted); margin-top:4px; font-size:13px}
.item-meta{color:var(--muted); font-size:12px}
.item-actions{display:flex; gap:8px; flex-wrap:wrap; margin-top:10px}
.small{padding:8px 10px; border-radius:10px; font-weight:600}
.stats{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin-bottom:12px;
}
@media (max-width: 860px){
  .stats{grid-template-columns:repeat(2,minmax(0,1fr))}
}
.stat{
  border:1px solid var(--border);
  background:rgba(15,23,42,.65);
  border-radius:14px;
  padding:12px;
}
.stat .k{color:var(--muted); font-size:12px}
.stat .v{font-size:18px; font-weight:800; margin-top:6px}
.grid{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px}
@media (max-width: 860px){
  .grid{grid-template-columns:1fr}
}
.card{
  border:1px solid var(--border);
  background:rgba(15,23,42,.65);
  border-radius:14px;
  padding:12px;
}
.row{display:flex; gap:10px; flex-wrap:wrap; margin-top:10px}
.muted{color:var(--muted); font-size:13px; line-height:1.4}
.danger{border-color:rgba(239,68,68,.35)}
.danger-btn{
  background:var(--danger);
  border:none;
  color:white;
  padding:10px 12px;
  border-radius:12px;
  font-weight:800;
}
.modal.hidden{display:none}
.modal{
  position:fixed; inset:0;
  background:rgba(0,0,0,.55);
  display:flex; align-items:center; justify-content:center;
  padding:14px;
}
.modal-card{
  width:min(720px, 100%);
  border:1px solid var(--border);
  background:#0b1224;
  border-radius:16px;
  overflow:hidden;
}
.modal-head{
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 12px;
  border-bottom:1px solid var(--border);
}
#modal-body{padding:12px}
hr{border:none; border-top:1px solid var(--border); margin:12px 0}
.badge{
  display:inline-flex; align-items:center; gap:6px;
  padding:4px 8px;
  border-radius:999px;
  border:1px solid var(--border);
  background:rgba(96,165,250,.12);
  color:var(--text);
  font-size:12px;
}
