:root{
  --bg:#0f1115;
  --card:#151824;
  --card2:#121521;
  --text:#e9ecf1;
  --muted:#9aa4b2;
  --border: rgba(255,255,255,.08);
}

*{ box-sizing:border-box; }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.container{
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

.topbar{
  display:flex;
  gap:16px;
  align-items:center;
  justify-content: space-between;
  flex-wrap: wrap;
}

h1{
  margin:0;
  font-size: 28px;
}

.search{
  display:flex;
  gap:8px;
}
.search input{
  width: 280px;
  max-width: 70vw;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0b0d12;
  color: var(--text);
}
.search button{
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  cursor:pointer;
}

.muted{
  margin-top: 10px;
  color: var(--muted);
  display:flex;
  gap:10px;
  align-items:center;
}

.pill{
  display:inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12px;
}

.empty{
  margin-top: 18px;
  padding: 14px;
  border: 1px dashed var(--border);
  border-radius: 14px;
  color: var(--muted);
}

.grid{
  margin-top: 16px;
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 850px){
  .grid{ grid-template-columns: 1fr; }
}

.card{
  display:flex;
  gap:12px;
  align-items:center;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--card), var(--card2));
}

.icon{
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.card-mid{
  flex: 1;
  min-width: 0;
}
.name{
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.meta{
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.card-right{
  display:flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.qty{
  font-weight: 800;
  font-size: 18px;
}

.qty-form{
  display:flex;
  gap: 6px;
  align-items:center;
}
.qty-form input{
  width: 110px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0b0d12;
  color: var(--text);
}
.qty-form button{
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.06);
  color: var(--text);
  cursor:pointer;
}
.typeahead{
  position: relative;
}

.suggestions{
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 50;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #0b0d12;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}

.sug{
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  background: transparent;
  border: 0;
  color: var(--text);
  cursor: pointer;
  display:flex;
  justify-content: space-between;
  gap: 10px;
}

.sug:hover{
  background: rgba(255,255,255,.06);
}

.sid{
  color: var(--muted);
  font-size: 12px;
}
