
:root{
  --bg:#0b0b12;
  --text:#f3f3ff;
  --muted:#b7b7d6;
  --border:rgba(255,255,255,.10);
  --radius:16px;
  --gold:#f59e0b;
  --danger:#ef4444;
  --ok:#22c55e;
}

*{ box-sizing:border-box; }

body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial;
  background:
    radial-gradient(1000px 600px at 10% 10%, rgba(124,58,237,.18), transparent 60%),
    radial-gradient(900px 500px at 90% 20%, rgba(245,158,11,.12), transparent 55%),
    #0b0b12;
  color:var(--text);
}

a{ color:inherit; text-decoration:none; }

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:14px 16px;
  border-bottom:1px solid var(--border);
  position:sticky; top:0;
  background:rgba(11,11,18,.85);
  backdrop-filter: blur(10px);
  z-index:10;
}

.brand{ display:flex; align-items:center; gap:10px; }
.logo{
  width:40px; height:40px;
  display:flex; align-items:center; justify-content:center;
  background:linear-gradient(135deg, rgba(124,58,237,.35), rgba(245,158,11,.25));
  border:1px solid var(--border);
  border-radius:14px;
  font-size:20px;
}
.brandName{ font-weight:900; letter-spacing:.3px; }
.brandSub{ font-size:12px; color:var(--muted); margin-top:2px; }

.nav{ display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.navLink{
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.04);
  font-size:14px;
  position:relative;
}
.navLink.active{ border-color: rgba(124,58,237,.6); }
.navBtn{
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(245,158,11,.45);
  background:linear-gradient(180deg, rgba(245,158,11,.20), rgba(245,158,11,.06));
  font-weight:700;
  font-size:14px;
}

.badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:20px;
  height:20px;
  padding:0 6px;
  border-radius:999px;
  background:rgba(245,158,11,.25);
  border:1px solid rgba(245,158,11,.45);
  font-size:11px;
  margin-inline-start:6px;
}

.container{
  width:min(1150px, 100%);
  margin:0 auto;
  padding:16px;
}

.card{
  background:linear-gradient(180deg, rgba(20,20,40,.95), rgba(20,20,40,.60));
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:16px;
  margin-bottom:12px;
}

.muted{ color:var(--muted); }
.actions{ display:flex; gap:10px; flex-wrap:wrap; margin-top:12px; }

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.04);
  cursor:pointer;
  min-width:110px;
  color:var(--text);
}
.btn.gold{
  border-color:rgba(245,158,11,.55);
  background:linear-gradient(180deg, rgba(245,158,11,.20), rgba(245,158,11,.06));
  font-weight:800;
}

.chips{ display:flex; gap:8px; flex-wrap:wrap; margin-top:12px; }
.chip{
  padding:8px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.03);
  font-size:12px;
  color:var(--muted);
}
.chip.gold{
  border-color:rgba(245,158,11,.45);
  color:#ffd9a0;
  background:rgba(245,158,11,.10);
}

.form{ margin-top:10px; display:flex; flex-direction:column; gap:10px; }
label{ font-size:13px; color:var(--muted); }

input, select{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.03);
  color:var(--text);
  outline:none;
}

.alert{ padding:12px 14px; border-radius:14px; border:1px solid var(--border); margin-top:12px; }
.alert.danger{ border-color: rgba(239,68,68,.40); background: rgba(239,68,68,.10); }

.filters{
  display:grid;
  grid-template-columns: 1fr;
  gap:10px;
  margin-top:12px;
}

.catalogGrid{
  display:grid;
  grid-template-columns: 1fr;
  gap:12px;
  margin-top:12px;
}
.itemCard{
  display:grid;
  grid-template-columns: 120px 1fr;
  gap:12px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.02);
  border-radius:16px;
  overflow:hidden;
}
.cover{
  background-size:cover;
  background-position:center;
  min-height:120px;
}
.itemBody{ padding:12px; }
.itemTitle{ font-weight:900; margin-bottom:6px; }
.itemMeta{ display:flex; gap:8px; flex-wrap:wrap; margin-bottom:8px; }
.itemDesc{ color:var(--muted); font-size:13px; line-height:1.8; min-height:44px; }
.empty{
  padding:14px;
  border:1px dashed rgba(255,255,255,.18);
  border-radius:16px;
  color:var(--muted);
  text-align:center;
}

.tableWrap{ overflow:auto; border:1px solid var(--border); border-radius:16px; }
.table{
  width:100%;
  border-collapse:collapse;
  min-width:720px;
}
.table th, .table td{
  border-bottom:1px solid rgba(255,255,255,.08);
  padding:10px 10px;
  text-align:right;
}
.table thead th{ color:#ffe9c8; font-weight:900; }

.bottomNav{
  position:fixed;
  left:0; right:0; bottom:0;
  background:rgba(11,11,18,.92);
  border-top:1px solid var(--border);
  display:flex;
  justify-content:space-around;
  padding:10px 6px;
  z-index:20;
}
.bottomNav a{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:4px;
  font-size:18px;
  padding:6px 8px;
  border-radius:12px;
  border:1px solid transparent;
}
.bottomNav a.active{
  border-color:rgba(124,58,237,.55);
  background:rgba(124,58,237,.10);
}
.bottomNav a span{ font-size:11px; color:var(--muted); }

@media (min-width: 900px){
  .filters{ grid-template-columns: 1.4fr .7fr .7fr auto auto; align-items:end; }
  .catalogGrid{ grid-template-columns: 1fr 1fr; }
  .itemCard{ grid-template-columns: 160px 1fr; }
  .bottomNav{ display:none; }
}

/* ✅ Toast Popup */
.toast{
  position:fixed;
  left:16px;
  right:16px;
  bottom:92px;
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:12px 12px;
  border-radius:16px;
  border:1px solid var(--border);
  background:rgba(20,20,40,.95);
  backdrop-filter: blur(10px);
  z-index:999;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  animation: toastIn .22s ease-out;
}
.toast.success{ border-color: rgba(34,197,94,.45); background: rgba(34,197,94,.10); }
.toast.danger{ border-color: rgba(239,68,68,.45); background: rgba(239,68,68,.10); }
.toast.info{ border-color: rgba(245,158,11,.45); background: rgba(245,158,11,.10); }

.toastIcon{ font-size:20px; line-height:1; margin-top:2px; }
.toastMsg{ flex:1; color:var(--text); line-height:1.7; font-size:14px; }
.toastClose{
  background:transparent;
  border:0;
  color:var(--muted);
  cursor:pointer;
  font-size:16px;
  margin-top:2px;
}
.toast.hide{ opacity:0; transform: translateY(10px); transition: .35s; }

@keyframes toastIn{
  from{ opacity:0; transform: translateY(10px); }
  to{ opacity:1; transform: translateY(0); }
}
