/* Storage sub-tab buttons */
.storage-btn {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 6px;
  background: #333;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}
.storage-btn.active {
  background: #00c6ff;
  color: #000;
}

/* Storage sections hidden by default */
.storage-section { display: none; }
.storage-section.active { display: block; }

/* Storage items styled as cards */
.stat-item {
  display: grid;
  grid-template-columns: 1fr auto 1fr; /* equal left/right space; name truly centered */
  align-items: center;
  background: #1b1f24;
  color: #fff;
  padding: 14px 16px;
  margin-bottom: 10px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,198,255,0.25);
  transition: box-shadow 0.25s ease, transform 0.2s ease;
  position: relative; /* allow absolute badge */
}
.stat-item:hover {
  box-shadow: 0 0 14px rgba(0,198,255,0.45);
  transform: translateY(-1px);
}
.stat-item .quantity {
  grid-column: 1;
  font-weight: bold;
  color: #00c6ff;
  margin: 0 8px;
  justify-self: start;
}
.stat-item .name {
  grid-column: 2;
  color: #b5ecff;
  text-shadow: 0 0 8px rgba(0,198,255,0.5);
  font-family: 'Orbitron', sans-serif;
  font-size: 15px;
  text-align: center;
  justify-self: center; /* truly center in middle column */
}

/* Highlight when tapped for swap */
.stat-item.selected {
  outline: 2px solid #00c6ff;
  box-shadow: 0 0 12px #00c6ff;
}

/* Delete button */
.delete-btn {
  grid-column: 3;
  background: linear-gradient(135deg, #ff4444, #cc0000);
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  text-shadow: 0 0 6px rgba(255,255,255,0.6);
  box-shadow: 0 0 10px rgba(255,0,0,0.6);
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  justify-self: end; /* keep on far right */
}
.delete-btn:hover {
  background: linear-gradient(135deg, #ff6666, #e60000);
  transform: translateY(-2px);
  box-shadow: 0 0 14px rgba(255,0,0,0.8);
}

/* Ensure sections can position children absolutely */
.storage-section {
  position: relative;
  padding-top: 50px; /* or 60px for more space */
}

/* Center lists within the card */
.bank-list, .garage-list, .crates-list {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
}

/* Save button pinned top-right */
.save-btn {
  position: absolute;
  top: 8px;
  right: 12px;
  background: #00c6ff;
  border: none;
  color: #000;
  font-weight: 700;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
  transition: background .15s ease;
}
.save-btn:hover {
  background: #00a0cc;
}

/* Keep the button inside the Storage card */
#tab-storage .card {
  position: relative;
}

/* Global SAVE button styling */
#tab-storage .global-save {
  position: absolute;
  top: 16px;
  right: 20px;
  background: #00c6ff;
  border: none;
  color: #000;
  font-weight: 700;
  font-size: 16px;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
  transition: background .15s ease;
}
#tab-storage .global-save:hover {
  background: #00a0cc;
}

/* NEXT CLAIM badge */
.next-claim-badge {
  position: absolute;
  top: -10px;
  left: 12px;
  background: linear-gradient(135deg, #00c6ff, #00a0cc);
  color: #000;
  font-weight: 800;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0,0,0,.35);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.4px;
}
.next-claim-badge .nc-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffeb3b;
  box-shadow: 0 0 8px rgba(255,235,59,.9);
}
