:root{
  --bg:#0b0f16;
  --panel:rgba(255,255,255,.06);
  --panel2:rgba(255,255,255,.08);
  --border:rgba(255,255,255,.12);
  --text:rgba(255,255,255,.92);
  --muted:rgba(255,255,255,.7);
  --accent:#3aa3ff;
  --danger:#ff4d4d;
  --radius:12px;
}
*{box-sizing:border-box}
html,body{height:100%;margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;background:var(--bg);color:var(--text);overflow:hidden}
#layout{display:grid;grid-template-columns:380px 1fr;height:100%}
#sidebar{padding:14px;overflow:auto;border-right:1px solid var(--border);background:linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02))}
#main{position:relative}
#c{width:100%;height:100%;display:block}
.header{display:flex;gap:12px;align-items:center;margin-bottom:10px}
.logo{width:34px;height:34px;border-radius:10px;background:var(--accent);box-shadow:0 8px 24px rgba(58,163,255,.35)}
.h1{font-weight:800;letter-spacing:.2px}
.h2{font-size:12px;color:var(--muted)}
.card{background:var(--panel);border:1px solid var(--border);border-radius:var(--radius);padding:12px;margin-bottom:12px}
.card h3{margin:0 0 10px 0;font-size:14px}
.row{display:grid;grid-template-columns:1fr 140px;gap:10px;align-items:center;margin-bottom:10px}
.row2{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:10px}
.row3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px;margin-bottom:10px}
label{font-size:13px;color:var(--muted)}
input,select,textarea,button{
  width:100%;
  border-radius:10px;
  border:1px solid var(--border);
  background:var(--panel2);
  color:var(--text);
  padding:9px 10px;
  outline:none;
}
textarea{min-height:110px;resize:vertical}
button{cursor:pointer;font-weight:700}
button.primary{background:var(--accent);color:#071021;border-color:transparent}
button.danger{background:rgba(255,77,77,.16);border-color:rgba(255,77,77,.35);color:#ffd6d6}
button:active{transform:translateY(1px)}
#search{margin-bottom:10px}
.catalog{display:grid;grid-template-columns:1fr;gap:8px;max-height:320px;overflow:auto;padding-right:4px}
.item{
  display:flex;justify-content:space-between;align-items:center;
  gap:10px;padding:10px;border-radius:10px;border:1px solid var(--border);
  background:rgba(0,0,0,.18);
}
.item .left{display:flex;flex-direction:column;gap:2px}
.item .code{font-weight:800}
.item .meta{font-size:12px;color:var(--muted)}
.item .drag{font-size:12px;color:rgba(58,163,255,.95);font-weight:800}
.hint{font-size:12px;color:var(--muted);line-height:1.35}
#plan{width:100%;height:auto;border-radius:12px;border:1px solid var(--border);background:rgba(0,0,0,.20)}
#toast{
  position:absolute;left:12px;bottom:12px;
  padding:10px 12px;border-radius:12px;
  background:rgba(0,0,0,.55);border:1px solid rgba(255,255,255,.12);
  color:var(--text);font-size:12px;max-width:520px;display:none;
  backdrop-filter: blur(8px);
}
