:root{
  --bg:#0b1020;
  --panel:#111a33;
  --panel-2:#0f1730;
  --text:#e8ecff;
  --muted:#aab3dd;
  --line:rgba(255,255,255,.08);
  --brand:#7c5cff;
  --danger:#ff4d6d;
  --good:#2ee59d;
  --warn:#ffcc66;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius:14px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  background:linear-gradient(180deg, #070a14 0%, #0b1020 40%, #070a14 100%);
  color:var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
}

.app{height:100%; display:flex}
.sidebar{
  width:280px;
  background:rgba(17,26,51,.9);
  border-right:1px solid var(--line);
  padding:18px;
  display:flex;
  flex-direction:column;
  gap:16px;
}
.brand{padding:8px 10px; border:1px solid var(--line); border-radius:var(--radius); background:rgba(255,255,255,.03)}
.brand__title{font-weight:800; letter-spacing:.5px}
.brand__sub{margin-top:6px; font-size:12px; color:var(--muted)}

.nav{display:flex; flex-direction:column; gap:8px}
.nav__item{
  width:100%;
  text-align:left;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.02);
  color:var(--text);
  cursor:pointer;
}
.nav__item:hover{border-color:rgba(124,92,255,.35)}
.nav__item.is-active{background:rgba(124,92,255,.16); border-color:rgba(124,92,255,.55)}

.sidebar__footer{margin-top:auto}
.hint{border:1px solid var(--line); border-radius:var(--radius); padding:10px 12px; background:rgba(255,255,255,.02)}
.hint__title{font-size:12px; color:var(--muted); margin-bottom:6px}
.hint__text{font-size:12px; color:var(--muted); line-height:1.4}

.main{flex:1; display:flex; flex-direction:column; min-width:0}
.topbar{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 18px;
  border-bottom:1px solid var(--line);
  background:rgba(15,23,48,.7);
  backdrop-filter: blur(10px);
}
.topbar__title{font-weight:800}
.topbar__meta{font-size:12px; color:var(--muted); margin-top:4px}

.content{padding:18px; overflow:auto; flex:1}

.grid{display:grid; gap:16px}
.grid--2{grid-template-columns: 420px 1fr}
@media (max-width: 1100px){
  .grid--2{grid-template-columns:1fr}
  .sidebar{display:none}
}

.panel{
  border:1px solid var(--line);
  border-radius:var(--radius);
  background:rgba(17,26,51,.65);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.panel__head{display:flex; align-items:center; justify-content:space-between; padding:12px 14px; border-bottom:1px solid var(--line); background:rgba(255,255,255,.02)}
.panel__title{font-weight:700}
.panel__actions{display:flex; gap:8px}
.panel__body{padding:14px}

.btn{
  border:1px solid rgba(124,92,255,.45);
  background:rgba(124,92,255,.14);
  color:var(--text);
  border-radius:12px;
  padding:8px 10px;
  cursor:pointer;
}
.btn:hover{background:rgba(124,92,255,.22)}
.btn:disabled{opacity:.5; cursor:not-allowed}
.btn--ghost{border-color:var(--line); background:rgba(255,255,255,.03)}
.btn--ghost:hover{background:rgba(255,255,255,.06)}
.btn--danger{border-color:rgba(255,77,109,.5); background:rgba(255,77,109,.14)}
.btn--danger:hover{background:rgba(255,77,109,.22)}

.form{display:flex; flex-direction:column; gap:12px}
.form__row{display:flex; flex-direction:column; gap:6px}
.label{font-size:12px; color:var(--muted)}
.input, .select, .textarea{
  width:100%;
  padding:10px 10px;
  border-radius:12px;
  border:1px solid var(--line);
  background:rgba(11,16,32,.55);
  color:var(--text);
  outline:none;
}
.textarea{min-height:120px; resize:vertical; line-height:1.5}
.input:focus, .select:focus, .textarea:focus{border-color:rgba(124,92,255,.6)}

.list{display:flex; flex-direction:column; gap:8px; margin-top:10px}
.listItem{
  border:1px solid var(--line);
  border-radius:12px;
  padding:10px 10px;
  cursor:pointer;
  background:rgba(255,255,255,.02);
}
.listItem:hover{border-color:rgba(124,92,255,.35)}
.listItem.is-active{background:rgba(124,92,255,.14); border-color:rgba(124,92,255,.55)}
.listItem__title{font-weight:700; font-size:14px}
.listItem__meta{margin-top:6px; font-size:12px; color:var(--muted); display:flex; flex-wrap:wrap; gap:8px}
.badge{font-size:11px; padding:2px 8px; border-radius:999px; border:1px solid var(--line); background:rgba(255,255,255,.03)}
.badge--good{border-color:rgba(46,229,157,.35); background:rgba(46,229,157,.12)}
.badge--warn{border-color:rgba(255,204,102,.35); background:rgba(255,204,102,.12)}
.badge--danger{border-color:rgba(255,77,109,.35); background:rgba(255,77,109,.12)}

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

.step{border:1px solid var(--line); border-radius:var(--radius); padding:12px 12px; background:rgba(255,255,255,.02); margin-bottom:10px}
.step__head{display:flex; align-items:center; justify-content:space-between; gap:10px}
.step__title{font-weight:800}
.step__sub{font-size:12px; color:var(--muted); margin-top:4px}
.step__meta{display:flex; gap:8px; align-items:center; flex-wrap:wrap; justify-content:flex-end}
.step__body{margin-top:10px}

.kv{display:grid; grid-template-columns: 140px 1fr; gap:8px; font-size:12px; color:var(--muted)}
.kv b{color:var(--text); font-weight:700}

.actionsRow{display:flex; gap:8px; flex-wrap:wrap; margin-top:10px}

.output{
  border:1px dashed rgba(255,255,255,.18);
  border-radius:12px;
  padding:10px;
  background:rgba(0,0,0,.12);
  font-family: var(--mono);
  font-size:12px;
  white-space:pre-wrap;
  line-height:1.5;
}

.workflowSteps{display:flex; flex-wrap:wrap; gap:8px; margin-bottom:12px}
.workflowStep{
  border:1px solid var(--line);
  background:rgba(255,255,255,.02);
  color:var(--text);
  border-radius:999px;
  padding:6px 10px;
  cursor:pointer;
  font-size:12px;
}
.workflowStep:hover{border-color:rgba(124,92,255,.35)}
.workflowStep.is-active{background:rgba(124,92,255,.16); border-color:rgba(124,92,255,.55)}

.footer{display:flex; justify-content:space-between; gap:12px; padding:10px 18px; border-top:1px solid var(--line); color:var(--muted); font-size:12px; background:rgba(15,23,48,.7)}

.toast{position:fixed; right:14px; bottom:14px; max-width:420px; z-index:50}
.toast__item{margin-top:10px; border:1px solid var(--line); background:rgba(17,26,51,.92); padding:10px 12px; border-radius:14px; box-shadow: var(--shadow)}
.toast__title{font-weight:800}
.toast__text{margin-top:6px; font-size:12px; color:var(--muted); line-height:1.45}
