@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');

:root{
  --bg:#080b14;
  --panel:#0d121e;
  --panel-2:#121827;
  --panel-3:#171f31;
  --line:#20283a;
  --line-soft:#182033;
  --text:#e9eef8;
  --muted:#8c97ab;
  --muted-2:#657087;
  --accent:#7668f8;
  --accent-2:#5c82ff;
  --cyan:#34d6c8;
  --green:#56d78a;
  --danger:#ff6f7d;
}

*{box-sizing:border-box}
html,body{margin:0;min-height:100%}
html{background:var(--bg)}
body{
  min-width:320px;
  background:
    radial-gradient(circle at 50% -15%,rgba(32,80,105,.18),transparent 40%),
    linear-gradient(180deg,#090c15 0%,#080b14 100%);
  color:var(--text);
  font-family:'Inter',sans-serif;
  font-weight:400;
  letter-spacing:-.012em;
  -webkit-font-smoothing:antialiased;
}
button,input,textarea,select{font:inherit}
a{color:inherit;text-decoration:none}

*{
  scrollbar-width:thin;
  scrollbar-color:#39435a transparent;
}
*::-webkit-scrollbar{width:8px;height:8px}
*::-webkit-scrollbar-track{background:transparent}
*::-webkit-scrollbar-thumb{
  background:#354057;
  border:2px solid transparent;
  background-clip:padding-box;
  border-radius:999px;
}
*::-webkit-scrollbar-thumb:hover{background:#46526d;background-clip:padding-box}

.topbar{
  height:58px;
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:30px;
  padding:0 clamp(16px,2vw,30px);
  border-bottom:1px solid var(--line-soft);
  background:rgba(8,11,20,.91);
  backdrop-filter:blur(16px);
  position:sticky;
  top:0;
  z-index:30;
}
.brand{
  display:inline-flex;
  align-items:center;
  gap:9px;
  font-size:14px;
  font-weight:600;
  letter-spacing:.05em;
}
.brand-mark{
  width:9px;height:9px;border-radius:50%;
  display:inline-block;background:var(--cyan);
  box-shadow:0 0 0 3px rgba(52,214,200,.08),0 0 15px rgba(52,214,200,.42);
}
nav{display:flex;align-items:center;gap:25px}
nav a{color:var(--muted);font-size:14px;font-weight:400;transition:.16s}
nav a:hover{color:var(--text)}
.topbar form{margin:0}

.page{
  width:100%;
  max-width:none;
  margin:0;
  padding:clamp(18px,2vw,30px);
}
.hero,.workspace-head{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(420px,620px);
  align-items:end;
  gap:clamp(20px,3vw,48px);
  margin:4px 0 24px;
}
.hero h1,.workspace-head h1{
  margin:7px 0 9px;
  font-size:clamp(30px,3vw,42px);
  line-height:1.05;
  font-weight:400;
  letter-spacing:-.045em;
}
.hero p,.workspace-head p{
  max-width:740px;
  margin:0;
  color:var(--muted);
  font-size:14px;
  line-height:1.65;
}
.eyebrow{
  color:var(--cyan);
  font-size:10px;
  font-weight:600;
  letter-spacing:.18em;
  text-transform:uppercase;
}

.primary,.ghost{
  min-height:40px;
  border:1px solid transparent;
  border-radius:10px;
  padding:0 16px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  font-size:13px;
  font-weight:500;
  transition:.17s ease;
}
.primary{
  color:#fff;
  background:linear-gradient(135deg,var(--accent),var(--accent-2));
  box-shadow:0 8px 22px rgba(108,92,255,.16);
}
.primary:hover{transform:translateY(-1px);filter:brightness(1.05)}
.ghost{background:var(--panel-2);border-color:var(--line);color:var(--text)}
.ghost:hover{background:var(--panel-3)}

input,textarea{
  width:100%;
  color:var(--text);
  background:#0a0f1b;
  border:1px solid var(--line);
  border-radius:10px;
  padding:11px 13px;
  outline:none;
  transition:.17s;
}
input::placeholder,textarea::placeholder{color:#657087}
input:focus,textarea:focus{
  border-color:#52618e;
  box-shadow:0 0 0 3px rgba(118,104,248,.10);
}

.grid{display:grid;gap:16px}
.cards{grid-template-columns:repeat(auto-fit,minmax(270px,1fr))}
.card{
  background:linear-gradient(180deg,rgba(18,24,39,.94),rgba(12,17,29,.95));
  border:1px solid var(--line);
  border-radius:15px;
  padding:20px;
}
.empty{min-height:135px;display:flex;flex-direction:column;justify-content:center}
.empty h3,.project-card h3{margin:0 0 9px;font-size:16px;font-weight:500}
.empty p,.project-card p,.card small{margin:0;color:var(--muted);font-size:13px;line-height:1.6}

.target-form{
  width:100%;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:10px;
  align-items:center;
}
.target-form input{min-width:0}
.target-form .primary{white-space:nowrap}

.workspace{
  width:100%;
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(320px,360px);
  gap:14px;
  height:calc(100vh - 172px);
  min-height:610px;
}
.graph-panel,.inspector{
  min-width:0;
  border:1px solid var(--line);
  border-radius:15px;
  background:rgba(9,13,23,.9);
  overflow:hidden;
}
.graph-panel{display:flex;flex-direction:column}
.graph-toolbar{
  min-height:48px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:8px 14px;
  border-bottom:1px solid var(--line);
  color:var(--muted);
  font-size:12px;
  flex:0 0 auto;
}
#graph{
  position:relative;
  width:100%;
  min-width:0;
  flex:1 1 auto;
  min-height:0;
}
.inspector{
  padding:14px;
  display:block;
  overflow:auto;
  overscroll-behavior:contain;
}
.inspector h3{font-size:15px;font-weight:500}
.asset-list{display:flex;flex-direction:column;gap:7px;max-height:none;overflow:visible}
.asset-item{
  min-width:0;
  text-align:left;
  background:var(--panel-2);
  border:1px solid var(--line);
  color:var(--text);
  padding:11px;
  border-radius:10px;
  cursor:pointer;
}
.asset-item strong{display:block;min-width:0;font-size:12px;font-weight:500;overflow-wrap:anywhere}
.asset-type{font-size:9px}

.toasts{
  position:fixed;
  right:18px;
  top:70px;
  z-index:40;
  display:flex;
  flex-direction:column;
  gap:8px;
  width:min(360px,calc(100vw - 36px));
}
.toast{
  padding:11px 13px;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--panel-2);
  font-size:12px;
  box-shadow:0 12px 35px rgba(0,0,0,.25);
}

.split{display:grid;grid-template-columns:minmax(320px,440px) minmax(0,1fr);gap:22px}
.stack{display:flex;flex-direction:column;gap:14px}
label{display:flex;flex-direction:column;gap:8px;color:var(--muted);font-size:13px}
.row-card{display:flex;justify-content:space-between;align-items:center}
.login-wrap{min-height:calc(100vh - 130px);display:grid;place-items:center}
.login-card{width:min(390px,100%);padding:26px}
.login-card h1{font-size:28px;font-weight:400}
.admin-shell{display:grid;grid-template-columns:220px minmax(0,1fr);gap:20px}
.sidebar{
  background:var(--panel);border:1px solid var(--line);border-radius:15px;
  padding:14px;height:fit-content;display:flex;flex-direction:column;gap:6px
}
.sidebar a{padding:9px 10px;border-radius:9px;color:var(--muted);font-size:13px}
.sidebar a:hover{background:var(--panel-2);color:var(--text)}
.stat-grid{grid-template-columns:repeat(auto-fit,minmax(145px,1fr))}
table{width:100%;border-collapse:collapse}
th,td{text-align:left;padding:13px;border-bottom:1px solid var(--line);font-size:13px}
th{color:var(--muted);font-weight:500}
.table-wrap{overflow:auto}

@media(max-width:1180px){
  .workspace{grid-template-columns:minmax(0,1fr) 310px}
  .workspace-head{grid-template-columns:minmax(0,1fr) minmax(360px,500px)}
}
@media(max-width:900px){
  .page{padding:18px 14px 28px}
  .workspace-head,.hero{grid-template-columns:1fr;align-items:start}
  .workspace{grid-template-columns:1fr;height:auto;min-height:0}
  .graph-panel{height:62vh;min-height:480px}
  .inspector{max-height:none;overflow:visible}
  .target-form{grid-template-columns:minmax(0,1fr) auto}
  .split,.admin-shell{grid-template-columns:1fr}
  .topbar{grid-template-columns:auto minmax(0,1fr)}
  .topbar nav{display:none}
}
@media(max-width:560px){
  .topbar{padding:0 12px;gap:12px}
  .workspace-head h1{font-size:31px}
  .target-form{grid-template-columns:1fr}
  .target-form .primary{width:100%}
  .graph-toolbar{align-items:flex-start;flex-direction:column}
  .graph-panel{height:58vh;min-height:420px}
}
