:root{
  --bg:#0b1220;
  --surface:#0f1a2b;
  --surface2:#0c1627;
  --border:rgba(255,255,255,.10);
  --text:#e6eefc;
  --muted:rgba(230,238,252,.70);
  --faint:rgba(230,238,252,.55);
  --primary:#6ee7ff;
  --accent:#a78bfa;
  --danger:#fb7185;

  --r:16px;
  --shadow: 0 8px 30px rgba(0,0,0,.35);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background: radial-gradient(1200px 600px at 20% -10%, rgba(110,231,255,.18), transparent 60%),
              radial-gradient(900px 500px at 80% 0%, rgba(167,139,250,.18), transparent 55%),
              var(--bg);
  color:var(--text);
}

.app{ min-height:100%; display:flex; flex-direction:column; }

.topbar{
  display:flex; justify-content:space-between; align-items:center;
  padding:18px 20px;
  border-bottom:1px solid var(--border);
  background: rgba(10,18,33,.7);
  backdrop-filter: blur(10px);
  position: sticky; top:0; z-index:10;
}
.brand{ display:flex; gap:12px; align-items:center; }
.logo{
  width:42px; height:42px; border-radius:14px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: var(--shadow);
}
.brandTitle{ font-weight:800; letter-spacing:-.02em; }
.brandSub{ font-size:12px; color:var(--faint); }

.right{ display:flex; align-items:center; gap:10px; }
.pill{
  border:1px solid var(--border);
  background: rgba(255,255,255,.04);
  padding:8px 10px;
  border-radius:999px;
  font-size:12px;
  color:var(--muted);
}

.layout{
  display:grid;
  grid-template-columns: 360px 1fr;
  gap:16px;
  padding:16px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

@media (max-width: 980px){
  .layout{ grid-template-columns: 1fr; }
}

.rail{ display:flex; flex-direction:column; gap:16px; }
.main{ display:flex; flex-direction:column; gap:16px; }

.card{
  border:1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  border-radius: var(--r);
  box-shadow: var(--shadow);
}
.cardTitle{
  padding:14px 16px;
  border-bottom:1px solid var(--border);
  font-weight:800;
  letter-spacing:-.01em;
}
.cardBody{ padding:16px; }

.label{
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.10em;
  color:var(--faint);
  display:block;
  margin-bottom:6px;
}

.input, .textarea, select{
  width:100%;
  border:1px solid var(--border);
  background: rgba(0,0,0,.18);
  color:var(--text);
  border-radius: 12px;
  padding:12px 12px;
  outline:none;
}
.input:focus, .textarea:focus, select:focus{
  border-color: rgba(110,231,255,.55);
  box-shadow: 0 0 0 3px rgba(110,231,255,.12);
}

.textarea{
  min-height: 260px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono","Courier New", monospace;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre;
}

.row{ display:flex; align-items:center; }
.gap{ gap:10px; flex-wrap:wrap; }

.grid2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
}
@media (max-width: 720px){
  .grid2{ grid-template-columns: 1fr; }
}

.btn{
  border:0;
  background: linear-gradient(135deg, rgba(110,231,255,.95), rgba(167,139,250,.95));
  color: #07101f;
  font-weight: 800;
  padding:10px 12px;
  border-radius: 12px;
  cursor:pointer;
}
.btn:hover{ filter: brightness(1.03); }
.btn:disabled{ opacity:.5; cursor:not-allowed; }

.btn.ghost{
  background: transparent;
  border:1px solid var(--border);
  color: var(--text);
  font-weight: 700;
}

.muted{ color:var(--muted); }
.tiny{ font-size:12px; }

.status{
  font-size:12px;
  color: var(--muted);
  padding:8px 10px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: rgba(0,0,0,.10);
}

.list{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:12px;
}

.item{
  border:1px solid var(--border);
  background: rgba(0,0,0,.12);
  border-radius: 14px;
  padding:12px;
}
.itemTitle{ font-weight:800; }
.itemSub{ color:var(--muted); font-size:12px; margin-top:4px; }
.itemRow{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-top:10px; }

.badge{
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.04);
  color: var(--muted);
}

.kv{
  display:grid;
  grid-template-columns: 90px 1fr;
  gap:10px;
  align-items:center;
}
.k{ color:var(--faint); font-size:12px; text-transform:uppercase; letter-spacing:.10em; }
.v{ color:var(--text); font-weight:700; word-break:break-word; }

.console{
  margin-top:12px;
  padding:12px;
  border-radius: 12px;
  border:1px solid var(--border);
  background: rgba(0,0,0,.18);
  min-height: 160px;
  overflow:auto;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(230,238,252,.9);
}

/* Modal */
.modalBackdrop{
  position:fixed; inset:0;
  background: rgba(0,0,0,.55);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  z-index:999;
}
.modal{
  width:min(720px, 100%);
  border:1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(15,26,43,.98), rgba(12,22,39,.98));
  box-shadow: var(--shadow);
}
.modalHeader{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:14px 16px;
  border-bottom:1px solid var(--border);
}
.modalTitle{ font-weight:900; }
.modalBody{ padding:16px; }

.hr{ height:1px; background: var(--border); margin:12px 0; }
.danger{ color: var(--danger); }
code{ color: rgba(110,231,255,.95); }