:root{
  --bg:#0b0f17;
  --card:#121a2a;
  --muted:#95a3b8;
  --txt:#e7eefc;
  --accent:#4da3ff;
  --danger:#ff5b5b;
  --ok:#39d98a;
}

*{ box-sizing:border-box; }
body{
  margin:0; font-family:system-ui, Arial;
  background:linear-gradient(180deg, #0b0f17, #070a10);
  color:var(--txt);
}

.container{
  max-width:520px;
  margin:0 auto;
  padding:16px;
}

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:12px;
}

.brand{
  font-size:18px;
  font-weight:800;
  letter-spacing:.2px;
}

.badge{
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(77,163,255,.15);
  border:1px solid rgba(77,163,255,.35);
  color:var(--txt);
}

.card{
  background:rgba(18,26,42,.9);
  border:1px solid rgba(255,255,255,.06);
  border-radius:14px;
  padding:14px;
  box-shadow:0 10px 30px rgba(0,0,0,.25);
  margin-bottom:12px;
}

h1,h2,h3{ margin:0 0 10px; }
p{ margin:0 0 10px; color:var(--muted); }

.input{
  width:100%;
  padding:12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.18);
  color:var(--txt);
  outline:none;
}

.row{ display:flex; gap:10px; }
.row > *{ flex:1; }

.btn{
  width:100%;
  border:none;
  border-radius:12px;
  padding:12px;
  font-weight:700;
  color:#06101f;
  background:var(--accent);
  cursor:pointer;
}
.btn:disabled{ opacity:.6; cursor:not-allowed; }

.btn-secondary{
  background:transparent;
  color:var(--txt);
  border:1px solid rgba(255,255,255,.12);
}

.btn-danger{
  background:rgba(255,91,91,.14);
  color:var(--txt);
  border:1px solid rgba(255,91,91,.35);
}

.grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:10px;
}

.tile{
  padding:14px 10px;
  text-align:center;
  border-radius:14px;
  background:rgba(0,0,0,.16);
  border:1px solid rgba(255,255,255,.10);
  color:var(--txt);
  font-weight:800;
}

.tile:active{ transform:scale(.98); }

.list{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.item{
  display:flex;
  gap:10px;
  align-items:flex-start;
  justify-content:space-between;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(0,0,0,.12);
  border-radius:14px;
  padding:12px;
}

.item-title{ font-weight:800; }
.item-sub{ color:var(--muted); font-size:13px; margin-top:4px; }

.price{
  font-weight:900;
  white-space:nowrap;
}

.qty{
  display:flex;
  align-items:center;
  gap:8px;
}

.qty button{
  width:34px; height:34px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.12);
  background:transparent;
  color:var(--txt);
  font-size:18px;
}

.footerbar{
  position:sticky;
  bottom:0;
  background:rgba(7,10,16,.85);
  backdrop-filter: blur(10px);
  border-top:1px solid rgba(255,255,255,.08);
  padding:12px;
  margin-top:12px;
}

.small{ font-size:12px; color:var(--muted); }
.error{ color:var(--danger); white-space:pre-wrap; }
.ok{ color:var(--ok); white-space:pre-wrap; }

.item.added{
  border-color: rgba(57,217,138,.55);
  box-shadow: 0 0 0 2px rgba(57,217,138,.12) inset;
}

.pill{
  display:inline-block;
  font-size:12px;
  padding:4px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(0,0,0,.16);
  color:var(--txt);
}
.pill-ok{
  border-color: rgba(57,217,138,.45);
  background: rgba(57,217,138,.12);
}
