:root{
  --bg0:#070812;
  --bg1:#0c0f2b;
  --panel:rgba(255,255,255,.06);
  --panel2:rgba(255,255,255,.09);
  --border:rgba(255,255,255,.12);
  --text:#f4f4ff;
  --muted:rgba(244,244,255,.75);
  --muted2:rgba(244,244,255,.6);

  --pink:#ff4fd8;
  --purple:#8b5cf6;
  --blue:#22d3ee;
  --green:#34d399;
  --yellow:#fbbf24;
  --red:#fb7185;

  --radius:18px;
  --shadow: 0 18px 70px rgba(0,0,0,.55);
  --max: 980px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Noto Sans", Arial;
  color:var(--text);
  background:
    radial-gradient(1200px 700px at 15% 10%, rgba(255,79,216,.23), transparent 60%),
    radial-gradient(1200px 700px at 85% 25%, rgba(34,211,238,.20), transparent 60%),
    radial-gradient(900px 600px at 55% 85%, rgba(139,92,246,.20), transparent 55%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
}

a{color:var(--text); text-decoration:none}
a:hover{text-decoration:underline}

.container{
  width:100%;
  max-width:var(--max);
  margin:0 auto;
  padding:26px 16px 40px;
}

.nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 16px;
  border:1px solid var(--border);
  border-radius:var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:900;
  letter-spacing:.3px;
}
.logo{
  width:34px;height:34px;border-radius:12px;
  background:
    radial-gradient(18px 18px at 30% 30%, rgba(255,79,216,.9), transparent 60%),
    radial-gradient(18px 18px at 70% 35%, rgba(34,211,238,.85), transparent 60%),
    radial-gradient(18px 18px at 55% 75%, rgba(139,92,246,.9), transparent 60%),
    rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.18);
  box-shadow: 0 10px 30px rgba(0,0,0,.4);
}
.badge{
  font-size:12px;
  color:var(--muted);
  border:1px solid var(--border);
  padding:4px 10px;
  border-radius:999px;
  background: rgba(0,0,0,.18);
}

.navlinks{display:flex; align-items:center; gap:14px; flex-wrap:wrap}
.navlinks a{color:var(--muted)}
.navlinks a:hover{color:var(--text)}

.grid{display:grid; gap:14px;}
.grid.two{grid-template-columns: 1.2fr .8fr;}
@media (max-width: 920px){ .grid.two{grid-template-columns: 1fr;} }

.panel{
  border:1px solid var(--border);
  border-radius:var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  padding:16px;
}

.panelHeader{
  display:flex; align-items:flex-start; justify-content:space-between; gap:14px;
  margin-bottom:10px;
}
h1,h2,h3{margin:0 0 10px}
h2{font-size:18px}
p{margin:0 0 10px; color:var(--muted); line-height:1.5}

.small{font-size:13px; color:var(--muted2)}
.kpi{display:flex; gap:10px; flex-wrap:wrap; align-items:center;}
.kpi .chip{
  border:1px solid var(--border);
  background: rgba(0,0,0,.18);
  border-radius:999px;
  padding:6px 10px;
  font-size:12px;
  color:var(--muted);
}

.row{display:flex; gap:12px}
.row > *{flex:1}
@media (max-width: 720px){ .row{flex-direction:column} }

.label{display:block; margin-bottom:6px; font-size:13px; color:var(--muted)}
.input, .textarea, .select{
  width:100%;
  border:1px solid var(--border);
  border-radius:14px;
  background: rgba(0,0,0,.22);
  color:var(--text);
  padding:10px 12px;
  outline:none;
}
.textarea{min-height:90px; resize:vertical}

.toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}
.toolbar .left, .toolbar .right{display:flex; gap:10px; flex-wrap:wrap; align-items:center}

/* Buttons: no-select */
.btn, .btn *{
  user-select:none;
  -webkit-user-select:none;
  -ms-user-select:none;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.15);
  background: rgba(0,0,0,.18);
  color:var(--text);
  cursor:pointer;
  font-weight:750;
}
.btn:hover{filter:brightness(1.08)}
.btn.primary{
  border-color: rgba(255,79,216,.35);
  background: linear-gradient(90deg, rgba(255,79,216,.18), rgba(139,92,246,.18));
}
.btn.secondary{ color:var(--muted); }
.btn.danger{
  border-color: rgba(251,113,133,.35);
  background: rgba(251,113,133,.14);
}
.btn.ghost{ background: transparent; color: var(--muted); }

/* Icon buttons */
.btn.icon{
  padding:10px;
  aspect-ratio:1/1;
}
.btn svg{
  width:18px;
  height:18px;
  display:block;
  color: currentColor;
}

.hr{
  height:1px;
  background: rgba(255,255,255,.10);
  border:0;
  margin:12px 0;
}

.notice{
  border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  padding:10px 12px;
  background: rgba(0,0,0,.18);
  color: var(--muted);
}
.notice.ok{
  border-color: rgba(52,211,153,.25);
  background: rgba(52,211,153,.12);
  color: #d1fae5;
}
.notice.err{
  border-color: rgba(251,113,133,.30);
  background: rgba(251,113,133,.12);
  color: #ffe4e6;
}

.feed{ display:grid; gap:12px; }

.post{
  border:1px solid rgba(255,255,255,.12);
  border-radius:16px;
  background: rgba(0,0,0,.16);
  padding:14px;
}
.post .meta{
  display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap;
  color:var(--muted2);
  font-size:12px;
  margin-bottom:8px;
}
.post .meta b{color:var(--text)}
.post .content{
  white-space:pre-wrap;
  line-height:1.55;
  margin-bottom:10px;
}
.post .actions{
  display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end;
}

.footer{
  margin-top:16px;
  text-align:center;
  color:var(--muted2);
  font-size:12px;
}

/* Toasts */
.toasts{
  position: fixed;
  right: 14px;
  top: 14px;
  display: grid;
  gap: 10px;
  z-index: 9999;
}
.toast{
  min-width: 260px;
  max-width: 360px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.28);
  box-shadow: 0 18px 60px rgba(0,0,0,.55);
  backdrop-filter: blur(10px);
}
.toast .t{font-weight:800; margin-bottom:2px}
.toast .d{font-size:13px; color:var(--muted)}
.toast.ok{border-color: rgba(52,211,153,.28)}
.toast.err{border-color: rgba(251,113,133,.33)}

/* Modal */
.modalOverlay{
  position:fixed; inset:0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
  display:none;
  align-items:center;
  justify-content:center;
  padding:18px;
  z-index:9998;
}
.modalOverlay.show{display:flex}
.modal{
  width:100%;
  max-width:640px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.14);
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.05));
  box-shadow: var(--shadow);
  padding:16px;
}
.modalHeader{
  display:flex; justify-content:space-between; gap:12px; align-items:flex-start;
  margin-bottom:10px;
}
.modalTitle{font-weight:900}
.modalClose{border:0; background:transparent; color:var(--muted); cursor:pointer; font-size:14px}
.modalClose:hover{color:var(--text)}
