:root{
  --bg:#0b1220;
  --card:#0f1b33;
  --muted:#9fb0d0;
  --text:#e9f0ff;
  --line:rgba(255,255,255,.08);
  --primary:#5aa7ff;
  --primary2:#2f7fff;
  --danger:#ff4d4d;
  --ok:#2fd07a;
  --shadow: 0 16px 40px rgba(0,0,0,.35);
  --radius: 18px;
  --radius2: 14px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

*{box-sizing:border-box}
body{
  margin:0;
  background: radial-gradient(1200px 600px at 20% 10%, rgba(90,167,255,.18), transparent 55%),
              radial-gradient(800px 500px at 85% 20%, rgba(47,208,122,.12), transparent 45%),
              var(--bg);
  color:var(--text);
  font-family: var(--font);
}

.page{min-height:100vh; display:flex; flex-direction:column}
.topbar{
  display:flex; align-items:center; justify-content:space-between;
  padding:18px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(0,0,0,.18);
  backdrop-filter: blur(10px);
}
.brand{display:flex; gap:12px; align-items:center}
.logo{
  width:46px; height:46px; border-radius:14px;
  display:grid; place-items:center;
  background: linear-gradient(135deg, rgba(90,167,255,.35), rgba(47,127,255,.15));
  border: 1px solid var(--line);
  font-weight: 800;
  letter-spacing:.6px;
}
.title{font-weight:800; font-size:16px}
.subtitle{color:var(--muted); font-size:12px; margin-top:2px}
.topbar-actions .link{
  color:var(--muted); text-decoration:none;
  padding:8px 10px; border-radius: 10px;
  border: 1px solid var(--line);
}
.topbar-actions .link:hover{border-color: rgba(90,167,255,.35); color:var(--text)}
.container{width:min(1100px, 92vw); margin:22px auto; display:flex; flex-direction:column; gap:16px}

.card{
  background: rgba(15,27,51,.88);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

.card h1{margin:0 0 6px 0; font-size:20px}
.card h2{margin:0 0 8px 0; font-size:16px}
.card h3{margin:0 0 10px 0; font-size:14px}
.muted{color:var(--muted); margin:0 0 10px 0; line-height:1.45}

.card-head{display:flex; gap:16px; align-items:flex-start; justify-content:space-between}
.status{min-width: 200px; text-align:right}
.progress-wrap{
  width:200px; height:10px; border-radius:999px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line);
  overflow:hidden;
}
.progress-bar{
  height:100%; width:0%;
  background: linear-gradient(90deg, var(--primary), rgba(47,208,122,.8));
  transition: width .25s ease;
}
.progress-text{color:var(--muted); margin-top:8px; font-size:12px}

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

.field{
  display:flex; flex-direction:column; gap:6px; margin:10px 0;
}
.field span{font-size:12px; color:var(--muted)}
input, textarea, select{
  width:100%;
  padding: 12px 12px;
  border-radius: var(--radius2);
  border: 1px solid var(--line);
  background: rgba(0,0,0,.22);
  color: var(--text);
  outline:none;
}
textarea{resize: vertical; min-height: 110px}
input:focus, textarea:focus, select:focus{border-color: rgba(90,167,255,.55)}
.helper{font-size:12px; color:var(--muted); margin-top:6px}

.btn{
  appearance:none;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.06);
  color: var(--text);
  border-radius: 14px;
  padding: 12px 14px;
  cursor:pointer;
  font-weight: 650;
}
.btn:hover{border-color: rgba(90,167,255,.35)}
.btn.primary{
  background: linear-gradient(135deg, rgba(90,167,255,.35), rgba(47,127,255,.18));
  border-color: rgba(90,167,255,.35);
}
.btn.primary:hover{border-color: rgba(90,167,255,.6)}
.btn.danger{
  background: rgba(255,77,77,.12);
  border-color: rgba(255,77,77,.25);
}
.btn.danger:hover{border-color: rgba(255,77,77,.5)}
.btn:disabled{opacity:.55; cursor:not-allowed}

.actions-grid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap:10px;
}
@media (max-width: 900px){
  .actions-grid{grid-template-columns: 1fr 1fr}
  .card-head{flex-direction:column}
  .status{text-align:left}
}
@media (max-width: 520px){
  .actions-grid{grid-template-columns: 1fr}
}

.app{
  display:grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 14px;
}
@media (max-width: 900px){
  .app{grid-template-columns: 1fr}
}

.nav{
  border:1px solid var(--line);
  border-radius: var(--radius2);
  padding: 12px;
  background: rgba(0,0,0,.18);
}
.nav .step{
  padding:10px;
  border-radius: 12px;
  border: 1px solid transparent;
  color: var(--muted);
  cursor:pointer;
  margin-bottom: 8px;
}
.nav .step.active{
  border-color: rgba(90,167,255,.4);
  color: var(--text);
  background: rgba(90,167,255,.10);
}
.nav .step.done{
  color: rgba(47,208,122,.9);
}
.nav .step:last-child{margin-bottom:0}

.panel{
  border:1px solid var(--line);
  border-radius: var(--radius2);
  padding: 14px;
  background: rgba(0,0,0,.18);
}

.panel-title{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
}
.panel-title .tag{
  font-size:12px;
  color: var(--muted);
  border:1px solid var(--line);
  padding:6px 10px;
  border-radius:999px;
  background: rgba(255,255,255,.05);
}

.panel-actions{
  display:flex; gap:10px; justify-content:flex-end; margin-top: 12px;
}

.alert{
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.06);
  margin: 10px 0;
}
.alert.error{
  border-color: rgba(255,77,77,.35);
  background: rgba(255,77,77,.10);
}
.toast{
  position: fixed;
  right: 16px;
  bottom: 16px;
  padding: 12px 14px;
  background: rgba(0,0,0,.55);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  max-width: min(520px, 90vw);
  z-index: 50;
}
.textarea{
  width:100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.22);
  color: var(--text);
  padding: 12px;
}
.footer{
  margin-top:auto;
  padding: 18px 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align:center;
}