* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", system-ui, sans-serif;
}

body {
  background: linear-gradient(135deg, #020617, #020617);
  color: #e5e7eb;
}


.app {
  max-width: 1200px;
  margin: auto;
  padding: 24px;
}

/* HEADER */
.header {
  margin-bottom: 24px;
  padding: 16px 24px;
}

.header h1 {
  font-size: 28px;
  font-weight: 700;
}

.header p {
  color: #9ca3af;
  margin-top: 4px;
}

.header-content {
    display: flex;
    justify-content: space-between; /* title di kiri, tombol di kanan */
    align-items: center;            /* vertikal sejajar */
} 

/* FILTER */
.filter-card {
  background: #020617;
  border: 1px solid #1e293b;
  border-radius: 14px;
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.filter-card input,
.filter-card select {
  background: #020617;
  border: 1px solid #1e293b;
  color: #e5e7eb;
  padding: 10px 12px;
  border-radius: 10px;
}

.filter-card button {
  background: #22c55e;
  border: none;
  border-radius: 10px;
  padding: 10px 20px;       
  min-width: 120px;           
  justify-self: start;      
  align-self: center;         
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
  grid-column: -1;            

}


/* ===============================
   SEARCH INPUT (ITEM ID)
=============================== */
.filter-bar input[type="text"] {
  background: #020617;
  border: 1px solid #1e293b;
  color: #e5e7eb;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  outline: none;
  min-width: 160px;
  transition: all 0.2s ease;
}

/* Placeholder */
.filter-bar input[type="text"]::placeholder {
  color: #64748b;
}

/* Focus state */
.filter-bar input[type="text"]:focus {
  border-color: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

/* Hover */
.filter-bar input[type="text"]:hover {
  border-color: #334155;
}

/* Mobile responsive */
@media (max-width: 640px) {
  .filter-bar input[type="text"] {
    width: 100%;
  }
}

.filter-card button:hover {
  background: #16a34a;
}

.item-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.item-info img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    background: #020617;
}

.item-info h3 {
    margin: 0;
    font-size: 18px;
}

#itemName {
    color: #facc15; /* emas */
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

#itemName:hover {
    color: #fde047; /* emas lebih terang */
    text-shadow: 0 0 8px rgba(250, 204, 21, 0.6);
}

#itemName:active {
    color: #eab308;
}

.menu-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: #020617;
    border-radius: 12px;
}

.menu-btn {
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    color: #94a3b8;
    background: #020617;
    border: 1px solid #1e293b;
    transition: all 0.25s ease;
}

.menu-btn:hover {
    color: #e5e7eb;
    background: #020617;
    border-color: #334155;
}

.menu-btn.active {
    color: #0f172a;
    background: linear-gradient(135deg, #0e3dd6, #1c27ce);
    border-color: #fdfffe;
    box-shadow: 0 6px 18px rgba(196, 186, 148, 0.35);
}

.item-link {
color: #facc15; /* emas */
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

.item-link:hover {
     color: #fde047; /* emas lebih terang */
    text-shadow: 0 0 8px rgba(250, 204, 21, 0.6);
}

.item-link:active {
    color: #eab308;
}

.fav-btn {
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #334155;
    transition: color 0.2s ease, transform 0.1s ease;
}

.fav-btn:hover {
    transform: scale(1.15);
    color: #facc15;
}

.fav-btn.active {
    color: #facc15;
    text-shadow: 0 0 10px rgba(250, 204, 21, 0.7);
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.filter-bar select {
  background: #020617;
  color: #e5e7eb;
  border: 1px solid #1e293b;
  padding: 6px 10px;
  border-radius: 6px;
}


/* =========================
   TABLE WRAPPER
========================= */
.table-card {
  background: #020617;
  border: 1px solid #1e293b;
  border-radius: 14px;

  /* 🔑 PENTING */
  overflow-x: auto;
  overflow-y: hidden;

  /* smooth scroll */
  scrollbar-width: thin;
  scrollbar-color: #334155 transparent;
}

/* Chrome scrollbar */
.table-card::-webkit-scrollbar {
  height: 8px;
}
.table-card::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 10px;
}
.table-card::-webkit-scrollbar-track {
  background: transparent;
}

/* =========================
   TABLE
========================= */
table {
  width: 100%;
  min-width: 1200px; /* 🔑 cegah kolom ketindih */
  border-collapse: collapse;
}

/* =========================
   HEADER
========================= */
th {
  background: #020617;
  padding: 14px 16px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: #9ca3af;
  white-space: nowrap; /* 🔑 jangan turun baris */
}

/* =========================
   CELL
========================= */
td {
  padding: 14px 16px;
  border-top: 1px solid #1e293b;
  white-space: nowrap; /* 🔑 angka besar aman */
  font-size: 14px;
}

/* =========================
   ROW HOVER
========================= */
tr:hover {
  background: rgba(34, 197, 94, 0.05);
}


.price {
  font-weight: 600;
  color: #22c55e;
}

.menu-bar {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  background: #020617;
  border-bottom: 1px solid #1e293b;
}

.menu-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid #1e293b;
  background: #020617;
  color: #e5e7eb;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

.menu-btn:hover {
  background: #0f172a;
  border-color: #38bdf8;
}

.menu-btn.active {
  background: #38bdf8;
  color: #020617;
  border-color: #38bdf8;
}

th {
  user-select: none;
  cursor: pointer;
}

.sort-icons {
  font-size: 10px;
  margin-left: 6px;
  color: #64748b;
}

th.sort-asc .sort-icons {
  color: #22c55e;
}

th.sort-desc .sort-icons {
  color: #ef4444;
}

/* BADGE */
.badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.common {
  background: #1e293b;
}

.rare {
  background: #2563eb;
}

.limited {
  background: #f59e0b;
  color: #020617;
}

.asset-thumb {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 8px;
  background: #020617;
  border: 1px solid #1e293b;
}

/* SAVE BUTTON */
.save-btn {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border: none;
  color: #020617;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(34, 197, 94, 0.25);
}

/* Hover */
.save-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(34, 197, 94, 0.35);
}

/* Active (klik) */
.save-btn:active {
  transform: scale(0.95);
}

/* Disabled state (nanti kalau sudah tersimpan) */
.save-btn:disabled {
  background: #1e293b;
  color: #64748b;
  box-shadow: none;
  cursor: not-allowed;
}

.save-btn.saved {
  background: #2ecc71;
  color: #fff;
  cursor: default;
}

/* Delete button */
.delete-btn {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  border: none;
  color: #020617;
  padding: 6px 14px;
  font-size: 13px;  
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(239,68,68,0.25);
}

/* Hover */
.delete-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(239,68,68,0.35);
}

/* Active (klik) */
.delete-btn:active {
  transform: scale(0.95);
}

/* Disabled state (nanti kalau sudah tersimpan) */
.delete-btn:disabled {
  background: #1e293b;
  color: #64748b;
  box-shadow: none;
  cursor: not-allowed;
}

/* Detail button */
.detail-btn {
  background: linear-gradient(135deg, #007bff, #1163bb);
  border: none;
  color: #020617;
  padding: 6px 14px;
  font-size: 13px;  
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(4, 101, 248, 0.678);
}

/* Hover */
.detail-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(4, 101, 248, 0.678);
}

/* Active (klik) */
.detail-btn:active {
  transform: scale(0.95);
}

/* Disabled state (nanti kalau sudah tersimpan) */
.detail-btn:disabled {
  background: #1e293b;
  color: #64748b;
  box-shadow: none;
  cursor: not-allowed;
}

/* Buy button */
.buy-btn {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border: none;
  color: #020617;
  padding: 6px 14px;
  font-size: 13px;  
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(34,197,94,0.25);
}

/* Hover */
.buy-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(34,197,94,0.35);
}

/* Active (klik) */
.buy-btn:active {
  transform: scale(0.95);
}

/* Disabled state (nanti kalau sudah tersimpan) */
.buy-btn:disabled {
  background: #1e293b;
  color: #64748b;
  box-shadow: none;
  cursor: not-allowed;
}

/* Tombol Sell */
.sell-btn {
  background: linear-gradient(135deg, #facc15, #f59e0b);
  border: none;
  color: #020617;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(250, 204, 21, 0.25);
}
.sell-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(250, 204, 21, 0.35);
}
.sell-btn:active {
  transform: scale(0.95);
}

/* Disabled state (nanti kalau sudah tersimpan) */
.sell-btn:disabled {
  background: #1e293b;
  color: #64748b;
  box-shadow: none;
  cursor: not-allowed;
}

.add-btn {
    background-color: #007bff; /* biru */
    color: #fff;
    border: none;
    padding: 6px 14px;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}
.add-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(4, 101, 248, 0.678);
}
.add-btn:active {
  transform: scale(0.95);
}

/* Disabled state (nanti kalau sudah tersimpan) */
.add-btn:disabled {
  background: #1e293b;
  color: #64748b;
  box-shadow: none;
  cursor: not-allowed;
}


/* PAGINATION */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 24px 0;
}

.pagination button {
  background: #020617;
  border: 1px solid #1e293b;
  color: #e5e7eb;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.pagination button.active {
  background: #22c55e;
  color: #020617;
  font-weight: 700;
}

.pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* FOOTER */
.footer {
  text-align: center;
  color: #64748b;
  font-size: 13px;
  margin-top: 40px;
}


/* =========================
   TOAST NOTIFICATION
========================= */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
}

.toast {
  min-width: 260px;
  margin-bottom: 10px;
  padding: 14px 18px;
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  animation: slideIn 0.3s ease, fadeOut 0.3s ease 3s forwards;
}

.toast.success {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.toast.error {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.toast.info {
  background: linear-gradient(135deg, #3498db, #2980b9);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}
