:root{
  --bg:#0b1220;
  --card:#0f1a2e;
  --line:rgba(255,255,255,.08);
  --text:#e8eefc;
  --muted:rgba(232,238,252,.7);
  --accent:#38bdf8;
  --accent2:#22c55e;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: radial-gradient(1000px 600px at 20% -20%, rgba(56,189,248,.25), transparent 60%),
              radial-gradient(900px 500px at 90% 0%, rgba(34,197,94,.18), transparent 55%),
              var(--bg);
  color:var(--text);
}

.topbar{
  position:sticky; top:0;
  display:flex; justify-content:space-between; align-items:center;
  padding:14px 18px;
  border-bottom:1px solid var(--line);
  background: rgba(11,18,32,.75);
  backdrop-filter: blur(10px);
  z-index:10;
}

.brand{display:flex; gap:12px; align-items:center}
.logo{
  width:34px; height:34px;
  border-radius:12px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: var(--shadow);
}
.brand-title{font-weight:800; letter-spacing:.4px}
.brand-sub{font-size:12px; color:var(--muted); margin-top:2px}

.env{display:flex; gap:8px; align-items:center}
.pill{
  font-size:12px;
  padding:6px 10px;
  border:1px solid var(--line);
  border-radius:999px;
  color:var(--muted);
}

.wrap{
  display:grid;
  grid-template-columns: 380px 1fr;
  gap:14px;
  padding:14px;
  max-width: 1320px;
  margin:0 auto;
}

@media (max-width: 980px){
  .wrap{grid-template-columns:1fr}
}

.card{
  background: rgba(15,26,46,.78);
  border:1px solid var(--line);
  border-radius:18px;
  padding:14px;
  box-shadow: var(--shadow);
}

.card-title{font-weight:800; margin-bottom:10px}
.muted{color:var(--muted); font-size:12px}

.field{display:flex; flex-direction:column; gap:6px; margin:10px 0}
.field > span{font-size:12px; color:var(--muted)}
input, select, textarea{
  width:100%;
  padding:10px 10px;
  border-radius:12px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.04);
  color: var(--text);
  outline:none;
}
textarea{resize:vertical}

.grid2{display:grid; grid-template-columns:1fr 1fr; gap:10px}
@media (max-width: 520px){ .grid2{grid-template-columns:1fr} }

.hr{height:1px; background:var(--line); margin:10px 0}

.btn{
  width:100%;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.05);
  color:var(--text);
  cursor:pointer;
  margin-top:8px;
}
.btn.primary{
  border-color: rgba(56,189,248,.35);
  background: rgba(56,189,248,.12);
}
.btn:hover{filter:brightness(1.06)}

.list{display:flex; flex-direction:column; gap:8px; margin-top:10px}
.item{
  border:1px solid var(--line);
  border-radius:14px;
  padding:10px;
  background: rgba(255,255,255,.03);
  cursor:pointer;
}
.item b{display:block; margin-bottom:2px}
.item small{color:var(--muted)}

.section{margin-top:14px; padding-top:10px; border-top:1px solid var(--line)}
.section h3{margin:0 0 8px 0; font-size:14px}

.actions{display:flex; gap:10px; margin-top:12px}
.actions .btn{width:auto; flex:1}

.preview{
  min-height: 320px;
  border:1px dashed rgba(255,255,255,.18);
  border-radius:16px;
  padding:12px;
  overflow:auto;
}
.preview iframe{width:100%; height:520px; border:0; border-radius:12px}
.preview img{max-width:100%; border-radius:12px; border:1px solid var(--line)}

.foot{
  padding:14px 18px;
  border-top:1px solid var(--line);
  color:var(--muted);
  text-align:center;
}
