:root{
  --bg:#0b1020;
  --panel:#0f172a;
  --panel2:#111c36;
  --text:#e5e7eb;
  --muted:#94a3b8;
  --border:#1f2a44;
  --brand:#38bdf8;
  --danger:#ef4444;
  --btn:#1d4ed8;
  --btnText:#fff;
  --shadow:0 10px 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, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background: radial-gradient(1200px 600px at 20% 0%, rgba(56,189,248,.12), transparent 55%), var(--bg);
  color:var(--text);
}
.top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:18px 18px 10px;
  max-width:1100px;
  margin:0 auto;
}
.brand{display:flex; align-items:center; gap:12px}
.logo{
  width:44px;height:44px;border-radius:14px;
  display:grid;place-items:center;
  font-weight:800; letter-spacing:.5px;
  background: linear-gradient(135deg, rgba(56,189,248,.18), rgba(99,102,241,.18));
  border:1px solid var(--border);
}
.name{font-size:16px;font-weight:700}
.tag{font-size:13px;color:var(--muted); margin-top:2px}
.actions{display:flex; gap:10px; align-items:center}
.wrap{max-width:1100px; margin:0 auto; padding:0 18px 30px}
.card{
  background: linear-gradient(180deg, rgba(15,23,42,.92), rgba(15,23,42,.70));
  border:1px solid var(--border);
  border-radius:18px;
  box-shadow: var(--shadow);
  padding:16px;
}
.grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:16px;
}
@media (max-width: 900px){
  .grid{grid-template-columns: 1fr;}
}
.left,.right{display:flex; flex-direction:column; gap:12px}
.field{display:flex; flex-direction:column; gap:6px}
.field > span{font-size:12px; color:var(--muted)}
.input{
  width:100%;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  background: rgba(2,6,23,.45);
  color:var(--text);
  outline:none;
}
.input:focus{border-color: rgba(56,189,248,.55); box-shadow: 0 0 0 3px rgba(56,189,248,.15)}
.picker{
  width:100%;
  height:44px;
  padding:0;
  border:1px solid var(--border);
  border-radius:12px;
  background: rgba(2,6,23,.25);
}
.btn{
  border:1px solid transparent;
  background: var(--btn);
  color: var(--btnText);
  padding:10px 12px;
  border-radius:12px;
  cursor:pointer;
  font-weight:700;
}
.btn.ghost{background: transparent; border-color: var(--border); color: var(--text)}
.btn.danger{background: transparent; border-color: rgba(239,68,68,.45); color: #fecaca}
.btn:disabled{opacity:.45; cursor:not-allowed}
.rowBtns{display:flex; gap:10px; flex-wrap:wrap}
.errors{min-height:18px; color:#fca5a5; font-size:13px; white-space:pre-wrap}
.hint{margin:0; color:var(--muted); font-size:13px; line-height:1.5}

.preview{
  border-radius:16px;
  border:1px solid var(--border);
  background: rgba(2,6,23,.35);
  overflow:hidden;
}
.previewInner{
  padding:18px;
  min-height:170px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.previewTitle{font-weight:800; letter-spacing:.2px}
.previewText{font-size:14px; line-height:1.6}
.previewMeta{font-size:12px; opacity:.9}

.card2{
  background: linear-gradient(180deg, rgba(17,28,54,.85), rgba(17,28,54,.65));
  border:1px solid var(--border);
  border-radius:16px;
  padding:14px;
}
.h2{font-weight:800; margin-bottom:10px}
.contrastGrid{display:flex; flex-direction:column; gap:10px}
.contrastRow{display:flex; align-items:center; gap:10px}
.chip{width:16px;height:16px;border-radius:6px}
.contrastText{flex:1; color:var(--muted); font-size:13px}
.contrastVal{font-weight:800}
.contrastHint{color:var(--muted); font-size:12px; line-height:1.4}
