
:root{
  --bg:#0b0f14;
  --panel:#0f1620;
  --text:#e8eef6;
  --muted:#a9b7c8;
  --line:#223044;
  --accent:#6dd6ff;
  --danger:#ff6d6d;
  --good:#53e0a3;
  --warn:#ffcc66;
  --shadow:0 10px 24px rgba(0,0,0,.32);
  --radius:16px;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color:var(--text);
  background:
    radial-gradient(900px 520px at 20% 0%, rgba(109,214,255,.10), transparent 60%),
    radial-gradient(900px 520px at 100% 10%, rgba(83,224,163,.07), transparent 55%),
    var(--bg);
}
.topbar{
  position:sticky; top:0; z-index:10;
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 18px;
  border-bottom:1px solid rgba(255,255,255,.06);
  background: rgba(11,15,20,.75);
  backdrop-filter: blur(10px);
}
.brand{display:flex; align-items:center; gap:12px}
.logo{width:40px;height:40px}
.brandText{display:flex; flex-direction:column; gap:2px}
.wordmark{height:18px; width:auto}
.brand-sub{font-size:12px; color:var(--muted)}
.topbar-actions{display:flex; gap:10px; align-items:center; flex-wrap:wrap; justify-content:flex-end}
select,input{
  background: rgba(255,255,255,.04);
  color: var(--text);
  border: 1px solid rgba(255,255,255,.10);
  padding:10px;
  border-radius:12px;
  outline:none;
}
select:focus,input:focus{border-color: rgba(109,214,255,.55); box-shadow: 0 0 0 3px rgba(109,214,255,.12);}
.btn{
  border:1px solid rgba(255,255,255,.12);
  background: rgba(109,214,255,.12);
  color: var(--text);
  padding:10px 12px;
  border-radius:12px;
  cursor:pointer;
  transition: background .15s ease, border-color .15s ease, transform .04s ease;
  font-weight:800;
}
.btn:hover{background: rgba(109,214,255,.18); border-color: rgba(109,214,255,.35)}
.btn:active{transform: translateY(1px)}
.btn:disabled{opacity:.45; cursor:not-allowed}
.btn.ghost{background: rgba(255,255,255,.04)}
.btn.danger{border-color: rgba(255,109,109,.35); background: rgba(255,109,109,.12)}
.btn.danger:hover{background: rgba(255,109,109,.18)}
.grid{display:grid; grid-template-columns: 520px 1fr; gap:16px; padding:16px}
@media (max-width:1100px){.grid{grid-template-columns:1fr}}
.panel,.canvasPanel{
  background: rgba(15,22,32,.72);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.panel{padding:16px}
h2{margin:0 0 10px 0}
.formRow{display:flex; flex-direction:column; gap:8px; margin-bottom:12px}
label{font-size:13px; color: var(--muted)}
.twoCol{display:grid; grid-template-columns: 1fr 1fr; gap:10px}
.advanced{border:1px solid rgba(255,255,255,.08); border-radius:12px; padding:10px; background: rgba(255,255,255,.03); margin-bottom:14px}
.advanced summary{cursor:pointer; font-weight:800; margin-bottom:8px}
.toolbar{display:flex; justify-content:space-between; align-items:flex-start; gap:12px}
.toolbar h3{margin:0}
.muted{color:var(--muted); font-size:12px; margin:4px 0 0 0; line-height:1.35}
.tableWrap{overflow:auto; border-radius:12px; border:1px solid rgba(255,255,255,.08); margin-top:10px}
table{width:100%; border-collapse:collapse; min-width: 520px}
th,td{padding:10px; border-bottom:1px solid rgba(255,255,255,.07); font-size:13px}
th{color: var(--muted); font-weight:900; text-align:left; background: rgba(255,255,255,.03)}
tr:last-child td{border-bottom:none}
td .mini{width:100%; padding:8px; border-radius:10px; border: 1px solid rgba(255,255,255,.10); background: rgba(0,0,0,.10); color: var(--text)}
.iconBtn{
  width:32px; height:32px; border-radius:10px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: var(--text);
  cursor:pointer;
}
.iconBtn:hover{border-color: rgba(255,109,109,.45); background: rgba(255,109,109,.10)}
.exports{display:grid; grid-template-columns: 1fr 1fr; gap:10px; margin-top:10px}
@media (max-width:560px){.exports{grid-template-columns:1fr}}
.note{
  margin-top:14px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:12px;
  padding:12px;
  background: rgba(83,224,163,.06);
}
.note-title{font-weight:900}
.note-body{color: var(--muted); font-size:12px; margin-top:6px; line-height:1.45}
.canvasPanel{padding:16px; display:flex; flex-direction:column; min-height:72vh}
.canvasTop{display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:10px}
.stats{color: var(--muted); font-size:12px}
.pill{padding:8px 10px; border-radius:999px; border:1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04); font-size:12px}
.pill.good{border-color: rgba(83,224,163,.35); background: rgba(83,224,163,.10)}
.pill.warn{border-color: rgba(255,204,102,.45); background: rgba(255,204,102,.10)}
.pill.bad{border-color: rgba(255,109,109,.45); background: rgba(255,109,109,.10)}
.canvasWrap{
  flex:1;
  border:1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  overflow:auto;
  background: rgba(0,0,0,.18);
  position:relative;
}
.canvasWrap.horizontal{overflow:auto}
.svgHost{min-height:100%; display:flex; align-items:flex-start; justify-content:flex-start; padding:14px}
.svgHost.horizontal{align-items:flex-start; justify-content:flex-start}
.empty{padding:28px; text-align:center; max-width:420px; margin:auto}
.emptyTitle{font-weight:900; font-size:18px}
.emptySub{color: var(--muted); margin-top:6px; font-size:13px; line-height:1.4}
.footer{
  display:flex; justify-content:space-between; align-items:center;
  margin-top:12px; padding-top:12px;
  border-top:1px solid rgba(255,255,255,.08);
  font-size:12px;
}
